Help with these two scripts

admin

Administrator
Staff member
The first script is a dropdown box that will also
do popups and size, placement etc, it's known weakness is it will not consistently resize sometimes it does and then it does not. Is there a way to improve that weakness and improve the look of the menu as it appears on the home page.

The second script is another dropdown that will be placed in other pages and be brought up be the first
script, is there any conflict with these two working together in many browsers any do you see any weakness
in it

#1

<script Language="JavaScript">
<!--
function popup(url, name, width, height)
{
settings=
"toolbar=yes,location=yes,directories=yes,"+
"status=no,menubar=no,scrollbars=yes,"+
"resizable=yes,width="+width+",height="+height;

MyNewWindow=window.open("http://"+url,name,settings);
}
//-->
</script>


Once the script is added to your page, you can open windows using this syntax for the link tags:

<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="popup('www.yahoo.com', 'Win1', 300, 300); return false">
Click Here To Go to Yahoo</a>


#2


<BODY>

<SCRIPT LANGUAGE="JavaScript">
var Image_array = new Array();
//new Array("Image location",width,height,"discription image")
Image_array[0] = new Array("houseproud_P.jpg",100,90,"House Proud");
Image_array[1] = new Array("pariscallingP.jpg",100,90,"Paris calling");
Image_array[2] = new Array("frenchsessionsP.jpg",100,90,"French Session");
Image_array[3] = new Array("coverfullonP.jpg",100,90,"Full on");
//If you want to add more images use Image_array[4]= ...


function setf(thisv)
{
img_changer.src = Image_array[thisv][0];
img_changer.style.width = Image_array[thisv][1];
img_changer.style.height = Image_array[thisv][2];
}
</script>

<center>

<select onchange="setf(this.selectedIndex)">
<script language=javascript>
for(i=0;i<Image_array.length;i++)
{
document.write("<option>" + Image_array[3]);
}
</script>
</select>

<br><br>
<img name=img_changer border=1>
</center>

<script language=javascript>
setf(0);
</script>



Thanks
Don
 
Back
Top