...

View Full Version : Quiz results



dreamsonthefly
11-11-2003, 03:48 AM
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

Willy Duitt
11-11-2003, 05:10 AM
Heh Rhonda;

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

Try this:

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

dreamsonthefly
11-11-2003, 05:34 AM
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???

Willy Duitt
11-11-2003, 06:37 AM
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

dreamsonthefly
11-11-2003, 06:40 AM
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

dreamsonthefly
11-11-2003, 06:48 AM
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

dreamsonthefly
11-11-2003, 07:01 AM
It came back the same way. No longer do I get the bravenet msg. But I get the name, where, and email again.

Willy Duitt
11-11-2003, 07:31 AM
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.


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

dreamsonthefly
11-11-2003, 10:02 AM
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.

dreamsonthefly
11-11-2003, 10:15 AM
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?

Willy Duitt
11-11-2003, 04:51 PM
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

dreamsonthefly
11-11-2003, 05:02 PM
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.

dreamsonthefly
11-11-2003, 05:48 PM
Okay, I have downloaded FTP Voyager, but I am complely lost. I do not know anything about how to set up proxys, or such.

dreamsonthefly
11-11-2003, 05:59 PM
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

Willy Duitt
11-11-2003, 06:25 PM
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

dreamsonthefly
11-11-2003, 06:31 PM
I re-named all the other ones, yes there were many. Then I copied the codes from the above post into word and named it results.htm

then I opened the ftp://ftp/homestead.com and copied the file from my documents into the files directory.

Yes I have file manager on here and homestead has a manager as well.

dreamsonthefly
11-11-2003, 06:46 PM
Okay, I copied and uploaded the info again.

This is what 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>

dreamsonthefly
11-11-2003, 07:06 PM
Okay, I fugured out Voyager.

I found the file under my documents, and uploaded it to the ftp "file" file. Now I will check the page again.

dreamsonthefly
11-11-2003, 07:09 PM
Getting the same:

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

Willy Duitt
11-11-2003, 07:16 PM
Okay, I copied and uploaded the info again.

Stop uploading with Homstead's FTP!
Obviously, either the way it is setup
or the way you are using it.
It is corrupting your files.

Besides, I said:

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.

Which meant for you to go over into Homestead's File Manager
and open results.htm in their Editor. Once you do that, you can
delete the corrupted codes and replace them with the new codes.
Then save the file.

I felt all along that your biggest problem
was FTP'ing documents into your site.

Did you read all of the documentation which came with Voyager?
I went and figured out the easiest way to explain the setup procedure.
But if you haven't completely familarized yourself with their documentation.
You won't know what I'm talking about and will only become more confused.

.....Willy

Willy Duitt
11-11-2003, 07:24 PM
Originally posted by dreamsonthefly
Okay, I fugured out Voyager.

I found the file under my documents, and uploaded it to the ftp "file" file. Now I will check the page again.

When you open Voyager.
Can you see your Web Sites Directories in the upper texarea?
Can you see your MY Documents Directories in the lower texarea?

If not, you don't have it set up properly.

If so, drag the file from your My Documents into the
upper textarea and drop it into the correct Homestead folder.

dreamsonthefly
11-11-2003, 07:28 PM
I can not edit the file in homesteads file manager. All I can do is copy it or move it.

So this is what I will do:

copy the above codes
remove coding from existing file
paste the new code into the file
save the file
go to voyager and find the file under my documents
drag that file into the homestead file

correct?

dreamsonthefly
11-11-2003, 07:29 PM
When you open Voyager.
Can you see your Web Sites Directories in the upper texarea?
Can you see your MY Documents Directories in the lower texarea?

yes, and yes

Willy Duitt
11-11-2003, 07:33 PM
Originally posted by dreamsonthefly
Getting the same:

Did you start with a fresh Copy and Pasted code from the forum?

Your results.htm file keeps showing as text because all of your:

<'s have been converted to &ampgt's
And your: >'s have been converted to &amplt's

Essentially making your HTML page render as TEXT.

Willy Duitt
11-11-2003, 07:38 PM
Originally posted by dreamsonthefly
I can not edit the file in homesteads file manager. All I can do is copy it or move it.

So this is what I will do:

copy the above codes
remove coding from existing file
paste the new code into the file
save the file
go to voyager and find the file under my documents
drag that file into the homestead file

