Wierd HTML rendering problem

This I can't fathom:

I have a Rails application which renders the following two links ro create new objects as part of a taskbar

<b> <a onclick="new Ajax.Request('/items/new', {asynchronous:true, evalScripts:true, parameters:'item_type=' + 'Diary_date' + '&authenticity_token=' + encodeURIComponent ('lvGwTrO1QEp1zJOSY3UngizQIJ9KQ7YGFq5oRh5OYkg=')}); return false;" href="#">date</a> </b>

<b> <a onclick="new Ajax.Request('/items/new', {asynchronous:true, evalScripts:true, parameters:'item_type=' + 'File_upload' + '&authenticity_token=' + encodeURIComponent ('lvGwTrO1QEp1zJOSY3UngizQIJ9KQ7YGFq5oRh5OYkg=')}); return false;" href="#">file</a> </b>

But when the page renders, the first link is clickable, while the second isn't. But this only seems to be the case in Windows Firefox, not Mac or IE.

The ERB which produces the links, and the links themselves are identifical to my eye, except for the fact they deal with different models.

Any ideas?

Can you validate the page (say, at http://validator.w3.org/)? When I've run into weird things like this, I have restarted by development server on port 80 and pointed the validator at the page on my development server just to see what it spits out.

oh... you wanted "good" ideas. Sorry, I don't think I can help you there. :slight_smile:

--wpd

No thats a good idea.

How can I get an application with secure session-based login validated by W3 -- the validator just ends up validating the login page.

No thats a good idea.

How can I get an application with secure session-based login validated by W3 -- the validator just ends up validating the login page.

Just get to the page then view the source and copy it, then paste into the 'direct input' page at W3

Colin

The Firefox Web Developer Toolbar has a "Validate Local HTML" method to make this easier, FWIW.

Also, if your markup and CSS validate, and there's no JS errors showing, try turning off CSS.

Either the link is receiving the event and the action isn't taking place for some reason - or - the link never gets the event at all because some element is "above" it and capturing the event. Turning off CSS will help determine if the latter is true.

Or add a listener to the body that alerts the target of a click event -- then try to click on the link and see what captures the event.

HTH,

All good. Thanks. Will test later.

Couldn't find any validation problems on those lines.

IN the end I moved the links around a bit, and the one in question does now trigger -- but only from the first couple of letters. Really strange.