$(''firstTest'').title
So, yes, your code is also correct below (with p.title)... what version of
Prototype are you using? I know 1.5.0 and 1.5.1 work very well. Check your
js includes on your page.
On 6/6/07, -T <gsecurityone-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Hey all I have a question for ya. I want to be able to manipulate the
> title of a link, so I need to know how to read the title with $().
> Here is some code.
> [START CODE]
> <html>
> <head>
> <script type="text/javascript"
src="prototype.js
> "></script>
>
> <script type="text/javascript">
> function whatUp()
> {
> var p = $(''firstTest'');
> alert(p.title);
> }
> </script>
>
> </head>
> <body>
>
> <a id="firstTest"
href="http://www.google.com" title="I think
> this
> is not working ">What did I say</a>
> <button onclick="whatUp()">Press Me</button>
>
> </body>
> </html>
> [/END CODE]
>
> How can I get the title (I ting this is not working) from prototype?
>
> Thanks,
> -T
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---