• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

jAlert usage

 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean I have alert("hi")..i want to change it to

jAlert("hi,?,?);

how should it be?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How could I possibly know what alert box type you want and what you want the ID suffix to be?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not that I saw, but it's (text, type, id_suffix) as far as I can tell.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67650
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 67650
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic