NetTalk Central

Author Topic: URL on Save or Cancel - Can't be a static URL?  (Read 4674 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
URL on Save or Cancel - Can't be a static URL?
« 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!
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: URL on Save or Cancel - Can't be a static URL?
« Reply #1 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

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: URL on Save or Cancel - Can't be a static URL?
« Reply #2 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.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: URL on Save or Cancel - Can't be a static URL?
« Reply #3 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