That function gets called in the nav as you go from page to page. I have
about 20 form pages each with a form called "theform". I want to be able to
have the user select the checkboxs and fill in the form fields ect they want
then just click to another page and have that info saved without them having
to hit a submit button then going to the nav. They have the option to hit
the submit button, but a lot of users just want to select what they want on
that page and go off to the next with just one click.

Jeremy

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 20, 2006 1:30 PM
To: CF-Talk
Subject: RE: javascript submit form and then location in same function

> I have <hrefs> that call this function
> 
> <script type="text/javascript">
> function submitandgo (url)
> {
> window.document.theform.submit();
> window.document.location=url;
> }
> </script>
> 
> If I don't use the location portion it works fine, but it 
> seems to boot off to the new page before the form submit. An 
> suggestions? Is there a way in cf to submit a form and then 
> do a cflocation. Perhaps I need some more js code in there.

Submitting a form typically causes the location to change anyway. Also, I
think that the location object is a child of the window object, not the
document object. What exactly are you trying to accomplish?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232936
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to