kanala Posted March 8, 2008 Share Posted March 8, 2008 <form action="java script:ShowContent" METHOD="POST" onSubmit="return dropdown(this.gourl)"><select NAME="gourl"><option VALUE="" selected="selected">Select animal</option><option VALUE="java script:ShowContent('pros')">Bear</option></select><input TYPE="SUBMIT" VALUE="Go"></form>I don't know if I have the form action and onsubmit bit right. The javascript command should be "java script:ShowContent('pros')", which should be triggered when you choose the option "Bear" and press Go. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 8, 2008 Share Posted March 8, 2008 <form onSubmit="ShowContent(this.gourl.value); dropdown(this.gourl); return false;"><select NAME="gourl"><option VALUE="" selected="selected">Select animal</option><option VALUE="pros">Bear</option></select><input TYPE="SUBMIT" VALUE="Go"></form> Link to comment Share on other sites More sharing options...
kanala Posted March 8, 2008 Author Share Posted March 8, 2008 Thanks, now I need some more help.This is the script to get the photo album in freewebs.<link rel="stylesheet" type="text/css" href="http://www.freewebs.com/icegifts/slidesDefault.css"><script src="http://images.freewebs.com/WebsAlbum/websAlbumUtils.js" type="text/javascript"></script><script src="http://www.freewebs.com/icegifts/miniaturesallphoto.js" type="text/javascript"></script><script src="http://freewebs.com/icegifts/slides.js" type="text/javascript"></script><script type="text/javascript">drawWebsAlbum();</script>Is there a way (javascript command) to change the <script src="http://www.freewebs.com/icegifts/miniaturesallphoto.js" type="text/javascript"> to another src? e.g. "http://www.freewebs.com/icegifts/miniaturesallphoto2.js".I need it to be triggered by pressing a link or by using that drop down menu above.Thanks Link to comment Share on other sites More sharing options...
jesh Posted March 10, 2008 Share Posted March 10, 2008 You can get at script elements using the DOM. <script id="PhotoScript" src="some.js"></script><script>document.getElementById("PhotoScript").src = "someother.js";</script> However, I can't guarantee that once the src of the script element changes, the browser will recognize that change and fire off any of the code included in the new js file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.