NetTalk Central

Author Topic: Calling a hand-coded URL - how?  (Read 2881 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Calling a hand-coded URL - how?
« on: January 20, 2012, 07:35:04 AM »
In a memory form I collect a bunch of data. When the user clicks a button I do a lot of background work an when that's been done I want to call another page in my source code (because I only now know which page to call). But how do I do that? I'm stuck.

Peter

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calling a hand-coded URL - how?
« Reply #1 on: January 20, 2012, 10:34:08 PM »
There are a number of approaches here. I'm not sure which is right for you because I'm not sure how long a "lot of work" takes. If it's longer than a few seconds (say 3 seconds) then I'd go the "progress bar" route - let them press the button, and you can keep them updated with progress, culminating in a link for them to press when the task is completed.

Another approach, if the lot-of-work- is quick is to make the button a dead simple normal button (not a submit).
Then do your work in the "server side code" embed, culminating in the setting of say loc:url. You can then pass a script back to the browser which will trigger a page load;

p_web.script('location.href='''&clip(loc:url)&'''')

cheers
Bruce






peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Calling a hand-coded URL - how?
« Reply #2 on: January 21, 2012, 06:59:55 AM »
Hi Bruce,

I'm using the second approach and the script part was what I was missing.
It's working now, thank you!

Peter