navigating b/n different form pages

G

Guest

Designed a form in Frontpage. But my form is too long ot be a 'single' page.
Infact I need about 4 pages of a varieties of form fields. I don't know how
to 'link' this forms and recieve the WHOLE reply as a CSV file(or send it to
my email in whatever readable format). I know a little about using a hidden
field, but I couldn't manage to interact b/n my pages-
What type of navigation(hyberlink, interactive navigation, or the push
button it self)should i use to go from one page to another and at the same
time stor the data from the previous pages(as hidden in the following pages)
and finnaly submit it?

Pls help

Solomon
 
A

Andrew Murray

There is already a reply to this question to your other post on 15/06/2005!


On the first form page, right-click the form and choose Properties. Then,
select Send To Other and click Options.

In the resulting dialog box, set Action to the URL of your second form, and
Method to GET.

Now open the second form and add the following script to the <head> section.

<script>
function qsobj (){
var qvbl;
var qstring = "" + document.location.search.substring(1);
if (qstring != ""){
var qpairs = qstring.split("&");
for (i=0; i < qpairs.length; i++) {
qvbl = qpairs.split("=");
this["" + qvbl[0]] = unescape(qvbl[1].replace("+"," "));
}
}
}
function getqsvar(qsvar){
if (qstr[qsvar] == null){
return "";
}else{
return qstr[qsvar];
}
}
var qstr = new qsobj();

function initForm()
{
document.forms[0].C1.value = getqsvar("C1");
document.forms[0].T1.value = getqsvar("T1");
}
</script>

Note the two statements:
document.forms[0].C1.value = getqsvar("C1");
document.forms[0].T1.value = getqsvar("T1");
You need to modify/duplicate these once for each form field on the first
page. For example, if the first page contains four fields named custname,
address, city, and state, code:
document.forms[0].custname.value = getqsvar("custname");
document.forms[0].address.value = getqsvar("address");
document.forms[0].city.value = getqsvar("city");
document.forms[0].state.value = getqsvar("state");

Next, add an onload= attribute to the <body> tag like this.

<body onload="initForm();">

Finally, for each field on the first Web page, add a hidden form field like
ones below to the form on the second page:

<input type="hidden" name="custname" value="">
<input type="hidden" name="address" value="">
<input type="hidden" name="city" value="">
<input type="hidden" name="state" value="">

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
 
G

Guest

Wel, that reply was also for my request, BUT it didn't work for me. I did
exactly what I am told.

Ppl talk a lot about a 'Hidden field' could it be possible to have the
results of all the pages in a hiden field? If so, What I am supposed to do(In
procedure for a 'technologically challenged student').

How can I link the different pages to navigate, What type of button should I
use to navigate b/n the form pages

thanks

Andrew Murray said:
There is already a reply to this question to your other post on 15/06/2005!


On the first form page, right-click the form and choose Properties. Then,
select Send To Other and click Options.

In the resulting dialog box, set Action to the URL of your second form, and
Method to GET.

Now open the second form and add the following script to the <head> section.

<script>
function qsobj (){
var qvbl;
var qstring = "" + document.location.search.substring(1);
if (qstring != ""){
var qpairs = qstring.split("&");
for (i=0; i < qpairs.length; i++) {
qvbl = qpairs.split("=");
this["" + qvbl[0]] = unescape(qvbl[1].replace("+"," "));
}
}
}
function getqsvar(qsvar){
if (qstr[qsvar] == null){
return "";
}else{
return qstr[qsvar];
}
}
var qstr = new qsobj();

function initForm()
{
document.forms[0].C1.value = getqsvar("C1");
document.forms[0].T1.value = getqsvar("T1");
}
</script>

Note the two statements:
document.forms[0].C1.value = getqsvar("C1");
document.forms[0].T1.value = getqsvar("T1");
You need to modify/duplicate these once for each form field on the first
page. For example, if the first page contains four fields named custname,
address, city, and state, code:
document.forms[0].custname.value = getqsvar("custname");
document.forms[0].address.value = getqsvar("address");
document.forms[0].city.value = getqsvar("city");
document.forms[0].state.value = getqsvar("state");

Next, add an onload= attribute to the <body> tag like this.

<body onload="initForm();">

Finally, for each field on the first Web page, add a hidden form field like
ones below to the form on the second page:

<input type="hidden" name="custname" value="">
<input type="hidden" name="address" value="">
<input type="hidden" name="city" value="">
<input type="hidden" name="state" value="">

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------


Sol said:
Designed a form in Frontpage. But my form is too long ot be a 'single'
page.
Infact I need about 4 pages of a varieties of form fields. I don't know
how
to 'link' this forms and recieve the WHOLE reply as a CSV file(or send it
to
my email in whatever readable format). I know a little about using a
hidden
field, but I couldn't manage to interact b/n my pages-
What type of navigation(hyberlink, interactive navigation, or the push
button it self)should i use to go from one page to another and at the same
time stor the data from the previous pages(as hidden in the following
pages)
and finnaly submit it?

Pls help

Solomon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top