SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Norcross, GA
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript: object not recognized, even though it's clearly there

    The error is 'document.callentry.whoathere is not an object'

    Code:
    <html><head><title></title></head>
    <body>
    <p>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Beginning of JavaScript --------
    
    var strMsg = 'Leaving this page without using the Submit button will cause your narritave to be lost.' 
    if (document.whoathere.value==0) {
    	window.event.returnValue = strMsg; 
    } 
    	
    // -- End of JavaScript code -------------- -->
    </SCRIPT>
    <form name="callentry" method="post" action="process_callentry.phtml">
    <input type="hidden" name="fnum" value="p9999998">
    <input type="text" name="whoathere" value="0">
    <input type=submit value='Submit' onClick="document.callentry.whoathere.value=1;">
    </form>
    </body>
    </html>
    I've tried replacing the form name (in the script) with form[0] but the same error appeared (documet.forms.0.whoathere is not an object).

    Any clues?
    Last edited by mstembri; Feb 7, 2002 at 10:13.


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
  •