Yeah, that works, but if the user doesn't have javascript enabled, or
desires to open the link in a new tab, he can't :)

Best,
Nicolas

On 10/22/07, NormyB <[EMAIL PROTECTED]> wrote:
>
>
> Thanks Nicolas,
>
> Actually all I needed was
>
> <a href="#"   onclick="new Ajax.Updater('somepage.html', 'destination
> DIV');"> my link </a>
>
> That worked like a charm.
>
> Norm
>
> On Oct 19, 2:55 pm, "Nicolás Sanguinetti" <[EMAIL PROTECTED]> wrote:
> > $("somelink").observe("click", function(event) {
> >   new Ajax.Updater("destination", this.href, { method: "get" });
> >   event.stop();
> >
> > });
> >
> > Should work fine on 1.6+ :)
> > On previous versions of Prototype use Event.stop(event) instead of
> > event.stop() and Event.element(event).href instead of this.href.
> >
> > Best,
> > Nicolas
> >
> > On 10/19/07, NormyB <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Sorry, I should have proofed this.
> >
> > > What I am doing is updating a <DIV> with element.update. when a user
> > > clicks on a link.
> >
> > > I could use iframes and accomplish exactly what I want to do, but what
> > > fun would that be? =) for SEO I think updating  a DIV is a much better
> > > and elegant  way to do this.
> >
> > > Norm
> >
> > > On Oct 19, 12:37 pm, NormyB <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> >
> > > > I am new to JavaScripting and have a question about
> > > > element.upodate().Is there a way to have update use a text file of
> > > > html file to get it's text? I'm just getting familiar with DOM and I
> > > > have not seen anything that pops out at me for the answer to that
> > > > question. Any suggestions provided are greatly appreciated.
> >
> > > > Thanks,
> > > > Norm
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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