correct?

Yes! :thumbsup:

Do you have working copies on your machine?
If so, drag the whole folder over into your Homestead account.

......Willy

Willy Duitt
11-11-2003, 07:43 PM
Originally posted by dreamsonthefly
I can not edit the file in homesteads file manager. All I can do is copy it or move it.

So this is what I will do:

copy the above codes
remove coding from existing file
paste the new code into the file
save the file
go to voyager and find the file under my documents
drag that file into the homestead file

correct?

One other question:

Are you using Notepad to edit and save these pasted codes?

If not, and you are using an HTML Editor
Your editor may be corrupting the pasted text.

Use Notepad!

....Willy

dreamsonthefly
11-11-2003, 07:44 PM
I can not edit the results.html document that is the Aol html document.

However I can edit the results.html document that is the Word document.

Can I delete the aol document, edit the word document then move it?

dreamsonthefly
11-11-2003, 07:50 PM
Okay, i created yet another results.htm in word pad. went to voyager and dragged it to the history file in homestead. I will check it out and let you know the results, keep your fingers and toes, crossed.

dreamsonthefly
11-11-2003, 07:58 PM
Okay here is what I get.

I take the test and I get the page that has the


Instant Quiz Results

# of questions you got right:

The questions you got wrong: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,

Grade in percentage:

Then it has the boxes that say:

Return to Homepage View Solution Submit results

When I click on submit results I get the msg. that I can only take the quiz once.

So, now all that's needed it the bravenet script to forward the results to me via an email. Or no bravenet script and write a script to have that button "submit results" emailed to me. Yes???

Quiz script provided by
JavaScriptKit.com

Willy Duitt
11-11-2003, 08:01 PM
Originally posted by dreamsonthefly
I can not edit the results.html document that is the Aol html document.

However I can edit the results.html document that is the Word document.

Can I delete the aol document, edit the word document then move it?

I don't know what an Ahole document is. :D
And Microsoft Word makes TEXT documents.

You need to be working with Notepad!

Open Notepad > click File > choose New > paste the codes
under File choose Save As > Name it results.htm
Choose the folder you want to save it in.
That's it!

Launch Voyager and drag the file into your Homestead directory.

.....Willy

dreamsonthefly
11-11-2003, 08:05 PM
An A h ol document is one in which this person has created all on her own.:D

I have done the above. And see the last post, it is working with the exception of submitting the info.

Willy Duitt
11-11-2003, 08:06 PM
Originally posted by dreamsonthefly
Okay here is what I get.

I take the test and I get the page that has the


Instant Quiz Results

# of questions you got right:

The questions you got wrong: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,

Grade in percentage:

Then it has the boxes that say:

Return to Homepage View Solution Submit results

When I click on submit results I get the msg. that I can only take the quiz once.

So, now all that's needed it the bravenet script to forward the results to me via an email. Or no bravenet script and write a script to have that button "submit results" emailed to me. Yes???

Quiz script provided by
JavaScriptKit.com

If I got your Bravenet form account info right.
It should be ready to submit as is.

dreamsonthefly
11-11-2003, 08:08 PM
Maybe you can try it and see what you get.

http://www.dreamsonthefly.com/novemberquiz.html

Willy Duitt
11-11-2003, 08:28 PM
Originally posted by dreamsonthefly
Maybe you can try it and see what you get.

http://www.dreamsonthefly.com/novemberquiz.html

I can not take the test on your site.
Without changing my security settings.

You have third party cookies which are tracking which page you
are on, how long you spend on the page and where you came from.

I have all third party cookies blocked and need to specifically
allow first party cookies when notified they are trying to set one.
Sorry, but it is too much trouble finding and deleting the third
party tracking cookies in my registry and cache.

