Clicking an anchor in a jQuery Plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Clicking an anchor in a jQuery Plugin

jtuchel
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Clicking an anchor in a jQuery Plugin

jtuchel
Okay, I am a step further.

When using $.get() or $.ajax(), the callback processing ignores WAActionCallbacks. This is implemented in WACallbackRegistry>>#handle: , resp. WAActionCallback>>#isEnabledFor:.

So there seem to be two options:
a) make sure I register some Ajax callback for each link in my hit list
b) find a way to simulate clicking a link that doesn't involve Ajax / XMLHTTPRequest

While I might be able to implement something for a), I'd prefer b) for flexibility reasons.

Any ideas?

Joachim
Reply | Threaded
Open this post in threaded view
|

Solved: Clicking an anchor in a jQuery Plugin

jtuchel
Okay,

it's simpler than I thought, but somewhat feels like a dirty hack...

What I want is to act as if the link was clicked with the mouse. And what I need to do is just

document.location = $selected.get(0).href; // you could probably also use attr("href")...

So this was a nice exercise in debugging callback handling. Learned a lot... again...

Thanks for reading.

Joachim