Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parse data that has been passed through?

 
Gwenna Males
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to take values that have been sent from one page to the next into seperate variables?
If not, how would I send them through to the second page seperately?
******************page 1 javascript**********************************
function btnExtend_onclick() {
var _sel = document.getElementById("days");
var _start = document.getElementById("start");
var _end = document.getElementById("end");
window.location="ExtendPolicy.htm?"+_sel.value+","+_start.value+","+_end.value;
}
******************page 1 html**************************************
<form name="formx">
<input type="text" name="days" size="2">
<input type="text" name="start" size="12">
<input type="text" name="end" size="12">
</form>
**************this sends, for example 3,09202005,09252005 to page 2***********
**************page 2 javascript ***************************************
<script language="javascript">
var data = '';
document.form2.data.value = unescape(location.search.substring(1));
</script>
********page 2 html to grab the value of the data string************
<input type="text" id="data" name="data" size="20" visible="false">
*********I now need to parse out the values of _sel, _start & _end into 3 different fields (days, start & end) in page 2.. Is this possible? Right now all of the data (3,09202005,09252005) appears in all three fields (days, start & end) **********************
Thanks!
 
Gwenna Males
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OOPS sorry, this should have been posted in a Javascript forum, I'll copy it there.(unless, of course, you know the answer... then by all means I'd love to hear it)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic