NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: peterH 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
-
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
-
Hi Bruce,
I'm using the second approach and the script part was what I was missing.
It's working now, thank you!
Peter