Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

onclick script help

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
Michael_Wright
Posts: 140
Joined: Thu 30 May 2013 9:15 am
Weather Station: fine offset
Operating System: windows 7
Location: Townsville/Queensland/Australia
Contact:

onclick script help

Post by Michael_Wright »

good afternoon I am trying to get the image to zoom in and out like on an onclick but still now working could someone help me out please mike

Code: Select all

<table width="100%" border="0" cellpadding="0"align="centre">
  <tr>
    <th>winds 1000 hpa</th>
    <th>winds at 850 hPa</th>
    <th>Jetstream winds <th>
</tr>
  <tr> 
</td>
<a href="windmaps.htm" target="wind"><img border="1" src="http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular" alt=""></a>
 <a onclick="window.open(http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular);return false;" href="windmaps.htm" target="winds"><img border="0" src="http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular" alt=""></a>
 </tr> 
  </table>  
Image
The Future you have Not seen but the presants shall all ways be.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: onclick script help

Post by beteljuice »

You seem to be trying two different ways of opening a new window, but both are incomplete and you don't say if you have two different size images or you are using css / html to resize.

Code: Select all

// case #1
<a href="windmaps.htm" target="wind"><img border="1" src="http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular" alt=""></a>
// there isn't actually a picture, the url is incomplete and you haven't 'defined' the size.
// It is assumed that new window windmaps.htm contains the full sized image.

// case #2
// very similar problems
<a onclick="window.open(http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular);return false;" href="windmaps.htm" target="winds"><img border="0" src="http://earth.nullschool.net/#current/wind/isobaric/1000hPa/equirectangular" alt=""></a>
// with the added hook that the href and target are irrelevent because of return false;
There are many 'pretty' ways to display a picture in a <div> on the current page (think like google picuture search) but let's go with ye olde basics a' la case #1 assuming you only have one sized version of the image.

Code: Select all

<a href="windmaps.htm" target="wind"><img border="1" src="http://link_to_your_img.jpg" alt="Click for large version" title="Click for large version" style="width: small_widthpx; height: small_heightpx;" /></a>
// the 'problem' with this technique is that they have already downloaded the large image.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: onclick script help

Post by mcrossley »

Isn't a more basic problem that "http://earth.nullschool.net/#current/wi ... ectangular" isn't an image but a fully interactive page.

I put it in an iframe on my page.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: onclick script help

Post by beteljuice »

I didn't bother chasing the link. I just assumed it was a malformed url. - naughty beteljuice :lol:
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply