Jump to content

Archived

This topic is now archived and is closed to further replies.

Gruzin

Help needed

Recommended Posts

hi, I've tryed almost everything... hope someone can help me here :(
I have a text included in the page and I want this text to be puted in the text field when I click the button. how can I do that, any ideas? thanks for your help

Share this post


Link to post
Share on other sites
[code]<p id="para">bladieblahblablabla.</p>
<input type="text" name="textField">[/code]

[code]document.getElementsByName("textField")[0].setAttribute('value',document.getElementById('para').nodeValue);[/code]

That 'should' work. As long as you only have one input element named 'textField'..

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.