Hi,

>  I have made little changes on your code...Can you take a look at the file ,
>  i hav sent you in this mail.

Why not just do a new jsbin? It would have revealed several issues
with that code (those issues aren't the problem, though). This is the
code from your CodeWithIssue.txt file:

* * * *
  var temp = new Template('\
  <a href='#foo' id='#{value}'>#{description}</a>');

  var value="foo";
  var description="foo";

  $('Dynamic').insert(temp.evaluate({
    'id' : value,
    'description':description
  }));
* * * *

That won't compile. You're using single quotes to quote the template,
but then also using single quotes within it. If it did compile, it
wouldn't have the expected result, because you're using the token
#{value} for the ID attribute, but passing in a property called "id"
instead.

I've fixed the code (http://jsbin.com/idegu3/2) and see the issue.
Looks like you've found yet another weird IE bug, and this one
`readAttribute`'s workaround doesn't work around. I'm not even sure it
can, even the `outerHTML` property of the dynamically-created element
shows the normalized URL: http://jsbin.com/idegu3/5

I'd recommend filing an issue on readAttribute:
https://prototype.lighthouseapp.com/projects/8886/home
That said, I'm not sure how easily it can be worked around in the
general case, you may have to handle it in your code. The good news is
that IE8 is much more reasonable in its behavior.

-- T.J.

On Oct 4, 5:53 am, "vinu_b...@yahoo.co.in" <vinu_b...@yahoo.co.in>
wrote:
> Hello,
>
>  I have made little changes on your code. The issue arises only when the 
> anchor tag is created dynamically using a template. Can you take a look at 
> the file , i hav sent you in this mail. It will clearly tell you the issue i 
> am facing. Thanks for your response in advance.  
>
> Thanks & Regards,
> Vinoth john
>
>
>
>  -----Original Message-----
> From: T.J. Crowder
> Sent:  03/10/2010, 7:14  PM
> To: Prototype & script.aculo.us
> Subject: [Proto-Scripty] Re: IE read attribute issue for 'href'.
>
> Hi,
>
> IE's implementation of `getAttribute` has a number of issues, one of
> which being that 'href' is returned as an absolute path rather than as
> its real value (prior to IE8, anyway; they fixed it). Prototype's
> `readAttribute` fixes most of IE's issues, including that one. If
> you're using Prototype (which I assume you are), *always* use
> `readAttribute` instead of `getAttribute`.
>
> From the title of your post, it sounded to me like you were seeing
> that behavior with Prototype's `readAttribute`, which surprised me,
> but a quite test showned that `readAttribute` *does* handle this for
> you:http://jsbin.com/idegu3So unless you're running an old version
> of Prototype, using `readAttribute` should do the trick.
>
> If you actually *do* want the absolute version of the href, use the
> `href` property rather than attribute; 
> details:http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-88517319
>
> HTH,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> On Oct 2, 6:39 pm, Vinoth John <vinu_b...@yahoo.co.in> wrote:
> > Div tags generated from template's href value , when it is tried to be
> > retrieved through read attribute function. I get the href value
> > correctly in Mozzila and google chrome but in Internet Explorer , i am
> > getting the absolute path , instead of the href value alone.
>
> > Any comments on this issue is welcome.
>
> > Thanks,
> > Vinoth John
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>  CodeWithIssue.txt
> 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to