Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 5 123 ... LastLast
Results 1 to 15 of 71

Thread: Quiz results

  1. #1
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quiz results

    I am using a Javascriptkit.com quiz and bravenet.com emailforwarding for the quiz takers email and name information. I need to obtain the results from the quiz incorporated in this information. Bravenet can not figure this out, and I need help badly. To see the page I am referring to go to www.dreamsonthefly.com/novemberquiz.html

    Take the quiz (or not, it doesn't matter), then click on grade me. It takes you to the results page and below it is the bravenet email forwarding information. All I am getting is the name, where, and email info. I really need the results.

    Thanks in advance
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Heh Rhonda;

    In order to pass data in a form.
    The data must be in the form.

    Try this:
    Code:
    <!-- Start Bravenet.com Service Code -->
    <div align=center>
    <div style="border:1px solid #999999; width:255px; margin-bottom:5px;background-color:#F2F4FA;">
    <form name="senddata"action="http://pub7.bravenet.com/emailfwd/senddata.php" method="post" enctype="multipart/form-data" style="margin:0px;">
    
    <input type="hidden" name="CORRECT" value="document.result.p.value">
    <input type="hidden" name="INCORRECT" value="document.result.T2.value">
    <input type="hidden" name="PERCENTAGE" value="document.result.q.value">
    
    <div style="background-color:#DBE0F5; padding:3px; font:12px arial; color:black;"><b>Newsletter Contact Form</b></div>
    <div style="padding:10px; font: normal 12px Arial; text-align:left;">What is your name?<br />
    <input type="text" name="name" size="34" style="width:230px;" /><br />
    Where are you from?<br />
    <input type="text" name="where" size="34" style="width:230px;" /><br>
    E-mail address?<br />
    <input type="text" name="replyemail" size="34" style="width:230px;" /></div>
    <div align="center">
    <input type="submit" name="submit" value=" Send ">
    <input type="hidden" name="quizanswers" size="1"
    style="border: 0px solid black; height: 0px; width: 0px;" value="587815930" />
    <input type="hidden"  style="border: 0px solid black; height: 0px; width: 0px;" name="MAX_FILE_SIZE" value="2000000">
    <input type="hidden"  style="border: 0px solid black; height: 0px; width: 0px;" name="cpv" value="2" />
    <input type="reset" name="reset" value=" Clear "></div>
    </form>
    <div align="center" style="margin:10px;">
    <a style="font: bold 10px tahoma,arial;  text-decoration: none;" 
    href="http://www.bravenet.com" target="_new">
    powered&nbsp;by&nbsp;
    <img src="http://images.bravenet.com/bravenet/images/poweredby.gif"border="0" align="absmiddle" alt="Powered by Bravenet" />&nbsp;bravenet.com</a></div>
    
    <script>
    document.senddata[5}.value=document.cookie
    </script>
    </div>
    </div>
    <!-- End Bravenet.com Service Code -->
    ....Willy

  • #3
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I must be an idiot

    Hey Willy...Thank you for answering my post. I have been trying this since last week. And I think I've screwed up everything as far as the results are concerned.

    I can't figure out how to get the info. above into the html file for the results. Help???
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I must be an idiot

    Originally posted by dreamsonthefly
    I can't figure out how to get the info. above
    into the html file for the results. Help???
    Heh;

    I came over from the Javascript Forum
    to see how you were making out.

    You need to have the values you wished sent with the form IN
    the form. Right now those values are in another form named result.

    What I did above is use hidden form inputs to take the values
    from the result form and put them into your senddata form.

    I also removed some erroneous code so just
    replace your current send form codes with the above.

    ....Willy

  • #5
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trying

    I am trying so hard, but getting the old one edited and the new codes into it, then opening the FTP files and trying to find the new one and copying it.....sheesh..this is tough. but as you can prob. tell, I am not one to give up.

    I will let you know how I fare
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #6
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bravenet

    This is the result:


    The system has failed to log you in.


    Please verify your username and password and try your login again. If you can not remember your username and/or password, try our Lost Password utility to try and retrieve them.

    For additional assistance, visit our Help Center.

    As I mentioned eariler, they were unable to assist today. I think they gave up
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #7
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down Noper

    It came back the same way. No longer do I get the bravenet msg. But I get the name, where, and email again.
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #8
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try these codes.
    I wrote these last week but I never heard back from you
    and I did not know which direction you were going with
    the form codes. If they work and send the correct data.
    You should be able to remove the prompts and replace
    them with your text based form codes.

    Code:
    <html>
    <head>
    <title>Instant Quiz Results</title>
    <script type="text/javascript">
    <!--//
    function setCookie() {
    duit = new Date();
    duit.setTime(duit.getTime() + 30*24*60*60*1000);
    var expString = "; expires=" + duit.toGMTString();
    document.cookie = 'tookTest' + expString;
    }
    function myMail() {
    var dc = document.cookie;
    if(dc.match('tookTest')) {
    notice = "Thank You for your interest in taking our November Test.\n";
    notice+= "BUT, YOU MAY ONLY SUBMIT THE TEST ONE TIME!\n";
    notice+= "You will now be redirected to Dreams On The Fly\'s Home Page.\n";
    alert(notice);
    window.location.replace('/');
    }
    else {
    document.mail.CORRECT.value = correct;
    var sub =  correct+ " correct answers on your November Test!";
    var from = prompt('Enter Your Name:','');
    if (!from) {
    alert('You must enter your name');
    return false;
    }
    else {
    document.mail.NAME.value = from;
    }
    var contact = prompt('Enter Your Email Address:','');
    if (!contact) {
    alert('You must enter your e-mail address');
    return false;
    }
    else {
    document.mail.CONTACT.value = contact;
    }
    var comment = prompt('Any Comments?:','');
    if (!comment) {
    comment = 'No Comments Made';
    }
    else {
    document.mail.COMMENT.value = comment;
    }
    document.mail.action="http://pub7.bravenet.com/emailfwd/senddata.php?subject="+sub;
    document.mail.submit();
    window.location.replace('/');
    }
    }
    // -->
    </script>
    </head>
    
    <body bgcolor="#FFFFFF" onunload="setCookie()">
    <p align="center"><strong><font face="Arial">
    <script src="quizconfig.js"></script>
    <big>Instant Quiz Results</big></font></strong></p>
    <div align="center"><center>
    <table border="0" cellspacing="0" cellpadding="0">
    <form name="result" method="POST" action="">
      <tr>
        <td width="100%"><table border="0" width="100%" cellpadding="0" height="116">
            <tr>
              <td height="25" bgcolor="#D3FFA8"><strong><font face="Arial"># of questions you got right:</font></strong></td>
              <td height="25"><p><input type="text" name="p" size="24"></td>
            </tr>
            <tr>
              <td height="17" bgcolor="#D3FFA8"><strong><font face="Arial">The questions you got wrong:</font></strong></td>
              <td height="17"><p><textarea name="T2" rows="3" cols="24" wrap="virtual"></textarea></td>
            </tr>
            <tr>
              <td height="25" bgcolor="#D3FFA8"><strong><font face="Arial">Grade in percentage:</font></strong></td>
              <td height="25"><input type="text" name="q" size="8"></td>
            </tr>
          </table>
        </form>
        </td>
      </tr>
    </table>
    </center></div>
    
    <div align="center"><center><p>
    <form name="mail" method="post" enctype="multipart/form-data" style="margin:0px;">
    
    <input type="hidden"  name="NAME"  value="">
    <input type="hidden"  name="CONTACT"  value="">
    <input type="hidden"  name="COMMENT"  value="">
    <input type="hidden"  name="CORRECT"  value="">
    
    <script type="text/javascript">
    var wrong=0
    for (e=0;e<=2;e++)
    document.result[e].value=""
    
    var results=document.cookie.split(";")
    for (n=0;n<=results.length-1;n++){
    if (results[n].charAt(1)=='q')
    parse=n
    
    }
    
    var incorrect=results[parse].split("=")
    incorrect=incorrect[1].split("/")
    if (incorrect[incorrect.length-1]=='b')
    incorrect=""
    document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions
    document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
    for (temp=0;temp<incorrect.length;temp++)
    document.result[1].value+=incorrect[temp]+", "
    correct = totalquestions-incorrect.length;
    document.mail.CORRECT.value = correct;
    </script>
    
    <input type="button" value="Return to Home Page" name="B1"
      onClick="location.replace('/')"><input type="button" value="View Solution" name="B2"
      onClick="showsolution()"><input type="button" value=" Submit Results" onClick="myMail()"></p>
      </center></div>
    </form>
    
    <p id="footnote" align="center"><font face="arial" size="-1">Quiz script provided by<br>
    <a href="http://www.javascriptkit.com">JavaScriptKit.com</a></font></p>
    </body>
    </html>
    I just tested these codes. It is submitting, but other than alerts
    which indicate it is submitting the data. Only you would know
    what you recieve on your end.

    Good Luck;
    .....Willy

    Edit: Fixed the "Correct" number of answers variable.
    Last edited by Willy Duitt; 11-11-2003 at 07:53 AM.

  • #9
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Will try them, but first?

    When I copy and paste them:

    1) where should I put them, I am having problems with this
    2) do I have to name them results.html
    3) the easiest way to get them into the FTP

    I thought maybe you were frustrated with me last week (I had so many questions). I have figured out most everything else, editing the newsletter etc., so I kinda just put it aside for the weekend. My head was hurting and my mind couldn't concentrate on anything else. This is abosolutely the last thing I need in order to get that newsletter out to over 5000 people.

    So thanks again, I will copy the above as soon as I understand the best way to do it.
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #10
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just tested it as well, by pasting it into a blank web page on my site. It looks good, but (yet another question) do I need to change any of it, and can I just put it on the same page as the quiz itself, or as the last one when the user clicks grade me it jumps to another seperate page?
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #11
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rhonda;

    These codes replace the originals.
    Always make copies of working pages
    before making any changes. That way you
    always have a working copy to refer back to.

    Change the name of the original results.htm
    to something else. results2.htm would work.

    Copy and paste these codes into a new
    document and name the document results.htm

    The document has to be named results.htm
    or the Pop Quiz will not work.

    I thought maybe you were frustrated with me last week
    (I had so many questions).
    No, I was not frustrated, but I was disappointed that you left me
    hanging without a fare thee well. I told you in the beggininng we
    would get your problems sorted out but it would be helpful if you
    answered some of my questions.

    If you would tell me which FTP client you are using, I may be
    able to help you resolve that issue. Did you try FTP Voyager as I
    had suggested? FTP Voyager allows you to open both your Web Site
    Directories and Windows Explorer on your PC at the same time. With
    both open, it is a simple matter to drag & drop files from one to another.


    .....Willy

  • #12
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Good morning

    Hey Willy:

    I guess I'm not used to people helping me this way. Thank you for your understanding, I didn't mean to leave you hanging.

    I am using the ftp that Homestead told me to use. Knowing nothing about FTP, the address is

    ftp://ftp.homestead.com/

    As to not try to confuse what is already confused I will try Voyager.

    Okay so let me get this straight

    1. Rename the old results
    2. Save the new codes you sent me last night under the name resluts.html Notepad saves them as a txt file. Is this okay?
    3. Get them into the Homestead ftp site under the files directory

    Let me know if this is all correct.
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #13
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Voyager

    Okay, I have downloaded FTP Voyager, but I am complely lost. I do not know anything about how to set up proxys, or such.
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #14
    Regular Coder
    Join Date
    Nov 2003
    Location
    Seattle
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Okay done with uploading the new code

    Okay the new code is in place. However, when I go to the site and take the test I get:

    <html>
    <head>
    <title>Instant Quiz Results</title>
    <script type="text/javascript">
    <!--//
    function setCookie() {
    duit = new Date();
    duit.setTime(duit.getTime() + 30*24*60*60*1000);
    var expString = "; expires=" + duit.toGMTString();
    document.cookie = 'tookTest' + expString;
    }
    function myMail() {
    var dc = document.cookie;
    if(dc.match('tookTest')) {
    notice = "Thank You for your interest in taking our November Test.\n";
    notice+= "BUT, YOU MAY ONLY SUBMIT THE TEST ONE TIME!\n";
    notice+= "You will now be redirected to Dreams On The Fly's Home Page.\n";
    alert(notice);
    window.location.replace('/');
    }
    else {
    document.mail.CORRECT.value = correct;
    var sub = correct+ " correct answers on your November Test!";
    var from = prompt('Enter Your Name:','');
    if (!from) {
    alert('You must enter your name');
    return false;
    }
    else {
    document.mail.NAME.value = from;
    }
    var contact = prompt('Enter Your Email Address:','');
    if (!contact) {
    alert('You must enter your e-mail address');
    return false;
    }
    else {
    document.mail.CONTACT.value = contact;
    }
    var comment = prompt('Any Comments?:','');
    if (!comment) {
    comment = 'No Comments Made';
    }
    else {
    document.mail.COMMENT.value = comment;
    }
    document.mail.action="http://pub7.bravenet.com/emailfwd/senddata.php?subject="+sub;
    document.mail.submit();
    window.location.replace('/');
    }
    }
    // -->
    </script>
    </head>

    <body bgcolor="#FFFFFF" onunload="setCookie()">
    <p align="center"><strong><font face="Arial">
    <script src="quizconfig.js"></script>
    <big>Instant Quiz Results</big></font></strong></p>
    <div align="center"><center>
    <table border="0" cellspacing="0" cellpadding="0">
    <form name="result" method="POST" action="">
    <tr>
    <td width="100%"><table border="0" width="100%" cellpadding="0" height="116">
    <tr>
    <td height="25" bgcolor="#D3FFA8"><strong><font face="Arial"># of questions you got right:</font></strong></td>
    <td height="25"><p><input type="text" name="p" size="24"></td>
    </tr>
    <tr>
    <td height="17" bgcolor="#D3FFA8"><strong><font face="Arial">The questions you got wrong:</font></strong></td>
    <td height="17"><p><textarea name="T2" rows="3" cols="24" wrap="virtual"></textarea></td>
    </tr>
    <tr>
    <td height="25" bgcolor="#D3FFA8"><strong><font face="Arial">Grade in percentage:</font></strong></td>
    <td height="25"><input type="text" name="q" size="8"></td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </center></div>

    <div align="center"><center><p>
    <form name="mail" method="post" enctype="multipart/form-data" style="margin:0px;">

    <input type="hidden" name="NAME" value="">
    <input type="hidden" name="CONTACT" value="">
    <input type="hidden" name="COMMENT" value="">
    <input type="hidden" name="CORRECT" value="">

    <script type="text/javascript">
    var wrong=0
    for (e=0;e<=2;e++)
    document.result[e].value=""

    var results=document.cookie.split(";")
    for (n=0;n<=results.length-1;n++){
    if (results[n].charAt(1)=='q')
    parse=n

    }

    var incorrect=results[parse].split("=")
    incorrect=incorrect[1].split("/")
    if (incorrect[incorrect.length-1]=='b')
    incorrect=""
    document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions
    document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
    for (temp=0;temp<incorrect.length;temp++)
    document.result[1].value+=incorrect[temp]+", "
    correct = totalquestions-incorrect.length;
    document.mail.CORRECT.value = correct;
    </script>

    <input type="button" value="Return to Home Page" name="B1"
    onClick="location.replace('/')"><input type="button" value="View Solution" name="B2"
    onClick="showsolution()"><input type="button" value=" Submit Results" onClick="myMail()"></p>
    </center></div>
    </form>

    <p id="footnote" align="center"><font face="arial" size="-1">Quiz script provided by<br>
    <a href="http://www.javascriptkit.com">JavaScriptKit.com</a></font></p>
    </body>
    </html>


    No boxes, just the code
    Dreams on the Fly
    http://www.dreamsonthefly.com

  • #15
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Eeek;

    How did you get the file over there?
    It is all currupted with:
    <div class=Section1><pre>&amplt;<span class=GramE>html</span>&ampgt;</pre><pre>&amplt;<span
    class=GramE>head</span>&ampgt;</pre><pre>&amplt;<span
    class=GramE>title&ampgt;</span>Instant Quiz
    Results&lt;/title&ampgt;</pre><pre>&amplt;script
    type=&ampquot;text/javascript&ampquot;&ampgt;</pre><pre>
    amplt;!--//</pre><pre><span
    class=GramE>function</span> setCookie() {</pre><pre><span
    class=GramE>duit</span> = new Date();</pre>
    Didn't you once say you had a File Manager on your site?
    If so, go and bring that page up in their Editor and delete
    all of that code and Paste in the codes from this forum.

    It's been awhile since I set up Voyager.
    Let me go and check how to easily explain
    how to set up new FTP accounts. In the mean time
    take a few minutes and read the documentation. A few
    minutes now will save hours of headaches later.

    I'll get back to you...

    .....Willy


  •  
    Page 1 of 5 123 ... LastLast

    Posting Permissions

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