Try taking the test here (http://www.transload.net/~cyberrite/Willy/Codes/test/PopQuiz/popquiz.htm) and let me know if you recieve the results.

.....Willy

dreamsonthefly
11-11-2003, 08:34 PM
I love the e cards, in fact it's something I've been thinkin about puting on the site. I actually found some fly fishing cards and emailed the owner of the site to link w/him, but never heard back.

Okay on the the quiz. I took it, it graded me, I submitted it, and it prompted me to put in information. I did, now I am awaiting the info in my email. It's been about 2 minutes, and nothing yet.

Willy Duitt
11-11-2003, 08:43 PM
Originally posted by dreamsonthefly
When I click on submit results I get the msg. that I can only take the quiz once.

Tee-Hee :D
I made it so you can only submit the test once!
And to discourage cheating, the Test Page and
Results pages are removed from your history.

For testing purposes:
Add a ! where indicated in the codes below.
NOTE: you will need to go to your Temporary Internet Folder
and delete the PopQuiz cookie in order to submit the test again.


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

.....Willy

dreamsonthefly
11-11-2003, 08:47 PM
I don't understand where I need to add the ! signs. Does this mean I have to cut and paste and drag and drop again?

Willy Duitt
11-11-2003, 08:49 PM
Originally posted by dreamsonthefly
I love the e cards, in fact it's something I've been thinkin about puting on the site. I actually found some fly fishing cards and emailed the owner of the site to link w/him, but never heard back.

Okay on the the quiz. I took it, it graded me, I submitted it, and it prompted me to put in information. I did, now I am awaiting the info in my email. It's been about 2 minutes, and nothing yet.

Oooh;
I just realized I may have used the wrong Bravenet account info.

http://pub7.bravenet.com/emailfwd/senddata.php

senddata was your form name.
My form name is mail.

Can you change it at Bravenet?
If not, the form will need to be changed.

......Willy

dreamsonthefly
11-11-2003, 08:52 PM
I have no idea how to change the name via Bravenet. But now that I think I have the FTP Voyager down, I think we can safely edit (if you send it all on this forum) and copy and drag. What about these !!!

Willy Duitt
11-11-2003, 08:55 PM
Originally posted by dreamsonthefly
I don't understand where I need to add the ! signs. Does this mean I have to cut and paste and drag and drop again?

Since you can't edit at Homestead. Make the changes to the copy
on your PC and then yes. You will have to drag and drop again.

Edit:
Or drag a copy from Homestead to your PC. Make the changes
and then drag and drop it back to Homestead replacing the original.

BTW: There is only one ! and it is on line 14

I have to leave.
I'll check back L8'er;
....Willy

dreamsonthefly
11-11-2003, 08:56 PM
Okay I'm in the Bravenet site, what do you want me to do?

dreamsonthefly
11-11-2003, 09:15 PM
I deleted the cookies, took the test again, but I do not have any emails. I will be around until 6 then I have a church thing to attend to.

Willy, I can't thank you enough for your help with all of this. Want to link your e-cards so maybe I can get some business for you?

Willy Duitt
11-11-2003, 11:08 PM
I'm back.

Give me a little while to change the form name.
I'll also change the prompts to your text inputs.
I only wrote the prompts because I didn't know
what form your form would take. :p

I'm positive once the form points itself towards Bravenet properly.
It will work!


......Willy

Willy Duitt
11-12-2003, 01:38 AM
Rhonda;

Try the test again here (http://www.transload.net/~cyberrite/Willy/Codes/test/PopQuiz/popquiz.htm).

The revised codes are below.

<html>
<head>
<title>Instant Quiz Results</title>
<script type="text/javascript" src="quizconfig.js"></script>
<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 submitData() {
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 Our Home Page.\n';
alert(notice);
window.location.replace('/');
}
else {
var correct = document.result.CORRECT.value;
var sub = correct+ ' correct answers on your November Test!';
var name = document.thedata.NAME.value;
if (!name) {
alert('You must enter your name');
document.thedata.NAME.focus();
return false;
}
else {
document.senddata.NAME.value = name;
}
var contact = document.thedata.CONTACT.value;
if (!contact) {
alert('You must enter your e-mail address');
document.thedata.CONTACT.focus();
return false;
}
else {
document.senddata.CONTACT.value = contact;
}
var from = document.thedata.FROM.value;
if (!from) {
from = 'No Data Submitted';
}
else {
document.senddata.FROM.value = from;
}
var comment = document.thedata.COMMENT.value;
if (!comment) {
comment = 'No Comments Made';
}
else {
document.senddata.COMMENT.value = comment;
}
document.senddata.action="http://pub7.bravenet.com/emailfwd/senddata.php?subject="+sub;
document.senddata.submit();
window.location.replace('/');
}
}
// -->
</script>
</head>

<body bgcolor="#FFFFFF" onunload="setCookie()">
<p align="center"><strong><font face="Arial">
<big>Instant Quiz Results</big></font></strong></p>

<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form name="result">
<input type="hidden" name="CORRECT" value="">
<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>
<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[1].value=totalquestions-incorrect.length+" out of "+totalquestions
document.result[3].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
for (temp=0;temp<incorrect.length;temp++)
document.result[2].value+=incorrect[temp]+", "
correct = totalquestions-incorrect.length;
document.result.CORRECT.value = correct;
</script>
<form name="thnx">
<input type="button" value="Thank you for taking the quiz" name="B1" onClick="location.replace('/');">
</form>


<!-- 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" method="post" enctype="multipart/form-data" style="margin:0px;">
<input type="hidden" name="NAME" value="" />
<input type="hidden" name="FROM" value="" />
<input type="hidden" name="CONTACT" value="" />
<input type="hidden" name="COMMENT" value="" />
<input type="hidden" name="CORRECT_ANSWERS" value="document.result.p.value" />
<input type="hidden" name="WRONG_ANSWERS" value="document.result.T2.value" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input type="hidden" name="PERCENT" value="document.result.q.value" />
<input type="hidden" name="quizanswers" value="587815930" />
<input type="hidden" name="cpv" value="2" />
</form>

<div style="background-color:#DBE0F5; padding:3px; font:12px arial; color:black;">
<b>Newsletter Contact Form</b>
</div>

<form name="thedata">
<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 />
E-mail address?<br />
<input type="text" name="CONTACT" size="34" style="width:230px;" /><br />
Where are you from?<br />
<input type="text" name="FROM" size="34" style="width:230px;" /><br />
Any Comments?<br />
<input type="text" name="COMMENT" size="34" style="width:230px;" /><br />
</form>
</div>

<div align="center">
<form name="datasubmit">
<input type="button" name="send" value=" Submit" onClick="submitData();">
<input type="button" name="reset" value=" Clear " onClick="document.thedata.reset();">
</form>
</div>

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

</div>
</div>
<!-- End Bravenet.com Service Code --></div>

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


.....Willy

dreamsonthefly
11-12-2003, 04:46 PM
I tried it again and it took me to:

http://www.transload.net/

dreamsonthefly
11-12-2003, 04:49 PM
For some reason I did not receive thee-mail that you had posted. So I came here, and viola, there was your post that you were back and yet another that you had re-written the codes.

Hummm...

The enable email notification is on too!

Willy Duitt
11-12-2003, 05:22 PM
Good Morning!
It's lunch time here! :)

Did you recieve your form results from Bravenet?

If not; you need to check that:
http://pub7.bravenet.com/emailfwd/senddata.php
Is the correct path to your account.

The form is being submitted somewhere!

I do not know how Bravenet sets up
remote hosted form handling accounts.

.....Willy

dreamsonthefly
11-12-2003, 05:26 PM
No, received nothing from Bravenet

what's for lunch?

dreamsonthefly
11-12-2003, 05:27 PM
How do I check that?

Willy Duitt
11-12-2003, 05:28 PM
All right;

I just went to Bravenet and viewed the source code of their Demo Page.

Somewhere we lost this value:
<input type="hidden" name="usernum" value="?????????" />

You need to send me your account# thru P/M
or the email address I provided you earlier.

.....Willy

dreamsonthefly
11-12-2003, 05:29 PM
My bravenet account number?

Willy Duitt
11-12-2003, 05:30 PM
Originally posted by dreamsonthefly
No, received nothing from Bravenet

what's for lunch?

The day I am having requires:

cocktails and peanuts :D

.....Willy

Willy Duitt
11-12-2003, 05:32 PM
Their demo usernum is:

<input type="hidden" name="usernum" value="137405393" />

You had to have been given a usernum when you registered.

......Willy

Willy Duitt
11-12-2003, 08:57 PM
Wheewwww;

OK Rhonda;

One of the problems was the usernum value was missing.
Another problem was I was using location.replace('/')
to forward the user once the form was submitted.

As it turns out. Bravenet has a confirmation page which
the user must visit and confirm submittal prior to processing.

Which in itself is studid. Any hidden fields you are passing
are reveal as text inputs on Bravenets confirmation page.

I had recommended that you come to these server side forums
in the hopes you would come up with your own form handling script.

Using Bravenet is simply NOT the way to go.
They are intrusive with their tracking cookies as well as the tracking they are doing with the images they force on your pages and thru the confirmation page which they are capturing more user info.

Attached are the working copies of both the
results.htm and the external javascript files.

Changes have been made to both.
So you need to replace your old copies with these.

.....Willy

dreamsonthefly
11-12-2003, 09:00 PM
Okay as I understand you:

1) I need to replace the results.htm file with the new codes attached

