The Javascript function is expecting only 1 parameter and you are passing 3
parameters. I think that if you provided more information as to what you
are trying to do, we could help more easily. As it stands there are several
issues with this code.
DC
----- Original Message -----
From: "Windle, Kevan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 12:03
Subject: Javascript: Tearing my hair out
> I'm using IE5. Trying to do something really simple in javascript. The
> problem I'm having is this. I can reference a form element with inline
code.
> So passing this variable to a function like this works:
>
> <input
>
ondblclick="resetwhereboxes(this.value,3,document.forms.wheres.wherefield1.n
> ame)" type="text" size="10" name="wherefield1">
>
> then in the function:
>
> <SCRIPT type="text/javascript" language="JavaScript1.2"><!--
> function resetwhereboxes(fname){
> 1 document.write(fname);
> 2 document.write(document.forms.wheres.wherefield1.name);
> 3 document.write(document.forms[0].wherefield1.name);
>
>
> }-->
> </script>
> line 1 works. But line 2 and 3, give the error messages claiming there is
no
> such object.
>
> Anyone seen anything like this?
>
>
>
****************************************************************************
******
>
> The opinions expressed in this E-mail are those of the individual and
> not necessarily the company. This E-mail and any files transmitted
> with it are confidential and solely for the use of the intended recipients
>
>
****************************************************************************
******
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists