Author
jAlert usage
Pradeep Adibatla
Ranch Hand
Joined: Oct 27, 2009
Posts: 336
Hi,I am new to JQuery.
I am just trying to replace javascript
with
1) I added Jquery.js and also jquery.alerts
Now, does happily replace that?
if you give something like this
what does 'success' imply there? and where should it be set to produce that alert?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
I never used it before, but I am guessing it is appended to the element that pops up as a id. Does this thing have docs in the download file?
Eric
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Feb 20, 2010 06:50:22
0
It defines the type of box (success, info, warning, etc.). What do you mean by "where should it be defined"?
(A third parameter is used to help create the div id.)
Pradeep Adibatla
Ranch Hand
Joined: Oct 27, 2009
Posts: 336
I mean I have alert("hi")..i want to change it to
jAlert("hi,?,?);
how should it be?
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Feb 20, 2010 07:02:49
0
How could I possibly know what alert box type you want and what you want the ID suffix to be?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
Pradeep Adibatla wrote: I mean I have alert("hi")..i want to change it to
jAlert("hi,?,?);
how should it be?
Does it not have any documentation?
Eric
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Feb 20, 2010 07:07:21
0
Not that I saw, but it's (text, type, id_suffix) as far as I can tell.
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
jAlert is one of the poorest examples of a jQuery plugin I've seen in a while. The fact that this:
...is how you pass in options, ridiculous. Find something better. There are tons of these things.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56216
Gregg Bolinger wrote: jAlert is one of the poorest examples of a jQuery plugin I've seen in a while.
Agree, 100%. It was obviously written by someone who knows next to nothing about jQuery or its conventions.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Pradeep Adibatla
Ranch Hand
Joined: Oct 27, 2009
Posts: 336
Find something better. There are tons of these things.
like? I need make my UI rich because I had completely used normal Javascript which looks really poor in many ways
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56216
Pradeep Adibatla wrote: like? I need make my UI rich because I had completely used normal Javascript which looks really poor in many ways
Being snippy with people who are trying to help you is not a winning strategy. I'd re-evaluate your approach.
A google search for "jquery alert" yielded 691,000 results. The suggestion is that you find a jQuery alert implementation that was written by someone who understands jQuery a little better, and that has better documentation.
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
For most usages I simply use jQuery UI's Dialog . Depending on your needs, there are a lot of different options. As Bear noted, a simple google search returns a bunch of results.
subject: jAlert usage