Does Prototype override the normal link/script behavior?

D

Doug Lerner

This looks like the group where people post messages about AJAX/Prototype.
Please point me to a more appropriate group if I'm wrong! :)

-------

In a project I am working on using Prototype, I found I could not get a link
of the form:

<a href="some link" onclick="someFunction();">

to work. It was as though the onclick parameter didn't exist.

So I ended up making the link a button instead and attaching an
Event.observe to it instead, which worked.

Does Protype block the usual link/script from working?

Thanks,

doug
 
T

Thomas 'PointedEars' Lahn

Doug said:
[...]
Does Protype block the usual link/script from working?

Hopefully, it does. It would greatly help to prevent people from using this
piece of junk.


PointedEars
 
L

Lasse Reichstein Nielsen

Doug Lerner said:
<a href="some link" onclick="someFunction();">

This will follow the link after clicking, since the onclick
content doesn't return false.
Does Protype block the usual link/script from working?

I doubt that is at all possible.
I don't know Prototype, so I dont' know what else it might
try to do, but changing how onclick works is unlikely to be
amongst it.

/L
 
T

Tony

Thomas said:
Doug said:
[...]
Does Protype block the usual link/script from working?

Hopefully, it does. It would greatly help to prevent people from using this
piece of junk.

That's the second time I've seen you call it a piece of junk.

I don't use it, nor have i heard about it, but I am curious as to why
you think it's a piece of junk. Would you please share?
 
D

drnicwilliams

I don't believe Prototype blocks anything - its using the same raw
JS/DOM access that we all have access to, it just wraps it up nicely
into named classes with common APIs across the supported browsers.

If it doesn't work, it doesn' work :)

Nic
 
T

Thomas 'PointedEars' Lahn

Tony said:
Thomas said:
Doug said:
[...]
Does Protype block the usual link/script from working?

Hopefully, it does. It would greatly help to prevent people from using
this piece of junk.

That's the second time I've seen you call it a piece of junk.

I don't use it, nor have i heard about it, but I am curious as to why
you think it's a piece of junk. Would you please share?

The bottom line is that starting with the `Class' object, despite few nice
but still unreliable features it provides [such as the $() method], it
inevitably fails badly to achieve its main goal to provide a reliable
class-based framework for JS/ECMAScript applications, a framework that is
completely unnecessary (as the core language already provides the means)
and its applications having a strong tendency to being impractical.

See also: <URL:http://crockford.com/javascript/inheritance.html>


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top