| Author |
HTML Hidden value
|
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
Hi
I have 2 HTML pages and I need to pass some values using hidden fields. But don't know how to get that values on the next page. Please assist me
|
 |
Birla Murugesan
Ranch Hand
Joined: Nov 25, 2008
Posts: 66
|
|
|
please say clearly what you are doing
|
 |
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
I have the hidden on the first page
<input type="hidden" name="a1" value="b1">
On the second page I need the value of a1. How to retrive that.
|
 |
Birla Murugesan
Ranch Hand
Joined: Nov 25, 2008
Posts: 66
|
|
how can you are redirecting first html to second one
|
 |
Birla Murugesan
Ranch Hand
Joined: Nov 25, 2008
Posts: 66
|
|
Have an id for input field
<input type="hidden" name="a1" id="new" value="b1">
here is the code
<script>
var new = document.getElementById("new").value
window.location="http:/adbcd.com?new="+new;
<script>
|
 |
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
|
This is the get method. How about post method ?
|
 |
Birla Murugesan
Ranch Hand
Joined: Nov 25, 2008
Posts: 66
|
|
how you are redirecting by post method?
give a code snippet
|
 |
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
After hitting the submit button
<FORM NAME="CityChoice" METHOD="post" ACTION="ss.html">
|
 |
Birla Murugesan
Ranch Hand
Joined: Nov 25, 2008
Posts: 66
|
|
I think ,there is no possibility of getting parameter in post method.
let me know why you are redirect one html to another,Anyhow you don't get dynamic content in htmls,
then what is the use of this,it's worthless,
so you combine both into one,you can do whatever you want using javascript and Dom model
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Post would require you to use a serverside language to get at the data. For clientside only you need to use a get.
Eric
|
 |
 |
|
|
subject: HTML Hidden value
|
|
|