By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,336 Members | 2,315 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,336 IT Pros & Developers. It's quick & easy.

display input from form

P: 4
how do i get the input from a form and then display it using document.write?
Oct 6 '06 #1
Share this Question
Share on Google+
6 Replies


P: 16
Um, I don't know how to do it with JS

Would you be willing to learn how to use PHP becuase ECHO would be better in my opinion =)
Oct 7 '06 #2

P: 4
Um, I don't know how to do it with JS

Would you be willing to learn how to use PHP becuase ECHO would be better in my opinion =)
i would prefer to use JS but if you could show it using any other way, i'll be interested too,
Oct 7 '06 #3

ronverdonk
Expert 2.5K+
P: 4,258
Have a look at this JS form tutoral Accessing and validating forms using Javascript
It probably gives you the information you are looking for,

Ronald :cool:
Oct 7 '06 #4

P: 4
Have a look at this JS form tutoral Accessing and validating forms using Javascript
It probably gives you the information you are looking for,

Ronald :cool:
yes, that's it..
thanks a lot
Oct 8 '06 #5

P: 25
Have a look at this JS form tutoral Accessing and validating forms using Javascript
It probably gives you the information you are looking for,

Ronald :cool:
I have an issue related to these discussions...

I am writing a table maintenance program, where users can update their existing data. (Debian, PHP4, PostGreSQL7.4) I have no problem displaying existing data using php and echo. My problem is that the first choice in a "select" <option value...> list overrides the existing data. I've tried loading up the first option with existing data values, to no avail. I used switch/case, in the pgsql section after it loads the array, to load the display description, but I can't get it to display. php/echo, single quotes, double quotes, none apparently work. (case 2: $labdisp = "bad labor"; echo "$labdisp"; eg.) The display string in a select option is not quoted, so I'm wondering if I am asking the impossible.

My option/value line resembled varieties of this:
<option value = "<? echo $array["labor"]; ?> <? echo $labdisp; ?>
or just $labdisp (quoted various ways.)

Does anybody know how to get existing values to display in the entry field, overriding the first choice in the option list? I thought my hack would work, but I was WRONG.

I would say it's urgent, but after this many years, nothing is urgent.

I thank any angels in advance who have suggestions!! God bless!!

- Rhys
Nov 27 '06 #6

ronverdonk
Expert 2.5K+
P: 4,258
Rhys, show some code because I cannot deduct from your sample what the problem is. Anyway the statement that you showed is incorrect [php]<option value = "<? echo $array["labor"]; ?> <? echo $labdisp; ?>
[/php]
this is the correct format (when defining it in HTML code):
[php]
<option value = "<? echo $array['labor']; ?>"><? echo $labdisp; ?></option>
[/php]

Ronald :cool:
Nov 28 '06 #7

Post your reply

Sign in to post your reply or Sign up for a free account.