Forum: Ruby on Rails Howto use the <map> tag?

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.
Rath -. (Guest)
on 2006-02-20 11:17
Does anyone know how to change the <area ...> tag into RoR code?

<%= image_tag("image.jpg", :size => "80x40", :border => 0, :usemap =>
"#Map") %>
<map name="Map" id="Map">
  <area shape="rect" coords="100,20,100,20" href="../help.html"
target="_parent" alt="help" />
</map>

Or how can I change the "../help.html" to always point a
"http://root_dir/help.html" file?

I would like to use this code on the application.rhtml but:
if I leave it as it is and open let say http://localhost/index.html
it works fine,
if I open http://localhost/controller/method the link does not work
because help.html is not in the http://localhost/controller/ directory

Any ideas?

Thanks
Norman T. (Guest)
on 2006-02-20 16:08
(Received via mailing list)
Am Montag, den 20.02.2006, 10:17 +0100 schrieb Rath:
> Or how can I change the "../help.html" to always point a
> "http://root_dir/help.html" file?

"/help.html"

This will always request the help.html file from your document root.

--
Norman T.

http://blog.inlet-media.de
This topic is locked and can not be replied to.