Explore the community Forums Lectora Lectora Questions & Answers Constructing a URL for a Web GOTO

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #360481 Score: 0
    Profile photo of Andrew Lian
    Andrew Lian
    Member
    beginner
    intermediate
    friend finder
    advanced
    contributor
    wise owl
    curious george
    profile
    11 pts
    @mlapl1

    Hello

    Lectora has a “Goto Web” action. Is it  possible to construct the URL that is inserted there? I have tried to add a VAR(word) variable to the URL string e.g. http://dictionary.com/browse/VAR(dictionary_word). BUT it reads this as a literal and not a variable. I could write a little JS script but would, of course, prefer to use ready-made Lectora structures.

    Any thoughts? Thanks!

    #360483 Score: 3
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    67 pts
    @mnotermans5114

    Yes you can.

    Create a variable… you can construct that one anyway you want / need..

    Say in the end that is… variable myURL = “http://mywebpage.com”

    In the action ‘Go to WebAdress’ you add it like this: VAR(myURL)

    Regards,

    Math

    This post has received 3 votes up.
    #360526 Score: 4
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    142 pts
    @Klaatu

    To take this one step further lets say you made myURL = http://www.nbc.com. You can make another variable, we’ll call it subPage with a value of ‘/dateline’ (no quotes). When you go to modify the original URL with a modify variable action, the value you need is Var(myURL)Var(subPage). No spaces, no addition operator – just the variables adjacent to each other. Now when you open myURL it will open to http://www.nbc.com/dateline. I think this is what Math means when he says “Create a variable… you can construct that one anyway you want / need..”

    This post has received 4 votes up.
    #360551 Score: 0
    Profile photo of Andrew Lian
    Andrew Lian
    Member
    beginner
    intermediate
    friend finder
    advanced
    contributor
    wise owl
    curious george
    profile
    11 pts
    @mlapl1

    Great information from both of you, the most important being (for me) that you can use either a string literal in the URL or a Variable, but cannot mix them. That understanding solves a lot of problems/frustration. Thanks Math and Darrel!!

    #360656 Score: 0
    Profile photo of Andrew Lian
    Andrew Lian
    Member
    beginner
    intermediate
    friend finder
    advanced
    contributor
    wise owl
    curious george
    profile
    11 pts
    @mlapl1

    Now for the next exciting episode.

    Is it possible to show TWO pages side by side? I have tried several settings but the best I have managed to achieve is that I can size an position the first page (theoretically) the second page but no matter what settings I use the second page just replaces the first page (if it gets that far – I can get it to do this if I insert a delay in the display of the second page).

    Anyway, the idea is to display two dictionaries side by side: one English-English and the other English-Thai. Everything works perfectly in terms of word lookup etc but no way that I can find t show the two pages side by side.

    🙁

    Andrew

    #360658 Score: 1
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    67 pts
    @mnotermans5114

    Mmmmm… depends a bit what you see as a page…

    Say you have a Lectora.awt of 1009×662 ( Lectora 16 )… page A with En_en dictionary, page B with  En_Thai..
    Only way i can think off to show both simulteanously is using external HTMLObject with 2 extHTMLs… 1 loading page A, one showing page B.

    In Lectora 17 there might be an option to ‘abuse’ the  ‘Seamless play’ options to show both. Cant think how now, but sure interesting to try.

    I do know several other coding languages have options like ‘Partial Pages’ in which you can define a part of a HTML that loads with AJAX or something else.. but knowing you want to use as little javascript as possible that might not be an option.

    ~Math

    This post has received 1 vote up.
    #360662 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    201 pts
    @timk

    If you just want a second window all you’ll have to do is use different “Window Names” for the two Go to actions in the New Window properties. Default is “Popup Window” for both, that’s why both are opened in the same window, i.e. the second replaces the first. Change one of them to open the two urls in different windows.

    This post has received 1 vote up.
    #360664 Score: 0
    Profile photo of Andrew Lian
    Andrew Lian
    Member
    beginner
    intermediate
    friend finder
    advanced
    contributor
    wise owl
    curious george
    profile
    11 pts
    @mlapl1

    Thank you Math and thank you Tim. I did not think of changing the second name – but I think you are right as that would explain why the second page finds itself inside the first page. I need to get used to giving names that are different for each object.

    #360666 Score: 0
    Profile photo of Andrew Lian
    Andrew Lian
    Member
    beginner
    intermediate
    friend finder
    advanced
    contributor
    wise owl
    curious george
    profile
    11 pts
    @mlapl1

    Yes … that was it – the name – I thought the name was just cosmetic, i.e. to help the lesson writer remember which was which – but it is not. I think it is referenced internally by Lectora’s JS – Thanks Tim. Saves  a whole lot of trouble/time.

    #360668 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    67 pts
    @mnotermans5114

    Ooooooooh just a popup 🙂 What’s in a name ;=)

    #361058 Score: 0
    Profile photo of Jennifer Valley
    Jennifer Valley
    Moderator
    contributor
    beginner
    friend finder
    advanced
    lectora beginner
    verified member
    wise owl
    profile
    picture perfect
    curious george
    101 pts
    @jvalley4735

    I love learning something new every day! Great thread 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.