2) I am not sure about the other files, can you clarify?

Willy Duitt
11-12-2003, 09:15 PM
Originally posted by dreamsonthefly
Okay as I understand you:

1) I need to replace the results.htm file with the new codes attached

2) I am not sure about the other files, can you clarify?

Save the zip file to a directory on your PC
But NOT your Temporary Internet Files.

Once saved in a folder. Right Click > click Extract All >
Once the 2 files have been extracted. Launch Voyager

Once Voyager is Launched > in your Homestead account >
Right Click both results.htm & quizconfig.js and delete them.

Drag and Drop the new copies from the lower Windows Explorer
listings into the folder of your choice in your homestead account.


.....Willy

dreamsonthefly
11-12-2003, 09:26 PM
and now what?

Willy Duitt
11-12-2003, 09:33 PM
That should be it.

Take the test on your site to insure
the form handling is working properly.

.....Willy

dreamsonthefly
11-12-2003, 09:40 PM
I keep getting that I can not take the test again, and get directed back to my home page. I have cleared all contents of temp files and varified via windows explorer.

Willy Duitt
11-12-2003, 10:01 PM
It has to be your cookies.
If using IE. Cn the toolbar.
Click on Tools
Click on Internet Options
Click On Delete Cookies
Click on Delete Files

Here's where you problem may be:
Be sure you check the checkbox for deleting offline content.
The PopQuiz cookie may be in your offline folder and the cookie
name is still present and being read by the script.

