Menu
[url]http://javascriptkit.com/script/cut174.shtml
this script is the basic idea of what i’m looking for..
however I can’t get the links to open into new windows.
can someone help me out with a variation to this script?
also.. is it possible to have more than one item change in this manor … ie: an image changes as well as a seperate image’s link?
say there are 3 items, a drop down menu to select an item, once selected the image changes to display it, and the button “add to cart” now links to that specific item..
anyone?
thanks in advance
Jordan
also note that left and top are IE-only[/QUOTE]
[b]screenX=intPixels. Standard: Netscape. left=n. Standard: Internet Explorer.among other things, in the open method. It might be usable in Mozilla, don't bet that this is current ?
screenY=intPixels. Standard: Netscape. top=n. Standard: Internet Explorer.[/b][/quote]
function openWin() {
// open window
}
Each time you want this, you'll have to call the function, using: [FONT=times new roman]openWin()[/FONT].[CODE]
<script language="javascript">
function linkrotate1(which){
var mylinks1=new Array()
//add in more links if you want (ie:mylinks[3]=...)
mylinks1[0]="http://www.abcnews.com"
mylinks1[1]="http://www.cnn.com"
mylinks1[2]="http://www.geocities.com"
window. open(mylinks1[which],'','width=700,height=500,left=150,top=150,scrollbars=yes,resizable=yes')
}
function showimage1()
{
if (!document.images1)
return
document.images1.pictures1.src=
document.mygallery1.picture1.options[document.mygallery1.picture1.selectedIndex].value
}
//-->
</script>
[/CODE]
[CODE]
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="mygallery1"><p><select name="picture1" size="1" onChange="showimage1()">
<option selected value="images/green.jpg">Green</option>
<option value="images/red.jpg">Red</option>
<option value="images/blue.jpg">Blue</option>
</select></p>
</form>
</td>
</tr>
<tr>
<td width="100%"><p align="center"><a href="javascript:linkrotate1(document.mygallery1.picture1.selectedIndex)" onMouseover="window.status='';return true"><img src="images/green.jpg" name="pictures1" width="150" height="150" border=0></a></td>
</tr>
</table>
[/CODE]
[CODE]
<script language="javascript">
function linkrotate(which){
var mylinks=new Array()
//add in more links if you want (ie:mylinks[3]=...)
mylinks[0]="http://www.paypal.com"
mylinks[1]="http://www.paypal.com"
mylinks[2]="http://www.paypal.com"
window. open(mylinks[which],'','width=700,height=500,left=150,top=150,scrollbars=yes,resizable=yes')
}
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//-->
</script>
[/CODE]
[CODE]
<form name="mygallery"><select name="picture" size="1" onChange="showimage(this.form.picture.selectedIndex)">
<option selected value="images/green.jpg">Green / Orange</option>
<option value="images/red.jpg">Red / Black</option>
<option value="images/blue.jpg">Light Blue / Purple</option>
</select></p>
</form>
<a href="javascript:linkrotate(document.mygallery.picture.selectedIndex)" onMouseover="window.status='';return true"><img src="images/green.jpg" name="pictures" width="150" height="150" border="1" bordercolor="#000000"></a>
[/CODE]
[CODE]
<script language="javascript">
function linkrotate1(which){
var mylinks1=new Array()
//add in more links if you want (ie:mylinks[3]=...)
mylinks1[0]="http://www.abcnews.com"
mylinks1[1]="http://www.cnn.com"
mylinks1[2]="http://www.geocities.com"
window. open(mylinks1[which],'','width=700,height=500,left=150,top=150,scrollbars=yes,resizable=yes')
}
function showimage1()
{
if (!document.images1)
return
document.images1.pictures1.src=
document.mygallery1.picture1.options[document.mygallery1.picture1.selectedIndex].value
}
//-->
</script>
[/CODE]
[CODE]
<form name="mygallery1"><p><select name="picture1" size="1" onChange="showimage1(this.form.picture1.selectedIndex)">
<option selected value="images/green.jpg">Green</option>
<option value="images/red.jpg">Red</option>
<option value="images/blue.jpg">Blue</option>
</select></p>
</form>
<a href="javascript:linkrotate1(document.mygallery1.picture1.selectedIndex)" onMouseover="window.status='';return true"><img src="images/green.jpg" name="pictures1" width="150" height="150" border=0></a></td>
[/CODE]
[code=php]<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
<script type="text/javascript">
var mylinks1=new Array()
mylinks1[0]="http://www.abcnews.com"
mylinks1[1]="http://www.cnn.com"
mylinks1[2]="http://www.geocities.com"
var mylinks2=new Array()
mylinks2[0]="http://www.paypal.com"
mylinks2[1]="http://www.paypal.com"
mylinks2[2]="http://www.paypal.com"
function linkrotate(arr,which) {
eval("window.open(mylinks"+ arr +"[which],'','width=700,height=500,left=150,top=150,scrollbars=yes,resizable=yes')")
}
function showimage(w,n) {
if (!document.images) {
return
}
eval("document.holder"+ w +".src=document.mygallery.picture"+ w +".options[n].value")
}
</script>
</HEAD>
<BODY>
<form name="mygallery">
<a href="#null" onclick="linkrotate(1,document.mygallery.picture1.selectedIndex)" onMouseover="window.status='';return true">
<img src="images/green.jpg" name="holder1" width="150" height="150" border="1" bordercolor="#000000"></a>
<P>
<select name="picture1" size="1" onChange="showimage(1,this.form.picture1.selectedIndex)">
<option selected value="pic01.jpg">Green / Orange</option>
<option value="pic02.jpg">Red / Black</option>
<option value="pic03.jpg">Light Blue / Purple</option>
</select>
</P>
<P>
<a href="#null" onclick="linkrotate(2,document.mygallery.picture2.selectedIndex)" onMouseover="window.status='';return true"><img src="images/green.jpg" name="holder2" width="150" height="150" border=0></a>
</P>
<P>
<select name="picture2" size="1" onChange="showimage(2,this.form.picture2.selectedIndex)">
<option selected value="pic04.jpg">Green</option>
<option value="pic05.jpg">Red</option>
<option value="pic06.jpg">Blue</option>
</select>
</p>
</form>
</BODY>
</HTML>[/code]
Note that the lines should not be wrapped ?0.1.9 — BETA 6.1