How do I submit form data and change to a different page?

How do I submit form data and change to a different page?

am 01.04.2007 18:02:57 von Simon Benson

Probably a fairly simple problem but one that's been plaguing me for a
couple of days... can anyone help?

I have a classic ASP page with a number of text boxes which are updatable.

For convenience I want to add 'tabs' at the top of the page (like a card
index) as the data to be displayed is split into specific groups (client,
company, preferences, events).

How do I update any changes to the data and switch to a different page - at
the same time? i.e. the user doesn't have to click 'update' (submit button)
before changing pages

Sample code is below...

Thanks in advance
Simon



Sample code:


style="border-collapse: collapse">



 
¦ 
" >Event
Enquiries
  ¦ 
" >Mailing
Preferences
  ¦ 
" >Company
Information












>
>
>
>



















....

title  
first name  









 

onclick="recordcopy()">
onclick="recorddelete()">
onclick="recordprint()">

Re: How do I submit form data and change to a different page?

am 01.04.2007 18:51:16 von Mike

....have you thougt about making the tabs to (additional) submit-buttons?! As
far as i can see all tabs are directing to the same page. If this isn't
possible you might consinder using Javascript to modfiy target (and data) of
the form (depeding on the tab clicked) and then using Javascript to simulate
a button click.

ciao, Mike

Re: How do I submit form data and change to a different page?

am 01.04.2007 19:05:03 von Simon Benson

HI Mike,

Possible I didn't explain myself...

Yes I want to find some javascript (that works unlike mine) that will - from
the onClick property of the HREFs - trigger form submit - I thought it was
myForm.submit() - and then load the alternate page in such a way that it
doesn't matter which link tab has been clicked - I need to store the data
each time a page has been changed as this is the prototype for a large
multi-user system which could have a number of users dependent upon the
data!

Effectively I need a text link which triggers an onClick update of the
database, plus a redirect to the relevant page (actually an include file
within a container) and I've tried all that I can think of without success!

TIA
Simon


"M. Agel" wrote in message
news:57a68iF2c6488U1@mid.individual.net...
> ...have you thougt about making the tabs to (additional) submit-buttons?!
> As far as i can see all tabs are directing to the same page. If this isn't
> possible you might consinder using Javascript to modfiy target (and data)
> of the form (depeding on the tab clicked) and then using Javascript to
> simulate a button click.
>
> ciao, Mike
>

Re: How do I submit form data and change to a different page?

am 01.04.2007 19:29:56 von exjxw.hannivoort

Simon Benson wrote on 01 apr 2007 in
microsoft.public.inetserver.asp.general:

> Yes I want to find some javascript (that works unlike mine) that will
> - from the onClick property of the HREFs - trigger form submit - I
> thought it was myForm.submit() - and then load the alternate page in
> such a way that it doesn't matter which link tab has been clicked

What is a link tab?
A tab like in FF or IE7?

What is an "onClick property of the HREFs"?
Do hrefs have onclick properties? I doubt that.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: How do I submit form data and change to a different page?

am 02.04.2007 01:45:30 von mmcginty

"Simon Benson" wrote in message
news:RIQPh.3777$e9.2196@newsfe6-gui.ntli.net...
> Probably a fairly simple problem but one that's been plaguing me for a
> couple of days... can anyone help?
>
> I have a classic ASP page with a number of text boxes which are updatable.
>
> For convenience I want to add 'tabs' at the top of the page (like a card
> index) as the data to be displayed is split into specific groups (client,
> company, preferences, events).
>
> How do I update any changes to the data and switch to a different page -
> at the same time? i.e. the user doesn't have to click 'update' (submit
> button) before changing pages
>
> Sample code is below...
>
> Thanks in advance
> Simon

1. Use something besides an a[nchor] tag for the tabs, like a button or a
span -- i.e., something for which the built-in click behavior doesn't
implicitly navigate to another document. Most element types support the
onclick event, and all of the anchor element's UI effects (cursor,
roll-over, etc) can be implemented for any element using CSS.

2. Set the action attribute of the form element dynamically in the tab click
procedure, before calling its submit method.

That way the form submit will navigate to the appropriate script, without
any interference from the behavior of an anchor.


-Mark



> Sample code:
>
>
>

> style="border-collapse: collapse">
>
>

>
>  
> ¦ 
> " >Event
> Enquiries
  ¦ 
> " >Mailing
> Preferences
  ¦ 
> " >Company
> Information

>
>
>
>
>

>
>
>
>

>
>
> >
> >
> >
> >
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
> ...
>
>
title 
first name 
>

>

>


>


>

>

>

>

>  
>
> > onclick="recordcopy()">
> > onclick="recorddelete()">
> > onclick="recordprint()">
>

Re: How do I submit form data and change to a different page?

am 03.04.2007 10:19:46 von Anthony Jones

"Simon Benson" wrote in message
news:RIQPh.3777$e9.2196@newsfe6-gui.ntli.net...
> Probably a fairly simple problem but one that's been plaguing me for a
> couple of days... can anyone help?
>
> I have a classic ASP page with a number of text boxes which are updatable.
>
> For convenience I want to add 'tabs' at the top of the page (like a card
> index) as the data to be displayed is split into specific groups (client,
> company, preferences, events).
>
> How do I update any changes to the data and switch to a different page -
at
> the same time? i.e. the user doesn't have to click 'update' (submit
button)
> before changing pages
>
> Sample code is below...
>
> Thanks in advance
> Simon
>

Are you sure you want to update data when switching between tabs? What
happens of the user doesn't complete filling in stuff on the other tabs?
How does the user indicate they have finished entering their data?

Would it be more preferable simply to let the user navigate between tabs as
they like without submitting any data and have a single submission of the
data when they are happy with it?