Forum: Ruby on Rails Interpreting a link statement in "Ajax on Rails"

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Richard (Guest)
on 2007-03-03 06:48
(Received via mailing list)
Hi All,

In Chapter 2, the author adds the following line to create a hyperlink
in app/views/chapter2/myaction.rhtml:

<p><a href="#" onclick="alert('Hello !');">Inline alert()</a></p>

Without the href clause, the text "Inline alert" would be rendered
merely as plain text rather than as a hyperlink, so there would be
nothing to click on to raise the "onclick" event.

But the '="#"' portion of that clause seems to be superfluous, at
least in my Firefox browser, ver.  If the subject portion is
not superfluous,  how is it to be interpreted?

This topic is locked and can not be replied to.