Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Location
    Minnesota
    Posts
    1

    Unanswered: Object Expected Error

    I'm hoping this is the right forum to ask this question.

    I'm currently working on a simple e-mail submission form for my webpage. It doesn't seem to be working.

    PHP Code:
    <?
    if($submit)
    {
    mail("myemail@email.com""$subject""$email""$comments");
    }
    ?>

    <?
    {
    ?>
    <form method="post" action="index.php">
    <div class="title">E-mail me.</div><br>
    <div class="center">
    <input type="text" name="name" size=22 maxlength="120" onFocus="clearText(this)" value="Enter E-mail"><br>
    <input type="text" name="subject" size=22 maxlength="120" onFocus="clearText(this)" value="Enter Subject"><br>
    <textarea name="comments" rows=6 cols=21 scrolling="no"></textarea><br>
    <input type="submit" name="submit" value="Submit" class="button">&nbsp;<input type="reset" name="submit2" value="Reset" class="button">
    </div>
    </form>
    <?
    }
    ?>
    Click here to see what it should look like.

    Now every time I click into the Enter E-mail or Enter Subject boxes, it brings up a message saying: An error has occured in the script on this page.
    Line: 36
    Char: 1
    Error: Object Expected
    Code: 0

    Does anyone know what might have caused this?
    Last edited by Aron; 05-16-03 at 00:26.

  2. #2
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    20
    Where is your Javascript-function "clearText" defined in the HTML-document ??

Posting Permissions

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