views:

32

answers:

1

A very simple HTML in my .erb file:

<a href="javascript:void(0)" id="xyz">Click</a>

But when browsing this code in the browser, I get the link which text is:

Click (javascript:void(0)).

Could you please help me explain why it is? Thanks much for your help.

My development environment: Ruby 1.8.7 Rails 2.3.4

A: 

I have seen this happening when I had deployed my Rails application and browser was thinking that I'm in a "Print" mode. It'll append a URL after each link so that you don;t have to guess what link is after you print it on paper.

In my case it was happening with Blueprint CSS framework. See if you can fix it by disabling any CSS for "print"

Zepplock
Millions thanks. The problem is solved.
logan
I'm glad I helped. I wasted 2 hours on this ;-) You also can mark my answer as "answered" so that others can easily identify this as a solution.
Zepplock