prototype and jquery on the same page?

H

Hans-Georg Michna

I would like to use jquery/orangebox to bring up other websites in a
new window and prototype/scriptaculous for playing some sounds etc.

At the moment using the following with IE9 I get errors

http://www.micro-active.com/styles/style8/sound-test.htm

I have seen

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

but have not as yet understood how to apply the ideas here.

Geoff,

most people frequenting this newsgroup are opposed to using any
of the JavaScript libraries, because they are buggy, likely to
break web sites when new browser versions appear, violate all
kinds of rules of good JavaScript programming, and are not
properly and completely documented.

Their only redeeming advantage is that JavaScript beginners can
get something going with a reduced learning effort, but the
quality of the end result will be accordingly low.

In my view Prototype is even worse than jQuery.

So the first recommendation here will always be not to use
either of the libraries and certainly don't use both at the same
time. Instead learn JavaScript and write the few lines you need
to achieve your goal.

That said, it should be possible to use two libraries together.
I have seen at least one project where this was done. (Needless
to say, the creators of the project were entirely clueless, as
far as JavaScript was concerned.)

Of course the libraries cannot use the same global name for
anything, such as the $ variable, but the documentation explains
that.

Prototype may cause additional problems, because it alters
system objects that should not be altered. This may or may not
have adverse effects on jQuery, but I guess nobody would know
how to find out for sure.

If you cannot get these libraries to work together at all, then
there is the suspicion that your JavaScript knowledge level is
still too low to reach your aim and that you should learn more
about JavaScript programming before even trying to use those
libraries.

Hans-Georg
 
G

geoff

Geoff,

most people frequenting this newsgroup are opposed to using any
of the JavaScript libraries, because they are buggy, likely to
break web sites when new browser versions appear, violate all
kinds of rules of good JavaScript programming, and are not
properly and completely documented.

Their only redeeming advantage is that JavaScript beginners can
get something going with a reduced learning effort, but the
quality of the end result will be accordingly low.

In my view Prototype is even worse than jQuery.

So the first recommendation here will always be not to use
either of the libraries and certainly don't use both at the same
time. Instead learn JavaScript and write the few lines you need
to achieve your goal.

That said, it should be possible to use two libraries together.
I have seen at least one project where this was done. (Needless
to say, the creators of the project were entirely clueless, as
far as JavaScript was concerned.)

Of course the libraries cannot use the same global name for
anything, such as the $ variable, but the documentation explains
that.

Prototype may cause additional problems, because it alters
system objects that should not be altered. This may or may not
have adverse effects on jQuery, but I guess nobody would know
how to find out for sure.

If you cannot get these libraries to work together at all, then
there is the suspicion that your JavaScript knowledge level is
still too low to reach your aim and that you should learn more
about JavaScript programming before even trying to use those
libraries.

Hans-Georg

Hans-George

I am all in favour of not using either library but would not at the
moment be able to create my own Javascript code for the

(a) carousel
(b) lightbox/greybox type of popup windows
(c) image slideshows
(d) rounded corners

If you were me where would you start?!

Cheers

Geoff
 
G

Gregor Kofler

Am 2011-05-07 12:27, (e-mail address removed) meinte:
I am all in favour of not using either library but would not at the
moment be able to create my own Javascript code for the

(a) carousel
(b) lightbox/greybox type of popup windows
(c) image slideshows
(d) rounded corners

Why would you need JS - or worse: a JS library - for that?
If you were me where would you start?!

The problem is, that you want all the fancy stuff with close to zero
effort. And that's what all these libraries claim.

Learn the difference between DOM and JS... or rather try something like
this:

https://developer.mozilla.org/de/learn

Gregor
 
G

geoff

Am 2011-05-07 12:27, (e-mail address removed) meinte:


Why would you need JS - or worse: a JS library - for that?


The problem is, that you want all the fancy stuff with close to zero
effort. And that's what all these libraries claim.

Learn the difference between DOM and JS... or rather try something like
this:

https://developer.mozilla.org/de/learn

Thanks for the link Gregor - I will probably go quiet for a while!

Cheers

Geoff
 
G

geoff

Am 2011-05-07 12:27, (e-mail address removed) meinte:


Why would you need JS - or worse: a JS library - for that?


The problem is, that you want all the fancy stuff with close to zero
effort. And that's what all these libraries claim.

Learn the difference between DOM and JS... or rather try something like
this:

https://developer.mozilla.org/de/learn

Gregor

'just when I thought I would have to learn to read German I found

https://developer.mozilla.org/en-US/learn

!

Cheers

Geoff
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top