Announcement

Collapse
No announcement yet.

How do I assign PageJump to a string var which is loaded OnPreLoad?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I assign PageJump to a string var which is loaded OnPreLoad?

    Solved:
    I have a Quiz with signup page and the subjects pages ie Math, Phy, Chem. On signup page I have combobox1, 2, 3 with same subjects in its index. When the combobox is selected it submit the index data to var.

    Solved:
    Then when click start it jumps to the next page which I have Label1, 2, 3 and call the var to load respectively based on user selection from the combobox using LabelSetText.

    Unsolved:
    Now what I want is, when user click on Label1 and var stored by a Label.GetText equal Mathematics then a PageJump else if Physics elseif Chemistry end

    Example:
    --when click on Label1
    nSub1 = Label.GetText("Label1");

    If nSub1 = Mathematics then
    PageJump("Math");

    elseif nSub1 = Physics then
    PageJump("Phy")

    nSub1 = Chemistry then
    PageJump("Chem");

    End




    I will really appreciate if anybody can help I am not a programmer but just trying to do something reasonable for my students.

  • #2
    If I understood the question, you need something like this:
    Code:
    nSub = Label.GetText("Label1");
    PageJump(nSub);
    Ulrich

    Comment


    • #3
      Thanks for your concern. But it seem u dint get me. My project has up to 12 subjects and a user is to take only 3 subjects of their choice. On the first page a registration with the 12 subjects is provided to select only 3 and click next. The 2nd page has 3 Labels that shows the 3 selected subject.

      My problem is, how do I call the page that belongs to each subject when clicked in the label that loaded it?

      Thanks

      Comment


      • #4
        Hi Ulrich,
        This works like cham.

        local sub1 = Label.GetText(this);

        if sub1:match "Mathematics" then
        Flash.Load("Flash1", "AutoPlay\\Flash\\mathematics.swf", true, false);

        Thanks for your concern.

        I have another new problem again. How do i use this use this technic to fetch user name at login, lets say

        local sUserName = Input.GetText(this);

        if sUserName:match "sUserName" then
        PageJump("CorelDraw");
        else
        ---
        end

        Pls. How do i achieve this user group technic at user login page. pls help i really need help.

        Comment


        • #5
          Sorry "Fetch user name from a sqlit3 to take him to where he belongs

          Comment

          Working...
          X