PHP: post hidden textboxes' values

Status
Not open for further replies.

anuj_web

New Member
Messages
145
Reaction score
0
Points
0
Hi...

how can i post hidden text boxes values.....

And one more thing...

I have designed my page using a software...
Some form elements ,i dont know how ...i cannot access them thru the form ... like i could not post the value of a text box(this one is not hidden)
and I used a loop to access all form elements..in this case comboboxes
all except one are checked for values ...although all of them lie inside the form when i designed it

Does neone had such a problem ?? ne solution or workaround ??

and...can we have two JS source files for the same HTML doc??
and if we have set a JS src file then cant we have function in the JS script segment of the HTML doc ??

thanks
 
Last edited:

marshian

New Member
Messages
526
Reaction score
9
Points
0
For the javascript:
you can have as much source files as you want, but if the same global variables/functions are used in 2 or more files, you could get some troubles. (and yes, you can still put extra js in the html, without external source files)

For the form:
any <input type="hidden">'s value will be posted when the form is submitted. (If you have correctly set the parameters for your form.)
eg.
HTML:
<form action="page2.php" method="post">
<input type="hidden" name="input1" value="true" />
<input type="submit" name="submit1" />
</form>
 

anuj_web

New Member
Messages
145
Reaction score
0
Points
0
what is the syntax to add more than one source files ??
i''l try wat you r saying about that PHP


wat about this ??
I have designed my page using a software...
Some form elements ,i dont know how ...i cannot access them thru the form ... like i could not post the value of a text box(this one is not hidden)
and I used a loop to access all form elements..in this case comboboxes
all except one are checked for values ...although all of them lie inside the form when i designed it
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
HTML syntax for multiple js-files:
HTML:
<script src="source1.js"></script>
<script src="source2.js"></script>

And maybe your software didn't place the not-working elements inside the <form> tags, or it could be they don't have a name attribute.
 

anuj_web

New Member
Messages
145
Reaction score
0
Points
0
For the javascript:
you can have as much source files as you want, but if the same global variables/functions are used in 2 or more files, you could get some troubles. (and yes, you can still put extra js in the html, without external source files)

For the form:
any <input type="hidden">'s value will be posted when the form is submitted. (If you have correctly set the parameters for your form.)
eg.
HTML:
<form action="page2.php" method="post">
<input type="hidden" name="input1" value="true" />
<input type="submit" name="submit1" />
</form>


wat i understand form this post of yours is that every hidden field will be "posted"..if i have given it a name and a value ...right ??

Does it matter whether I give it a value at runtime...I also change the type of button( from button to submit) and also change the action of form( from nothin to <filename>) I do this all thru javbascript ..just before the JS code submits the form


wat a coincidence : the same thing happened to me
http://www.usenet-forums.com/php-language/21990-odd-problem-data-hidden-field-not-sent-server-2.html

so the reason hence the solution is same as well :D

thanks

SOLVED :
 
Last edited:
Status
Not open for further replies.
Top