View Full Version : Bug: Page.Jump() : Stops Script
RizlaUK
02-10-2008, 05:36 PM
Hi,
im useing a function in globals an half way through the function i need to jump page and continue the rest of the script, but anything after the Page.Jump command dosent get fired, i thought the whole point of global was to make it available to the entire application.
is this a bug, or is this intended ?
Darryl
02-11-2008, 08:11 AM
The Page.Jump action exits the script on the current event , so any action script occurring after it will not be executed. This functionality is by design.
If you set the variable _NoExitScriptOnPageJump to true, the remaining script in the action will be processed.
Ya see, you can have it both ways :)
RizlaUK
02-11-2008, 10:15 AM
This functionality is by design.
ok, i thought so.
_NoExitScriptOnPageJump
ah ha, i knew there had to be a way round it, works like a dream now
maybe the Page.Jump function could use a extra argument
Page.Jump("Page1",true) or false for exit current script
well, heres a quick function (in case anyone has the same issue)
function PageJumpEX(strPage,BOOL)
if BOOL then
_NoExitScriptOnPageJump=true
else
_NoExitScriptOnPageJump=false
end
Page.Jump(strPage);
end
-- this is just a test wrapper function
function Test(strPage,BOOL)
Dialog.Message("Before", "This dialog comes b4 the page jump.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
PageJumpEX(strPage,BOOL)
Dialog.Message("After", "This dialog comes after the page jump.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
That is the beauty of the APMS... it just works.
Darryl
02-12-2008, 06:58 AM
Sorry RizlaUK for not pointing that out, I was rushed yesterday. And thank you Worm for bringing up that feature.
With the number of features in AMS, who could possibly remember all of them at the drop of a hat. I just used this feature the other day, so it was fresh in my mind.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.