File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes jAlert usage Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "jAlert usage" Watch "jAlert usage" New topic
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
    
    6
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

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

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
    
    6
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

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
    
  13

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
    
  13

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: jAlert usage
 
Similar Threads
how to open xml file into html page
[N95/S60] Unhandled Exception when using try/catch block
js dilemma
Is javascript functions process the code in sequence or else in random manner?
btspp:// Fails