linking one form page to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks
 
This answer from Jim Buyens *still* works:

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)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
 
Thanks, Ok
BUT where is the 'HEAD'section isn't it in the 'code'

And would that solution be probably for server supporting ASP files. My
server doesn't support ASP files(When I click the 'send to other option' I
see that there are different destinations)

waiting eagerly...


Dan L said:
This answer from Jim Buyens *still* works:

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:
How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks
 
The messege I recieve when I do what is suggested by JIM Buyens is like this
'FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web
server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish
this web to a web server that has the FrontPage Server Extensions installed'

What would be the possible pro?, as I said my host server doesn't support
ASP files but has got FP Server Extensions

Thanks


Dan L said:
This answer from Jim Buyens *still* works:

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:
How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks
 
Have you Published this to your webserver or are you trying to test this on your local machine? You will get that error if you are testing against local disc-based web (no server running) because,,,well, there is no server running.



Sol said:
The messege I recieve when I do what is suggested by JIM Buyens is like this
'FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web
server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish
this web to a web server that has the FrontPage Server Extensions installed'

What would be the possible pro?, as I said my host server doesn't support
ASP files but has got FP Server Extensions

Thanks


Dan L said:
This answer from Jim Buyens *still* works:

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:
How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks
 
Yes, I did publish it on the webserver and I am sure that the surver is
running.

Rob Giordano (Crash Gordon®) said:
Have you Published this to your webserver or are you trying to test this on your local machine? You will get that error if you are testing against local disc-based web (no server running) because,,,well, there is no server running.



Sol said:
The messege I recieve when I do what is suggested by JIM Buyens is like this
'FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web
server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish
this web to a web server that has the FrontPage Server Extensions installed'

What would be the possible pro?, as I said my host server doesn't support
ASP files but has got FP Server Extensions

Thanks


Dan L said:
This answer from Jim Buyens *still* works:

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)
|/----------------------------­-----------------------
*-----------------------------­-----------------------



:

How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks

 
I'm off to work...but why don't you post the URL of the page so others can see what's happening and help find the prob.


Sol said:
Yes, I did publish it on the webserver and I am sure that the surver is
running.

Rob Giordano (Crash Gordon®) said:
Have you Published this to your webserver or are you trying to test this on your local machine? You will get that error if you are testing against local disc-based web (no server running) because,,,well, there is no server running.



Sol said:
The messege I recieve when I do what is suggested by JIM Buyens is like this
'FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web
server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish
this web to a web server that has the FrontPage Server Extensions installed'

What would be the possible pro?, as I said my host server doesn't support
ASP files but has got FP Server Extensions

Thanks


:

This answer from Jim Buyens *still* works:

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)
|/----------------------------­-----------------------
*-----------------------------­-----------------------



:

How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks

 
OK, atleast I am one step ahead. Sorry that, I corrected one mistake of mine
while putting Jim Buyens suggetions into my code.

