Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Den här webbplatsen har begränsad funktionalitet medan vi utför underhåll för att förbättra din upplevelse. Om en artikel inte löser ditt problem och du vill ställa en fråga har vi vår gemenskap som väntar på att hjälpa dig på @FirefoxSupport på Twitter, /r/firefox på Reddit.

Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

form not recognized, name or id attribute not recognized. Works in IE

  • 4 svar
  • 5 har detta problem
  • 5 visningar
  • Senaste svar av foxbt4

more options

HTML tag:

<form name="navform" action="JavaScript:formHandler();">


JS Function definition:

  function formHandler()
  {
	var URL = navform.site.options[navform.site.selectedIndex].value;
	window.top.location.href = URL;
   }


Firefox 3.3.13 errors out on the JS function. Error console reports that navform is not defined. However, previous version of Firefox executed form. IE 7, IE 8 (current release level) execute form function without any errors.

HTML tag: <pre><nowiki><form name="navform" action="JavaScript:formHandler();"> </nowiki></pre> JS Function definition: <pre><nowiki> function formHandler() { var URL = navform.site.options[navform.site.selectedIndex].value; window.top.location.href = URL; } </nowiki></pre> Firefox 3.3.13 errors out on the JS function. Error console reports that navform is not defined. However, previous version of Firefox executed form. IE 7, IE 8 (current release level) execute form function without any errors.

Ändrad av cor-el

Alla svar (4)

more options

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.

more options

Try document.forms["navform"]

more options

Thanks for making time to reply--but that does not conform to the current level of JS syntax--JS error on page load.

more options

Thank you for the suggestion. I may re-write navigation script in future. For now, IE default browser--problem solved.