Web Object Browser jump and go back

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • josecastello
    Forum Member
    • Dec 2002
    • 12

    Web Object Browser jump and go back

    I am using a webbrowserobject to jump to other pages of my AM4 project using this (On Navigation Complete):

    <IR_ACTIONS_LIST>
    <Action name="Get Property">
    <Type>99</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%myURL%</Variable>
    <ObjectName>WebBrowser1</ObjectName>
    <Property>URL</Property>
    </Action>
    <Action name="Right">
    <Type>23</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%myURL%</Variable>
    <SourceString>%myURL%</SourceString>
    <NumberOfCharacters>5</NumberOfCharacters>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%myURL% = "Video"</Condition>
    </Action>
    <Action name="Jump">
    <Type>1</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <PageName>Videos</PageName>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%myURL% = "Artic"</Condition>
    </Action>
    <Action name="Jump">
    <Type>1</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <PageName>Articulos</PageName>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%myURL% = "Close"</Condition>
    </Action>
    <Action name="Exit">
    <Type>2</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    </IR_ACTIONS_LIST>

    In the linked AM4 pages (let´s call it "Video") I have a textbox to go back to this first page containing the webobjectbrowser. But I immediately return to the linked paged ("Video").
    Is there anyway to go around this?
    You can download the project to see what I am saying:



    Thanks in advance for your comments.


  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9741

    #2
    Re: Web Object Browser jump and go back

    Hi Jose, it's very simple. Just add a WEB BROWSER OBJECT > NAVIGATE TO > %SrcDir%/index.html action to your first page's "Onshow" state so that the URL is refreshed then it works fine.

    What happened is that you were sending back to the page but not refreshing the URL so your IF statements were still reading %myURL% as "video", know what I mean?

    Whenever you are using the URL to create navigation links between a web browser and your main application pages please be sure to add the above action to all pages which contain a web browser object. (OnShow)

    BTW the action should look like this:

    WebBrowserObject[WebBrowser1].NavigateTo ("%SrcDir%\index.html")

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    • josecastello
      Forum Member
      • Dec 2002
      • 12

      #3
      Re: Web Object Browser jump and go back

      Corey,
      I have tried that and doesn´t work. I know what to do (refresh that page) but don´t know how. Any other suggestion?
      Thanks.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9741

        #4
        Re: Web Object Browser jump and go back

        No it works just fine. Take a deep breath and start from step 1, being careful to follow along and think about what you're doing as you go, it's simple you'll see. [img]/ubbthreads/images/icons/smile.gif[/img]

        Think about the logic here, you are using your button to append the URL and then doign a page jump but your are trying to send people back without restoring the appended URL to it's original unappended form therefore the front page stays in the "jump loop". So to combat that all you have to do is reset your URL everytime you visit the master menu page. Makes snese. [img]/ubbthreads/images/icons/smile.gif[/img]

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        Working...
        X