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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
31fdda5f38fc6df4e193cfb7445ddc5a?d=identicon&s=25 Richard (Guest)
on 2007-03-03 05: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. 2.0.0.2.  If the subject portion is
not superfluous,  how is it to be interpreted?

TIA,
Richard
This topic is locked and can not be replied to.