NetTalk Central

Author Topic: "Send new value to server" not working, except in IE (PR17)  (Read 2453 times)

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
"Send new value to server" not working, except in IE (PR17)
« on: October 31, 2008, 03:17:08 AM »
Create a button with a hyperlink :




Click "Send new value to server":




In the server code i put a simple STOP:




Press the button:




If you use Firefox3, Safari or Chrome and press the button, while you ARE taken to the correct URL, the stop message does NOT appear. i.e. it is not running the Server Code.

If I use IE7 it works correctly:





« Last Edit: October 31, 2008, 03:18:55 AM by spot1701 »
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: "Send new value to server" not working, except in IE (PR17)
« Reply #1 on: October 31, 2008, 06:03:27 AM »
Hi Bryan,

If you put a hyperlink on the button, then that triggers a synchronous GET on the server.

If you put "send new value to server" then that triggers an asynchronous GET.

Putting these 2 together on the same button will lead to weird stuff happening.

You don't really have control over the _order_ of the Gets, so having the button do _both_ these things is not ideal. Certainly not if the one will have an effect on the other. It's also possible that the browser will only do the synchronous get, as the "current page" goes out of scope when this GET is done. It's _possible_ that I could fiddle with the JS a bit to try and make it more predictable - but that only covers the client. You still have no guarantee of the order in which things will happen on the server.

Rather, get all the information you want into the URL and process just the Syncronous Get.

Cheers
Bruce


spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: "Send new value to server" not working, except in IE (PR17)
« Reply #2 on: October 31, 2008, 06:12:20 AM »
Shame, as it works fine with IE. But then I can't force everyone to use that. I couldn't bring myself to be that cruel ;)

For future then you might want to make that clear, or disable the relevant options, because I was going to use that a lot as it "appeared" to work.
Thanks

Bryan