NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mike Grigsby on January 17, 2008, 11:16:52 PM

Title: URL on Save or Cancel - Can't be a static URL?
Post by: Mike Grigsby on January 17, 2008, 11:16:52 PM
On a form where the user presses the Cancel button, I want it to go to a static web page on my website (outside the application). When I use 'http://www.mywebsite.com', it puts the URL in the address field of the browser, but shows a message that the page can't be found. If you press Enter, it loads the page.

Is there a better way to direct the user to a static web page or am I missing something? Thanks!
Title: Re: URL on Save or Cancel - Can't be a static URL?
Post by: Bruce on January 22, 2008, 03:31:39 AM
as long as the URL is completely and correctly formed, there should be no problem setting the url to be attached to the Cancel button.

HOWEVER

A (cancel) button does a POST. So it's not just a "link" - it's also sending _that_ server the form details. Possibly (and probably) that server doesn't like the form, and complains (by not processing the POST). The browser, when you press Enter, does a GET.

If you let me know the URL in question I can try it out and suggest some alternatives. The most obvious alternative I can think of is to make sure the Cancel button is done as a form-field-button rather than using the built-in Cancel button.

cheers
Bruce
Title: Re: URL on Save or Cancel - Can't be a static URL?
Post by: Mike Grigsby on January 22, 2008, 08:56:21 AM
Thanks Bruce, the URL is: http://www.hrsnap.com/hrsnap/html/thank_you.html

I'm using Web to capture data and wanted to return to a thank you page afterwards.
Title: Re: URL on Save or Cancel - Can't be a static URL?
Post by: Bruce on January 24, 2008, 11:03:27 PM
Hi Mike,

Just to be clear;

>> I'm using Web to capture data and wanted to return to a thank you page afterwards.

But your original note specified the _Cancel_ button.
This is important because there's relatively little code happening under a "Cancel" button, and forms are allowed to be abandoned.

But an _OK_ button is a different animal. There's a lot of code under the Ok button (validating, saving etc) that simple won't run if you set the URL of the OK button to a different web server.

So before we continue I think it's a good move for you to clear up my confusion <g>..

Cheers
Bruce