+ Reply to Thread
Results 1 to 6 of 6

Thread: javascript alert help

  1. #1
    kidcajes is offline x10Hosting Member kidcajes is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    21

    javascript alert help

    Hi,

    I need help regarding the title for the alert message of javascript:

    HTML Code:
    <a onclick="alert('Hold on there...click the button 
    that says Instant Access.'); return false;" href="#">CLICK ME</a>
    Output title of the message box for this one is : [Javascript Application]

    How do i change the title for this one. Like the one it did here http://www.productlaunchformula.com/

    Your help guys are greatly appreciated. Thank in advance

  2. #2
    drf1229 is offline x10Hosting Member drf1229 is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    71

    Re: javascript alert help

    Ok first of all omit return false;
    No need for that.
    Second, I recommend instead of ' put \" (just the way I do it)

    To change the title, I believe you just do this:

    window.title="New title";
    Last edited by drf1229; 10-26-2009 at 03:41 PM.

  3. #3
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: javascript alert help

    Works in my browser.

    The return false prevents the page from visiting #. Not a lot of point in that, but it does something ;)
    Last edited by Twinkie; 10-26-2009 at 03:40 PM. Reason: Automerged Doublepost

  4. #4
    drf1229 is offline x10Hosting Member drf1229 is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    71

    Re: javascript alert help

    Quote Originally Posted by Twinkie View Post
    Works in my browser.

    The return false prevents the page from visiting #. Not a lot of point in that, but it does something ;)
    Oh I never put that. I just wouldn't put it as an anchor but a <div>

  5. #5
    farscapeone's Avatar
    farscapeone is offline Community Advocate farscapeone is on a distinguished road
    Join Date
    Dec 2008
    Location
    Србија (Serbia)
    Posts
    1,166

    Re: javascript alert help

    The purpose of the alert box is for debugging a script. There for you have little control over it.
    http://en.allexperts.com/q/Javascrip...-Alert-Box.htm

  6. #6
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: javascript alert help

    Another alternative is to use a widget provided by a JS library, such as jQuery's UI/Dialog or Prototype's Window and Dialog classes.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. javascript alert message problem
    By Otaku Ichise in forum Programming Help
    Replies: 9
    Last Post: 09-19-2008, 03:11 AM
  2. Replies: 2
    Last Post: 08-17-2008, 08:30 PM
  3. javascript and external javascript files problem
    By delon in forum Programming Help
    Replies: 6
    Last Post: 04-27-2008, 12:41 AM
  4. Replies: 8
    Last Post: 12-03-2007, 04:12 PM
  5. XML and Javascript
    By cuteboytm in forum Graphics & Webdesign
    Replies: 1
    Last Post: 09-21-2007, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers