Constructing a URL for a Web GOTO

mlapl1 Community Member Posts: 349 ☆ Roadie ☆

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. 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!


  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Yes you can.

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

    Say in the end that is... variable myURL = ""

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


  • klaatu
    klaatu Community Member Posts: 988
    To take this one step further lets say you made myURL = 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 I think this is what Math means when he says "Create a variable… you can construct that one anyway you want / need.."
  • mlapl1
    mlapl1 Community Member Posts: 349 ☆ Roadie ☆
    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!!
  • mlapl1
    mlapl1 Community Member Posts: 349 ☆ Roadie ☆
    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.


  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Mmmmm... depends a bit what you see as a page...

    Say you have a Lectora.awt of 1009x662 ( 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.

  • timk
    timk Community Member Posts: 1,207 ♦ Idol ♦
    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.
  • mlapl1
    mlapl1 Community Member Posts: 349 ☆ Roadie ☆
    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.
  • mlapl1
    mlapl1 Community Member Posts: 349 ☆ Roadie ☆
    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.
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Ooooooooh just a popup :-) What's in a name ;=)
  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    I love learning something new every day! Great thread :)