My problem now, it gives me the whole 'Hidden' field as a final result,
where that field is selected or not.
How can I correct that?
thanks and below is Jim's suggestions
''''
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)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
There I am now,
Rob Giordano (Crash Gordon®) said:
I'm off to work...but why don't you post the URL of the page so others can see what's happening and help find the prob.


Sol said:
Yes, I did publish it on the webserver and I am sure that the surver is
running.

Rob Giordano (Crash Gordon®) said:
Have you Published this to your webserver or are you trying to test this on your local machine? You will get that error if you are testing against local disc-based web (no server running) because,,,well, there is no server running.



The messege I recieve when I do what is suggested by JIM Buyens is like this
'FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web
server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish
this web to a web server that has the FrontPage Server Extensions installed'

What would be the possible pro?, as I said my host server doesn't support
ASP files but has got FP Server Extensions

Thanks


:

This answer from Jim Buyens *still* works:

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)
|/----------------------------­-----------------------
*-----------------------------­-----------------------



:

How can I post one frontpage form to another?.

What I have:

A long frontpage form which I HAVE to devid into 4 pages

What I need:
1. To navigate from one page to another and transfer the responses of the
previous pages to the next(as hidden one) and finnaly have the whole response
as a FILE.

What I tried and failed:

1. I used hidden field as a means of transfering date from one form to
another BUT I don't know how I can navigate fron one page to another. When I
use 'submit' button the page only navigates to the automatic confirmation
page and I don't know how to make this button go to the next form and at the
same time stor the results of that same page(either on the next page as
hidden or send it to the servor as separat one)
2. I can use some other navigation tools to link from one form page to
another(Such as interactive button) BUT can transfer the data from the
previous pages, neither to the next page as hidden nor to server as separate
file.

What is the way out of this trouble

Thanks

 
Using the std FP forms handler All fields are always passed to the Action
(whether the user enters any data or not)
If your script (from Jim) is picking up all fields on the chained forms your final form will also include all fields
(whether they have any data or not)
The only way to prevent empty fields is w/ some additional scripting to check each of the document.forms[0].XX.value for content

But, If you are saving the final results to a csv file that's exactly what you want - all fields
or your "rows/columns" in the csv will not match and be worthless

--




| OK, atleast I am one step ahead. Sorry that, I corrected one mistake of mine
| while putting Jim Buyens suggetions into my code.
|
| My problem now, it gives me the whole 'Hidden' field as a final result,
| where that field is selected or not.
| How can I correct that?
| thanks and below is Jim's suggestions
| ''''
| 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)
||/----------------------------­-----------------------
| *-----------------------------­-----------------------
| There I am now,
| "Rob Giordano (Crash Gordon®)" wrote:
|
| > I'm off to work...but why don't you post the URL of the page so others can see what's happening and help find the prob.
| >
| >
| > > Yes, I did publish it on the webserver and I am sure that the surver is
| > > running.
| > >
| > > "Rob Giordano (Crash Gordon®)" wrote:
| > >
| > > > Have you Published this to your webserver or are you trying to test this on your local machine? You will get that error if
you are testing against local disc-based web (no server running) because,,,well, there is no server running.
| > > >
| > > >
| > > >
| > > > > The messege I recieve when I do what is suggested by JIM Buyens is like this
| > > > > 'FrontPage Run-Time Component Page
| > > > > You have submitted a form or followed a link to a page that requires a web
| > > > > server and the FrontPage Server Extensions to function properly.
| > > > >
| > > > > This form or other FrontPage component will work correctly if you publish
| > > > > this web to a web server that has the FrontPage Server Extensions installed'
| > > > >
| > > > > What would be the possible pro?, as I said my host server doesn't support
| > > > > ASP files but has got FP Server Extensions
| > > > >
| > > > > Thanks
| > > > >
| > > > >
| > > > > "Dan L" wrote:
| > > > >
| > > > > > This answer from Jim Buyens *still* works:
| > > > > >
| > > > > > 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" wrote:
| > > > > >
| > > > > > > How can I post one frontpage form to another?.
| > > > > > >
| > > > > > > What I have:
| > > > > > >
| > > > > > > A long frontpage form which I HAVE to devid into 4 pages
| > > > > > >
| > > > > > > What I need:
| > > > > > > 1. To navigate from one page to another and transfer the responses of the
| > > > > > > previous pages to the next(as hidden one) and finnaly have the whole response
| > > > > > > as a FILE.
| > > > > > >
| > > > > > > What I tried and failed:
| > > > > > >
| > > > > > > 1. I used hidden field as a means of transfering date from one form to
| > > > > > > another BUT I don't know how I can navigate fron one page to another. When I
| > > > > > > use 'submit' button the page only navigates to the automatic confirmation
| > > > > > > page and I don't know how to make this button go to the next form and at the
| > > > > > > same time stor the results of that same page(either on the next page as
| > > > > > > hidden or send it to the servor as separat one)
| > > > > > > 2. I can use some other navigation tools to link from one form page to
| > > > > > > another(Such as interactive button) BUT can transfer the data from the
| > > > > > > previous pages, neither to the next page as hidden nor to server as separate
| > > > > > > file.
| > > > > > >
| > > > > > > What is the way out of this trouble
| > > > > > >
| > > > > > > Thanks
| > > >
| >
 
Back
Top