Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Anything Goes
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:51

Javascript Questions


Poster: SkyFlyer
Dated: Saturday March 5 2005 - 22:16:15 GMT

Hello all! :D
I am less than a beginner with JS! 8O
I know enough about it to do the Menu and such.
I use ThumbsPlus to generate Thumbnails and .htm code for the pictures on my web page. I have selected the create Javascript button in ThumbsPlus to produce that code.
That part works fine. The code and thumbnails work fine.
I would like to be able to click additional thumbnails and open additional pictures without replacing the opened picture window.
Could someone work with me offline (or online) and give me some thoughts on how to do this.
Here is the code that is generated for each thumbnail ...
Code:
td valign="middle" align="center" width="16%"><a href="javascript:;" onClick="w = window.open('P2193900.jpg','TpWebWizImage','width=483,height=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); w.resizeTo(530,677); w.focus()" style="cursor:hand">
         <img src="tn_P2193900_jpg.jpg" border="0" width="81" height="100" alt="P2193900.jpg"></a></td>

I have some code from Xara that opens new windows, but the code is a little too complex for me to understand how it works.
I can post that code is someone wnats to compare.
Any suggestions would be appreciated ... 8)


Poster: Ruth
Dated: Sunday March 6 2005 - 0:17:45 GMT

Are you saying you want each to open a new window and keep the other windows that are already open, so they can compare and contrast things? If that's what you mean then I think each window will need it's own name.

Ruth


Poster: SkyFlyer
Dated: Sunday March 6 2005 - 0:22:27 GMT

That is what I am saying.
I've been doing some exploring in some books and the net.
Looks like I might need to do some document.write/close and focus for each thumbnail.
Not sure yet ...


Poster: Ruth
Dated: Sunday March 6 2005 - 0:46:38 GMT

Code:
"><a href="javascript:;" onClick="w = window.open('P2193900.jpg','TpWebWizImage','width=483,height=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); w.resizeTo(530,677); w.focus()" style="cursor:hand">



I'm a novice, also, but it seems the window name is TpWebWizImage, so
try putting a number after the TpWebWizImage in each. For example, you'd have TpWebWizImage1 and in the next one TpWebWizImage2 and so on, that seems to open a different new window when you click.

Just as information, what size are you having it resizeTo? Because it goes off the bottom of my screen. I've got resolution set to 800x600, and since it's not resizable, I get a screen with the bottom not available.

Ruth


Poster: SkyFlyer
Dated: Sunday March 6 2005 - 0:54:46 GMT

I'll try the sequential number thing.
I'm not sure about the resizing thing. I just used that as a sample.
In real life, it opens the picture right.
I just added sequential numbers and it did not work.
Thanks for the suggestion.


Poster: Ruth
Dated: Sunday March 6 2005 - 1:05:53 GMT

Hmm, it's working here in both IE5.5 and Netscape 7.1 This is what I have on the page.
Code:
<TABLE BORDER="0" CELLPADDING="2">
  <TR>
    <TD valign="middle" align="center" width="16%"><A onClick="w = window.open('P2193900.jpg','TpWebWizImage0','width=483,height=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); w.resizeTo(530,677); w.focus()"
     style="cursor:hand" HREF="javascript;">
      <IMG border="0" width="81" height="100" alt="P2193900.jpg" SRC="tn_P2193900_jpg.jpg"></A></TD>
     <TD valign="middle" align="center" width="16%"><A onClick="w = window.open('P2193901.jpg','TpWebWizImage1','width=483,height=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); w.resizeTo(530,580); w.focus()"
     style="cursor:hand" HREF="javascript;">
      <IMG border="0" width="81" height="100" alt="P2193900.jpg" SRC="tn_P2193901_jpg.jpg"></A></TD>
   <TD valign="middle" align="center" width="16%"><A onClick="w = window.open('P2193900.jpg','TpWebWizImage2','width=483,height=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); w.resizeTo(530,677); w.focus()"
     style="cursor:hand" HREF="javascript;">
      <IMG border="0" width="81" height="100" alt="P2193900.jpg" SRC="tn_P2193900_jpg.jpg"></A></TD>
  </TR>
</TABLE>


Netscape gives me a could not be found, but it opens a new window for each with the page not found in it, Firefox and IE do the same. Opera gives me the could not be found but doesn't open any window.

As to the size, in the code ther is w.resizeTo(530,677) so I have my resolution set at 800x600, that means that the 677 is longer than my actual computer screen because of the resolution.

Ruth


Poster: SkyFlyer
Dated: Sunday March 6 2005 - 1:11:37 GMT

Thanks.
I'll give it another try later.
I'll compare your code to mine.
I have to go for now.
Thanks again ...


Poster: Ruth
Dated: Sunday March 6 2005 - 1:16:55 GMT

Here's a code I use on my site for the borders page with a set of links each one opened a new window. Maybe you can compare this with the code that program generates.
Code:
<A href="#" onClick="window.open ('http://www.poems2u.com/borders/victorianflavor/victorian006.htm','javascript_vic6','location,menubar,resizable=yes'); return false;"><IMG
       ALIGN="Middle" WIDTH="334" HEIGHT="132" SRC="vic_small006.gif"></A>
If you want to test the page and see if they work for you, here's the link http://www.poems2u.com/borders/victoria ... orian6.htm

Ruth