Results 1 to 3 of 3

Thread: Couple Javascript/HTML questions (NEED HELP URGENT!!!)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Posts
    18

    Couple Javascript/HTML questions (NEED HELP URGENT!!!)

    OK, the first problem is I need to know how to pop up a dynamic window that says “CUSTOMER_NAME, would you like to buy a toupee with your Rogaine purchase. It’s only $5.99—for a limited time.”

    The original code is
    <form name=”formsAreCool” onsubmit=”return runJavascript();”>

    <input type=”hidden” name=”nameToShow” value=”Bob”>

    <input type=”submit”>
    </form>


    The code I tried:
    <HEAD>


    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=1,resizable=1,width=300,height=300');");
    }
    // End -->
    </script>

    </HEAD>

    <BODY>

    <BODY onLoad="javascriptopUp('“CUSTOMER_NAME, would you like to buy a toupee with your Rogaine purchase. It’s only $5.99—for a limited time.” ')">

    </BODY>

    </HTML

    gave me an error in IE (-900 somethin)

    --------------------------------------------------------

    SECOND, I need a Javascript alert box that says:

    “NAME_FROM_FORM, thank you for the following comments:
    ****comments****

    Your input is appreciated.”


    from the HTML code:

    <tr><td align=right><font CLASS="bodytext"><b>Name:</b></font></td><td><input NAME="Name" TYPE="Text" SIZE="50"></td></tr>

    <tr><td align=right><font CLASS=”bodytext”><b>E-Mail Address:</b></font></td><td><input NAME=email” TYPE=”Text” SIZE=”50”></td></tr>

    <tr><td align=right><font CLASS=”bodytext><b>Comments:</b></font></td><td><input NAME=”comments” Type=”Text” SIZE=”100”></td></tr>


    that I wrote.



    Your help would be GREATLY appreciated. Thanks in advance.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Posts
    18
    I need help.

  3. #3
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65
    you had nested <body> tags, for some reason...
    you shouldnt name things with keywords like name or function or var or things like that...
    you only need javascript: in href, look around threads if you're confused...
    it might also help to put all your script in the <head> tag. its a personal preference. i just think it keeps things more organized...

    <head>
    <script...>
    function doPopup()
    {
    withRug = confirm(document.formsarecool.custName.value+", would you like to buy a toupee with your Rogaine purchase? It’s only $5.99—for a limited time.");
    alert(document.formsarecool.custName.value+", thank you for the following comments:\n"+document.formsarecool.comments.value);
    }
    </script>
    </head>

    <BODY>

    <tr><td align=right><font CLASS="bodytext"><b>Name:</b></font></td><td><input NAME="custName" TYPE="Text" SIZE="50"></td></tr>
    <tr><td align=right><font CLASS=”bodytext”><b>E-Mail Address:</b></font></td><td><input NAME="email” TYPE=”Text” SIZE=”50”></td></tr>
    <tr><td align=right><font CLASS=”bodytext><b>Comments:</b></font></td><td><input NAME=”comments” Type=”Text” SIZE=”100”></td></tr>
    <tr><td align=right><input type=button value="Continue" onClick="doPopup()">
    if you choose not to decide you still have made a choice!

    RUSH rocks!

Posting Permissions

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



Click Here to Expand Forum to Full Width