SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Object Expected...no-idea

    yeah I have this function that runs onload and it worked before and now it doesn't. Gives me error Object expected

    key locations of my code

    Code:
     
    function Init() { // this is in a js file
    		 var i;
    		 
    		 for ( i = 0; i < 4; i++)
    			 document.frmRGBtoHex.elements[i].value = ""; // I guess it doesn't like this
    }
     
    <body onload='Init()'>
     
    ..
    ..
    <form method="post" action="#" name="frmRGBtoHex">
    			<tr>
    				<td><p align ="center">Color Converter</p></td>
    			</tr>
    			<tr>
    				<td><input type="text" size="2" name="set1" onkeypress='restrictSize(2)' onblur='chgFocus(2)' />-
    			   //3 more fields after this one.
    please if you can tell me what's wrong that'd be cool. The syntax looks correct.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok now i realize non of the functions I wrote work. keeps saying the same thing. and I never changed anything

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you at least determine the line causing the problem from the line number given by the error?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •