Jump to content

boggen

Members
  • Posts

    3
  • Joined

  • Last visited

boggen's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. LOL *ughs* look at it so many times. it all looks the same to me. thank you all for pointing out the lower caseing. of ID to Id.
  2. () {} [] no go. :/ thanks for trying. any other suggestions?
  3. i thought i could access the select element by simply implying getelementbyid. but when i try i get...(( error:'document.getElementByID.b1' is null or not an object ))ay i can use (( forms["x"].elements["x"].what_i_want )) but boy do i not want to re type up a few pages to work in a forms name into the equations and variables. <html><head><script language="JavaScript" type="text/javascript">function clear_menu(){alert(document.getElementByID["b1"].selectedIndex);}function clear_menu2(){alert(document.forms["chap1"].elements["b1"].selectedIndex);}</script></head><body><form name="chap1"> <p> <input name="Button" type="button" onClick="clear_menu();" value="getelementbyid does not work"> (( error:'document.getElementByID.b1' is null or not an object )) </p> <p> <input name="Button" type="button" onClick="clear_menu2();" value="forms.elements works"> </p> <p> <select name="b1" id="b1"> <option value="123">456</option> <option value="234">567</option> <option value="345">678</option> </select> </p></form></body></html>
×
×
  • Create New...