PDA

View Full Version : Web object


REM
06-08-2006, 01:26 PM
Sorry for stupid question... it`s my first project..:rolleyes

I created project with menu bar and two pages:
page1
page2

every page contains 1 web object - web1 with default url:
http://myproject.com/index.php

also i created script for function keys in page1/properties/script/On Key:
if e_Key == 112 then
Page.Jump("page1");
elseif e_Key == 113 then
Page.Jump("page2");
--
elseif e_Key == 114 then
Page.Jump("page1");
Web.LoadURL("Web1", "http://myproject.com/index.php?s=888");
elseif e_Key == 115 then
Page.Jump("page2");
Web.LoadURL("Web1", "http://myproject.com/index.php?s=999");
end
and same script on page2/properties/script/On Key

Next i`m created script for main menu project/actions/On Menu:
if e_ID == 999 then
Application.Exit(0);
elseif e_ID == 101 then
Page.Jump("page1");
elseif e_ID == 102 then
Page.Jump("page2");
--
elseif e_ID == 103 then
Page.Jump("page1");
Web.LoadURL("Web1", "http://myproject.com/index.php?s=666");
elseif e_ID == 104 then
Page.Jump("page2");
Web.LoadURL("Web1", "http://myproject.com/index.php?s=999");
end

------------------------------------------
When (in compiled and running project) i`m pressing F3, page1 loads with default (http://myproject.com/index.php) url in Web1 window.
Also when i`m select this pages ( http://myproject.com/index.php?s=999 or http://myproject.com/index.php?s=666 ) from main menu - nothing happened.. pages always opened with default (http://myproject.com/index.php) url in Web1 window :huh

Where i`m missing ? Help please a.s.a.p
Thanks in advance..

bule
06-08-2006, 02:54 PM
Your script stops processing after a Page.Jump action.

To overcome this, you could try inserting this code before any other in your project:

_NoExitScriptOnPageJump=true;
_NoExitScriptOnPageJump
If set to true, action script in an event will continue to be executed after a Page.Jump or Page.Navigate action is called. If set to false, the execution of the action script in the event will halt after a Page.Jump or Page.Navigate is called. This variable is set to false by default.

REM
06-08-2006, 03:30 PM
Your script stops processing after a Page.Jump action.

To overcome this, you could try inserting this code before any other in your project:

_NoExitScriptOnPageJump=true;
Thanks bule, but (i`m so confused :o ) where i can insert this script?
in Global Function ?

bule
06-09-2006, 07:05 AM
Add it in Project Actions > On Startup