Page 1 of 1

JavaScript Links Not Working

Posted: Thu Jul 16, 2009 10:07 am
by GµårÐïåñ
Can someone please take a look at this link: http://www.state.tn.us/youth and confirm that when you click on the "Contact Us" on the left side which produces the url: http://www.state.tn.us/youth/#contactinfo fails to function when NoScript is active. I am trying to figure out why but cannot figure it out as of yet, any assistance would be appreciated in debugging this. Thanks.

Re: JavaScript Links Not Working

Posted: Thu Jul 16, 2009 1:57 pm
by Alan Baxter
Looks like it might be coded for IE only, GµårÐïåñ. It doesn't seem to depend on NoScript. Pressing the Contact Us button only seems to work in IE, IE7 on my PC. The button does not work in Fx 3.5 or Fx 3.0.11 even if no extensions are installed. It does not work in Opera 9.64 either.

Re: JavaScript Links Not Working

Posted: Thu Jul 16, 2009 2:09 pm
by therube
Do you know how a tag is supposed to work, how it is supposed to be coded? Me neither.

Anyhow, it does not work even if NoScript is disabled.
So that would point me to a coding problem with the web page.

The #tag points to http://www.state.tn.us/youth/#contactinfo.

Yet the source shows:

Code: Select all

<div id="ContactInfo">
              <ul>
                <!-- InstanceBeginEditable name="ContactInfo" -->
                  <li><a name="contactus" id="contactus"></a>Department of Children's Services</li>
"contactinfo" is in a <div> (whatever that is).
And "contactus" (rather then contactinfo) is in an <a name=> (whatever that is).


Similarly I just ran into this, http://www.dol.gov/esa/minwage/america.htm.

Select a state on the map, any state.
The page advances as expected.
Now click on the "2" footnote marker (in the Premium Pay box).
That does not work.

"2" says, http://www.dol.gov/esa/minwage/america.htm#footnote.
But if you look in the source, it shows:

Code: Select all

<a name="#footnote"></a>
And I suspect the "#" is in error & it should read:

Code: Select all

<a name="footnote"></a>
PS: Both sites work in IE. So I suppose that Mozilla is playing the game as it is to be played, MS being more lax?


If I save "america.htm" locally, remove the "#", then the "2" tag works.
If I save "dcs.htm" locally, s/<a name="contactus" id="contactus">/ with <a name="contactinfo" id="contactus">, then that too works.

(Who said I didn't know how a #tag works :geek: :lol:.)

(Damn Alan, had I seen your posted before I started looking, it would have saved me a bunch of time ;-).)

Re: JavaScript Links Not Working

Posted: Thu Jul 16, 2009 3:02 pm
by therube
See The name Attribute on this page.
(Unfortunately they don't provide a tag to it ;-).)

(I notified webmaster @ dol.gov. Lets see if it gets fixed.)

Re: JavaScript Links Not Working

Posted: Thu Jul 16, 2009 7:41 pm
by GµårÐïåñ
Alan thank you, if its coded for just IE that's just plain asinine. As for therube, the <a> is an anchor and can be used in many ways, that's actually a legal tag and <div> allows you to "bunch" stuff together and use them like a combined object if you will for easier editing, styling and positioning, that's commonly used. Well then its safe to say that a government page is built by morons but I still don't understand why Fx wouldn't parse it, like IE would, close the gap and divide if you will. Oh well, I guess Fx is not as perfect a replacement to IE as it would like to think.