Try the test here (http://www.transload.net/~cyberrite/Willy/popquiz.htm).

These are the same codes I sent you but in a different folder on my site.

.....Willy

dreamsonthefly
11-12-2003, 10:06 PM
that one says I cant take the test again

dreamsonthefly
11-12-2003, 10:08 PM
okay what is the best fastest way to delete all these cookies. I have done it several times via aol preferences, and my control panel, and windows explorer. They don't seem to go away.

Willy Duitt
11-12-2003, 10:15 PM
Did you try deleting thru the toolbar > Tools > Internet Options

I checked the files I sent from this end.
It should work if your cookies are cleared

Willy Duitt
11-12-2003, 10:19 PM
Rhonda;

Your old results.htm file is still on your server.
You never changed it!

.....Willy

Willy Duitt
11-12-2003, 10:23 PM
Nor did you change the external javascript file quizconfig.js

What's going on?

.....Willy

dreamsonthefly
11-12-2003, 10:24 PM
<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>

dreamsonthefly
11-12-2003, 10:46 PM
Willy, I just re-did the tansfer you sent me with the new codes. But I have so many others in there as well, that confusion is setting in. there were 3 original files in the info. that we put on the FTP homestead site. You sent me 2 files,

results.htm
quizconfig.js

what about the popquiz.htm?

I am so damm fearful of the delete button:(

Willy Duitt
11-12-2003, 11:06 PM
Rhonda;

Keep your popquiz.htm file.
The one I have is just the basic test.
Yours has your Menu and Style Sheet.

That's why I didn't attach it.
I was trying not to confuse you. :p

Go ahead and delete all copies of the other two files.
results.htm and quizconfig.js

Don't worry if something happens to your popquiz.htm
I just copied it from your site. :D

.....Willy

dreamsonthefly
11-12-2003, 11:16 PM
there is a folder that contains all three files that I can not delete from the Voyager directory. they are all dated 11/7. One of those files is popquiz.html.doc

dreamsonthefly
11-13-2003, 12:06 AM
Willy are you still here???/ I am having problems.

Willy Duitt
11-13-2003, 01:08 AM
I'm back.

I don't understand why you can't delete the folder.
Try closing all open windows except Voyager.

Can you Right Click on the files and delete that way?
Can you Drag the folder with your Right Mouse Button?
If so, Drag it back into Windows Explorer.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum