Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2005
    Posts
    19

    html triggers Screen.Next()

    Boy.. here is a good one. On my scrolling html screen I have the Next button visible but not enabled. How can I enable the next button with html or my php script?

    Carter

  2. #2
    Join Date
    Jul 2003
    Posts
    712
    Hello,

    I'd do something like this:

    1. Place the following code onto the On Ctrl Message event of your scrolling html screen:
    Code:
    -- These actions are triggered by the controls on the screen.
    
    if e_MsgID == MSGID_ONNAVIGATE then
    	sPoundLocation = String.Find(e_Details.URL, "#", 1, false);
    	Dialog.Message("sPoundLocation", sPoundLocation);
    	if sPoundLocation ~= -1 then
    		sAnchor = String.Right(e_Details.URL, sPoundLocation - 1);
    		Dialog.Message("sAnchor", sAnchor);
    		if sAnchor == "enable_next" then
    			DlgButton.SetProperties(CTRL_BUTTON_NEXT, {Enabled=true});
    		end
    	end
    end
    2. Use the following HTML code:
    Code:
    <a href="#enable_next">enable</a>
    Now, this does have the 'bad' effect of loading up an 'empty' html page (do it in an empty project, you'll see what i mean). But you can get around this by adding a path to your html file before the '#' in that link.

    Give it a try, let me know how it works for you.

  3. #3
    Join Date
    Jun 2005
    Posts
    19
    Yes, that works... But lets say that my html scrolling screen is my html registration form page. At the bottom of that html form is the submit button (reason that the next button is not enabled). So the user fills out the registration page and hits submit. My php script does what it needs to do and reloads with the php echo results. How can I trigger the enabling of the next button once the page reloads? Can I have the Next button submit the form and and its variables to the script from that html screen?

  4. #4
    Join Date
    Jun 2005
    Posts
    19
    can I ad the #enable_next to the end of the reloaded html page?

  5. #5
    Join Date
    Oct 2003
    Location
    Richmond, VA
    Posts
    143
    I have never used a scrolling html screen before, but I wonder if the
    if e_MsgID == MSGID_ONNAVIGATE then
    construct would let you catch a meta refresh as well as a link nav...

    If so, your script could return the results as well as a meta refresh of 5 seconds or so, then redirect to a 'Click Next to continue' page that simply enables the next button instructs the user to click it to continue...the string.find would then search for the above string or a special comment on the html page...either would work.

    That would also allow you to return a different response (without the meta refresh to the 'continue' page) if the user's data didn't validate and needed to be modified.

  6. #6
    Join Date
    Jul 2003
    Posts
    712
    Step 1: Your users will register through the scrolling HTML screen.

    After that, try having your script jump to another page if successful. I think you can do that by adjusting the URL in the headers section of your HTML (php) page.

    Then, use the technique above to capture the URL being browsed to, and if it matches the successful URL, enable the next button (or just do a Screen.Next action, and save the user a click).

    Quote Originally Posted by toad
    Yes, that works... But lets say that my html scrolling screen is my html registration form page. At the bottom of that html form is the submit button (reason that the next button is not enabled). So the user fills out the registration page and hits submit. My php script does what it needs to do and reloads with the php echo results. How can I trigger the enabling of the next button once the page reloads? Can I have the Next button submit the form and and its variables to the script from that html screen?

  7. #7
    Join Date
    Jun 2005
    Posts
    19
    Well, I got it working but under a very simplistic approach. What i did was attach to code Desmond so graciously supplied to my actually registration html page. When the user gets his registration confirmation (php generated) page, the user click the "NEXT" button in the html. it links to the #next_enable, like the example supplied. Instead of enabling the next button. I just send the installer to the Screen.Next(). works like a charm. Thanks again.

    Carter

  8. #8
    Join Date
    Oct 2003
    Location
    Richmond, VA
    Posts
    143
    The simpler the better! And saves the user a click as well.

  9. #9
    Join Date
    Jul 2003
    Posts
    712
    Glad you got it working!

    Desmond.

Similar Threads

  1. SQLite data to HTML file
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 16
    Last Post: 10-23-2004, 03:19 AM
  2. Mac autostart function???
    By Protocol in forum AutoPlay Media Studio 4.0
    Replies: 21
    Last Post: 06-26-2003, 10:25 AM
  3. HOWTO: Open an HTML Help File to a Specific Topic
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-01-2002, 02:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts