On Apr 24, 4:06 am, "Steve T." <[EMAIL PROTECTED]> wrote:
> I'm using 1.5.1_rc2 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
> US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3.
>
> I suspect strongly that this is a quirk with innerHTML in Firefox, but
> I'm stumped and was hoping someone had a workaround.

There is no public specification for innerHTML, it is a property
introduced by IE that has been widely copied.  It is not consistent
across browsers so don't expect it to be.


[...]
> (1) The attributes are now double-quoted instead of single-quoted.  I
> don't think this is a big deal, but it's curious in any case.

innerHTML is not equivalent to "view source", it is the browser
telling you its version of the markup.  There are many diffrences
between browsers on how they report the innerHTML of elements that
have exactly the same source or have been constructed or modified
using the same commands.


> (2) The original href='#{id}' now has the { and } encoded.  That
> causes a problem when I try to use this string in a Prototype
> Template.  I've been fooling around with this a bit and the only
> attribute on any HTML element that I can find that does this is the
> href inside an <A />.
>
> Anyone know of a way around this?

Don't use innerHTML.  Clearlly the value you are assigning to the href
attribute isn't an href, so don't do that.  Assign the value to some
other property and retrieve it using getAttribute, assign a useful
value to the href attribute.


--
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to