Jump to content


Photo

Help needed


  • Please log in to reply
3 replies to this topic

#1 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 07 August 2006 - 01:05 PM

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
I don't need your script, I'll try to write it myself

#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 07 August 2006 - 01:31 PM

<p id="para">bladieblahblablabla.</p>
<input type="text" name="textField">

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

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

#3 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 07 August 2006 - 01:46 PM

thanks a lot!:)
I don't need your script, I'll try to write it myself

#4 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 07 August 2006 - 02:59 PM

Got kudos? Just kiddin'  ;D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users