By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

Does Prototype override the normal link/script behavior?

P: n/a
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

Jan 15 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Doug Lerner wrote:
[...]
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
Jan 15 '06 #2

P: n/a
Doug Lerner <do**@lerner.net> writes:
<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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jan 15 '06 #3

P: n/a
Thomas 'PointedEars' Lahn wrote:
Doug Lerner wrote:
[...]
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?

Jan 15 '06 #4

P: n/a
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

Jan 16 '06 #5

P: n/a
Tony wrote:
Thomas 'PointedEars' Lahn wrote:
Doug Lerner wrote:
> [...]
> 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
Jan 16 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.