Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

displayin output using text box / similar
(1 viewing) (1) Guest
All your queries regarding JavaScript will be solved in this forum
  • Page:
  • 1
TOPIC:

displayin output using text box / similar

displayin output using text box / similar 11 months, 4 weeks ago #631

  • The_Maniac
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
suppose, there is a button, and i want that on click the button some value should be displayed in a text box. is it possible?
or is there any possible way to display the output on the same page.

i have used document.write and it displays result on another page. plz help

Re: displayin output using text box / similar 11 months, 4 weeks ago #634

  • isaac
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 0
Suppose there is one form containing one text box and button. On Click of the button call Javascript method to display text in the input box on the same page.

<form id="frm" name="frm" method="post" target="test.html">
<input type="text" value="" id="txt" name="txt" />
<input type="button" value="click" on-click="call();" />
</form>

The following is the Javascript method used to display text in input box.

function call()
{
document.getElementById('txt').value="hi!!";
}

i hope it might solve your problem...
  • Page:
  • 1
Time to create page: 1.21 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download