Gruzin Posted August 7, 2006 Share Posted August 7, 2006 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 Link to comment https://forums.phpfreaks.com/topic/16793-help-needed/ Share on other sites More sharing options...
448191 Posted August 7, 2006 Share Posted August 7, 2006 [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'.. Link to comment https://forums.phpfreaks.com/topic/16793-help-needed/#findComment-70660 Share on other sites More sharing options...
Gruzin Posted August 7, 2006 Author Share Posted August 7, 2006 thanks a lot!:) Link to comment https://forums.phpfreaks.com/topic/16793-help-needed/#findComment-70674 Share on other sites More sharing options...
448191 Posted August 7, 2006 Share Posted August 7, 2006 Got kudos? Just kiddin' ;D Link to comment https://forums.phpfreaks.com/topic/16793-help-needed/#findComment-70717 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.