Announcement

Collapse
No announcement yet.

Web object interaction again

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

  • Worm
    replied
    Re: Web object interaction again

    Are you using the javascript_quiz.htm that I modified?

    In the javascript that computes the total, the ELSE section should look like this:

    document.quiz.totalscore.value = "You have " + tot + " correct answer(s) out of 10.";
    window.location.href="javascript_quiz.htm" + "#totalscore=" + tot;

    It works perfectly here. See the screen shot.
    Screen Shot

    Leave a comment:


  • josecastello
    replied
    Re: Web object interaction again

    Thanks for your patience, Worm. You have understood perfectly what I am trying to accomplish. I downloaded your AMS file, but still doesn´t work. I got nothing in the Text Object (txtTotal) where the variable %TotalScore% is supposed to appear.

    Leave a comment:


  • Worm
    replied
    Re: Web object interaction again

    Maybe I'm a little thick skulled, but I don't see why this wouldn't work. Unless I totally misunderstand what you are trying to accomplish. I modified the javascript in you HTM file and made another sample app. Once you check the score, AMS will have a variable named %TotalScore% with same value as your HTM/Javascript variable.

    Download Sample App

    Leave a comment:


  • josecastello
    replied
    Re: Web object interaction again

    Sorry to bother you again. Can you post the same example but using my web object (http://www.secpre.org/Todelete/javascript_quiz.htm) instead of yours. I have tryied but I cannot get it to work.

    Leave a comment:


  • Corey
    replied
    Re: Web object interaction again

    Worm's method will work just fine, try it. You can easily pass that value (or any value) from your web object to your app via the URL.

    Corey Milner
    Creative Director, Indigo Rose Software

    Leave a comment:


  • josecastello
    replied
    Re: Web object interaction again

    I guess you will need to copy and paste the previous link into your browser to get it work. Here it is again:
    http://www.secpre.org/Todelete/javascript_quiz.htm

    Leave a comment:


  • josecastello
    replied
    Re: Web object interaction again

    Worm, that´s brilliant. But I guess it won´t work in my case, because the variable is stored in "Totalscore" but the value is not visible on the HTML code. Here you have the web object that I want to include in my AMS project. My plan is being able to print only the score (Totalscore) from AMS, so I need to get that variable (I don´t want to print the whole web object). Thanks for your help.
    http://www.secpre.org/Todelete/javascript_quiz.htm

    Leave a comment:


  • Worm
    replied
    Re: Web object interaction again

    This probably is a crude way of doing, but it works.

    Download

    Leave a comment:


  • josecastello
    replied
    Re: Web object interaction again

    Worm, can you be a little more especific (please, post the code if possible)?. Thanks a lot for your help.

    Leave a comment:


  • Worm
    replied
    Re: Web object interaction again

    Could you use the action of your form to pass the score in the URL and parse the information from the URL on Navigate Complete.

    Leave a comment:


  • josecastello
    started a topic Web object interaction again

    Web object interaction again

    I have a web object containing a javascprit that creates a variable called "totalscore".
    Well, this variable is shown on this web object by the following method (form):
    <input type="text" size="4" name="totalscore">
    Is there anyway to tell AMS to get that variable from the web object.
    Thanks again.
Working...
X