Re: set form item value with javascript
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: set form item value with javascript

From: ASM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date: Wed Jul 27 2005 - 23:59:41 CEST

RobG wrote:
> ASM wrote:
>
>> RobG wrote:

OK,

My reaction did come mostly about accessibility (the alt) wont you speak
in your 2 1st comments to, finaly, propose a DOM function and DOM only.

> How many browsers that support the forms collection don't support
> 'parentNode'?

Sorry ?
dindn't you want to say :
how many that support DOM don't support Javascript (1.2)
I hope it is

> The idea was to not hard-code the form name in the script.

OK ... nevertheless ...

> the OP wanted the name of the image that was clicked on to be
> put into the form before sending it.

That's right and I didn't answer to this point
so, with your example :

<a href="image3clickedOn.html"><img name="image3" src="image3.gif"
     alt="Submit button" title="Click to submit"
onclick="imageClickedOn.value=this.name;return false;">
  <input type="hidden" name="imageClickedOn" value="none">

-- 
Stephane Moriaux et son [moins] vieux Mac
Received on Tue Oct 18 03:02:33 2005