SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    how to change the color of the alert box in javascript

    How to change the color of the alert box in javascript ?

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,198
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You can't, the alert box uses what ever color the browser developers set it to. The only way to to get a custom colored alert box is to create your own and write the code for it.

  3. #3
    SitePoint Member
    Join Date
    Jul 2011
    Location
    Mumbai,India
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use a custom alert box, made up of div
    http://slayeroffice.com/code/custom_alert
    Last edited by Mittineague; Jul 31, 2011 at 20:10. Reason: OP forgot to turn off auto-title

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    If you're already using jQuery, there is the Dialog UI element that jQUeryUI has.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i put alert box in mobile means, it display the alert box like http://localhost says.. then message how to avoid this any one pls give soultion

  6. #6
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,198
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Again this is another browser design, anything to do with the native alert box can't be touched without some sort of browser based plugin. The only way you can achieve what you want is by building a custom alert box or using the jQuery UI dialog box.

  7. #7
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can you give some examples jui alert box which is support in mobile devices

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by goldensona View Post
    Can you give some examples jui alert box which is support in mobile devices
    jQuery Mobile is what you would want there, for example:
    jQuery Mobile Dialogs
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi i have include the jquery mobile css in my design it works fine for some time afterwards jquery mobile css was overwrite my own css, how to resolve this ?

    now i couldnt see anything in my page. so i have removed visibility hidden in jquery mobile then i couldnt click any thing in my webpage. any body know why it bahave like this ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •