PDA

View Full Version : complicated image swap, link call


opperman
03-11-2003, 04:30 PM
I'm having difficulties getting this to work. The desired action:

Numbered navigation system (1,2,3,4, . . .). OnClick number, an image swaps (this works), when the user clicks on "View Larger," the page knows to pop-up the right page. Each image has a larger view html page that matches. I tried creating a var for the images, then assigning the variable value with the OnClick, then using a if and else if with the "View Larger" link to pop up the windows. Not working.

www.tunnelstudio.biz/test/bellacor/bellacor_test.html has the right action (if the user clicks on "old", but doesn't pop up the right window.

www.tunnelstudio.biz/test/bellacor/bellacor_test3.html is the page with the following JavaScript. I'm am indeed a newbie and appreciate all advice.
Best,
Michael


<SCRIPT LANGUAGE="JavaScript">
function which_image()
{
var image= new Array()
image ["logo"]="a";
image["page1"]="b";
image["page2"]="c";
image["page2"]="c";

</script>


<a href="#" class="lettersnav" onFocus="this.blur();" onClick="MM_swapImage('image','','bellacorlogo_a_sml.gif',1, (image == 'a')">a</a>
<a href="#" class="lettersnav" onFocus="this.blur();" onClick="MM_swapImage('image','','bellacorhome_b_sml.jpg',1, (image == 'b'))">b</a>
<a href="#" class="lettersnav" onFocus="this.blur();" onClick="MM_swapImage('image','','bellacorcat_c_sml.jpg',1, (image == 'c'))">c</a>
<a href="#" class="lettersnav" onFocus="this.blur();" onClick="MM_swapImage('image','','bellacorproduct_d_sml.jpg',1, (image == 'd'))">d</a></td>
<td width="78" height="26" align="center" background="../images/view_larger.gif">

<div align="center">

<A HREF="bellacor_al.html"onFocus="this.blur();"

onClick=" NewWindow (if (var image == 'a') this.href = 'bellacor_al.html','larger','520','387','no');return false;
else if (var image = 'b') this.href = 'bellacor_bl.html','larger','520','387','no');return false;
else if (var image == 'c') this.href = 'bellacor_cl.html', 'larger','520','387','no');return false;
else this.href == 'bellacor_dl.html', 'larger','520','387','no');return false;" class="textnavlink">View Larger</A>
</div></td>