nlight
07-08-2003, 03:59 AM
hey all,
got a quick one.. i am using a javascript pulldown menu and it works fine. The only problem is that I want the "GO" button to be a pic instead of the standard windows go button. Every time i try to change it to a picture though, the script breaks. Any suggestions, code ex's below.
external .js file:
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
document.write('<form name="form">');
document.write('<select name="site" size=1 style="border:1px solid #000000; font-family: arial,helvetica; font-size: 11px; height: 19px; width: 140px;float:right; background-color:#767676; color:#FFFFFF">');
document.write('<option value="">Choose Below↓');
document.write('<option value="http://www.productsiege.com/page_promos/christian_products_promo.htm">Christian Products');
document.write('<option value="http://www.productsiege.com/page_promos/harry_potter_promo.htm">Harry Potter');
document.write('<option value="http://www.productsiege.com/page_promos/ipowerweb_hosting_promo.htm">iPowerWeb Hosting');
document.write('<option value="http://www.productsiege.com/page_promos/michael_thurmonds_6_week_body_makeover_promo.htm">6 Week Body Makeover');
document.write('</select>');
document.write('<input type="image" src="images/index/shopping_search_go.gif" border="0" align="left" width="25" height="25" onClick="javascript:formHandler()">');
document.write('</form>');
Code Embedded in body of Page:
<script language="JavaScript" src="includes/menu.js"></script>
Everything works great right up until the point that i change the input type to an image.
See it in action here, http://www.productsiege.com/index2.htm
Thanks in advance for any help.
got a quick one.. i am using a javascript pulldown menu and it works fine. The only problem is that I want the "GO" button to be a pic instead of the standard windows go button. Every time i try to change it to a picture though, the script breaks. Any suggestions, code ex's below.
external .js file:
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
document.write('<form name="form">');
document.write('<select name="site" size=1 style="border:1px solid #000000; font-family: arial,helvetica; font-size: 11px; height: 19px; width: 140px;float:right; background-color:#767676; color:#FFFFFF">');
document.write('<option value="">Choose Below↓');
document.write('<option value="http://www.productsiege.com/page_promos/christian_products_promo.htm">Christian Products');
document.write('<option value="http://www.productsiege.com/page_promos/harry_potter_promo.htm">Harry Potter');
document.write('<option value="http://www.productsiege.com/page_promos/ipowerweb_hosting_promo.htm">iPowerWeb Hosting');
document.write('<option value="http://www.productsiege.com/page_promos/michael_thurmonds_6_week_body_makeover_promo.htm">6 Week Body Makeover');
document.write('</select>');
document.write('<input type="image" src="images/index/shopping_search_go.gif" border="0" align="left" width="25" height="25" onClick="javascript:formHandler()">');
document.write('</form>');
Code Embedded in body of Page:
<script language="JavaScript" src="includes/menu.js"></script>
Everything works great right up until the point that i change the input type to an image.
See it in action here, http://www.productsiege.com/index2.htm
Thanks in advance for any help.