Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data from a form to the page

Status
Not open for further replies.

ilucw

Technical User
Mar 13, 2002
1
CA
I want to enter information in a form, and have the information appear below in a certain order.(for a bibliography page)

If "John" is entered in the first textbox(say text1)
and "Smith" is entered in the second textbox(call it text2)

I want "Smith, John" to show up underneath the form.

Thanks.
 
the only way I can think of would be to use java-script client side and then as each box loses focus, have it write below the form. that's presuming you want it displayed b4 the user submits. are you putting this stuff into a db for use later? what if there's multiple authors you want to display? if you use a db, you could write the information in and then retrieve a list of all authors and stuff like that. just a thought.
hth
mb
:)
 
you should be able to use the onchange attribute of the input tag, this will not fire as input is entered but on the loss of focus if the data changed. a vbscript sub could be used to check the value of each of these two text boxes and if the first is filled and not the second, set for nothing to happen... If the second is filled out and the first is not, set for nothing to happen... If the first is filled out and the second has previously been filled, set to do whatever...
Maybe use a hidden field to build this biblio string and when all fields are completed have the sub submit the form to itself and refresh the screen, complete with biblio.
without DHTML this will not be as pretty as it might be. As far as the Db idea goes (its always a good idea to use a Db!), but you will still need to submit the page. You sure dont want to make any Db connections from your client-side.

Just some thoughts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top