View Full Version : Graphic Pop Up window Help


medusa
09-09-2004, 03:07 AM
I used the script for making a new window when a thumbnail is clicked. However I want to have about 20 say little thumbnails and when clicked all open individual windows. But when i tried it with just two thumbnails it opens the same page no matter what thumbnail. I'm not sure if i am explaining this right or not. Im not to good at making websites so am not sure on the correct words, sorry if i didnt explain this to well.

Sephira
09-09-2004, 02:32 PM
please provide a link to the page in question so i can get a look at your code.

medusa
09-09-2004, 05:19 PM
please provide a link to the page in question so i can get a look at your code.

Here you go, I only put two thumbnails so far but if you click on them both you will see what i mean about only one picture showing up. Thanks!
http://www.octobermoonstudios.com/manipulations.htm

Sephira
09-09-2004, 06:33 PM
while looking at your source i found that you had named both pop-up windows "popup":


<!--
function popup()
{ window.open ("http://www.octobermoonstudios.com/brigid.htm","popup","width=421,height=405,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>

and

<!--
function popup(1)
{ window.open ("http://www.octobermoonstudios.com/badb.htm","popup","width=400,height=410,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->


in order to have multiple windows they all need to be named differenty.

medusa
09-09-2004, 06:35 PM
while looking at your source i found this:


<!--
function popup()
{ window.open ("http://www.octobermoonstudios.com/brigid.htm","popup","width=421,height=405,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>

and this:

<!--
function popup(1)
{ window.open ("http://www.octobermoonstudios.com/badb.htm","popup","width=400,height=410,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->


you named both pop-up windows "popup". in order to have multiple windows they all need to be named differenty.


Oh thank you! I will change that and see what happens. Im so illiterate to webdesign. :)

medusa
09-09-2004, 06:44 PM
while looking at your source i found that you had named both pop-up windows "popup":


<!--
function popup()
{ window.open ("http://www.octobermoonstudios.com/brigid.htm","popup","width=421,height=405,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>

and

<!--
function popup(1)
{ window.open ("http://www.octobermoonstudios.com/badb.htm","popup","width=400,height=410,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->


in order to have multiple windows they all need to be named differenty.

Could there be more to it then that? I tried changing it and it still isnt working now, hmmm.

Sephira
09-09-2004, 07:21 PM
this is going to sound rather silly and kind of simple, but instead of using double quotation marks (the " ") use the single quotation marks in your JavaScript.

<script language="javascript" type="text/javascript">
</script>
<script>
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.com/brigid.htm','popup','width=421,height=405,location =0,menubar=0,resizable=0,scrollbars=0,status=0,tit lebar=1,toolbar=0') }
-->
</script>

and

<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.com/badb.htm','badb','width=400,height=410,location=0, menubar=0,resizable=0,scrollbars=0,status=0,titleb ar=1,toolbar=0') }
-->
</script>

medusa
09-09-2004, 07:56 PM
this is going to sound rather silly and kind of simple, but instead of using double quotation marks (the " ") use the single quotation marks in your JavaScript.

<script language="javascript" type="text/javascript">
</script>
<script>
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.com/brigid.htm','popup','width=421,height=405,location =0,menubar=0,resizable=0,scrollbars=0,status=0,tit lebar=1,toolbar=0') }
-->
</script>

and

<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.com/badb.htm','badb','width=400,height=410,location=0, menubar=0,resizable=0,scrollbars=0,status=0,titleb ar=1,toolbar=0') }
-->
</script>


Still! not working, argh im getting so aggrivated with this lol, i know it has to be one simple little thing, thank you for helping me.
do i use ' for places like here?
<script>
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.com/brigid.htm','popup',"width=421,height=405,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>
<a href="javascript:popup()"><img src="brigid.jpg" border=0 width="50" height="55" alt="Brigid"></a></td>
<td rowspan="2" valign="top">&nbsp;</td>
<td rowspan="2" valign="top">&nbsp;</td>
<td rowspan="3" valign="top">&nbsp;</td>


this part - <a href="javascript:popup()"><img src="brigid.jpg"

r0ckthes0cks
09-09-2004, 08:14 PM
I'm not sure and this might sound stupid but try changing the comas to this:

<script language="javascript" type="text/javascript">
<script>
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.co m/brigid.htm';'popup';'width=421;height=405;location =0;menubar=0;resizable=0;scrollbars=0;status=0; lebar=1;toolbar=0') }
-->
</script>

and

<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ('http://www.octobermoonstudios.co m/badb.htm';'badb';'width=4 00;height=410;location=0; menubar=0;resizable=0;scr ollbars=0;status=0;titleb ar=1;toolbar=0') }
-->
</script>

medusa
09-09-2004, 08:24 PM
I'm not sure and this might sound stupid but try changing the comas to this:

Well i gave that a whirl and still didnt work. Hmmmm... i know its got to be something silly/stupid that is so obvious i cant see it...

r0ckthes0cks
09-09-2004, 08:29 PM
blah. sorry it didn't work! I'm just wondering, did you say it worked with just one but went to the same window with two?

Sephira
09-09-2004, 08:51 PM
the ' should be used only in the JavaScript, not the html. you didn't put it with the width, etc, attributes.

the semi-colon is an old confusion - the language Java uses it to designate the end of a command... JavaScript doesn't need it, but programmers of both languages sometimes have the habit of using the semi-color when it isn't needed.

medusa
09-09-2004, 09:07 PM
the ' should be used only in the JavaScript, not the html. you didn't put it with the width, etc, attributes.

the semi-colon is an old confusion - the language Java uses it to designate the end of a command... JavaScript doesn't need it, but programmers of both languages sometimes have the habit of using the semi-color when it isn't needed.

Should i put it with the width and such though is what im asking? I cant figure why this wont work, and im to stubborn to give up. Hmm also should i now change the ; back to , ?

Sephira
09-09-2004, 09:20 PM
okay, problem solved: downloaded the page and played with it and here's how i did it...

put the following your head:

<SCRIPT language=javascript type=text/javascript>
function popup(url, windowname, wide, high)
{window.open(url,windowname,'width=' + wide + ',height=' + high);
}
</script>

then your links should look like this *exactly* you can cut and paste it:

<A href="javascript:popup('http://www.octobermoonstudios.com/brigid.htm','popup',421,405)"><IMG height=55 alt=Brigid src="Photo Manipulation_files/brigid.jpg" width=50 border=0></A>

and

<A href="javascript:popup('http://www.octobermoonstudios.com/badb.htm','badb',400,410)"><IMG height=55 alt=Badb src="Photo Manipulation_files/badb1.jpg" width=50 border=0>

the part in the head is the function that is called when you click on the links. it refers to the function, follows the instructions, and there you are.

yours wasn't working because you were "confusing" the JavaScript by calling it twice, and it's very finicky as to when and how it works when there is another script on the page.

medusa
09-10-2004, 02:02 AM
okay, problem solved: downloaded the page and played with it and here's how i did it...

put the following your head:

<SCRIPT language=javascript type=text/javascript>
function popup(url, windowname, wide, high)
{window.open(url,windowname,'width=' + wide + ',height=' + high);
}
</script>

then your links should look like this *exactly* you can cut and paste it:

<A href="javascript:popup('http://www.octobermoonstudios.com/brigid.htm','popup',421,405)"><IMG height=55 alt=Brigid src="Photo Manipulation_files/brigid.jpg" width=50 border=0></A>

and

<A href="javascript:popup('http://www.octobermoonstudios.com/badb.htm','badb',400,410)"><IMG height=55 alt=Badb src="Photo Manipulation_files/badb1.jpg" width=50 border=0>

the part in the head is the function that is called when you click on the links. it refers to the function, follows the instructions, and there you are.

yours wasn't working because you were "confusing" the JavaScript by calling it twice, and it's very finicky as to when and how it works when there is another script on the page.


Still showing me the same image no matter which thumbnail i click.. hmmm