Just nu i M3-nätverket
Jump to content

Skicka resultat via mail.


MrHall

Recommended Posts

Jag har gjort ett litet test på min hemsida.

Hur ska asp-filen se ut om jag vill att resultatet ska skickas med mail.

 

Jag vill att man ska kunna göra testet och sedan fylla i en kompis mail-adress i ett fält.

Därefter ska resultatet skickas till kompisen.

Kompisen ska då, via en länk i mailet, kunna gå in på sidan och göra samma test.

 

Hur skickar jag resultatet via mail???

 

/Trodde att jag kunde

 

Link to comment
Share on other sites

Ok, men jag har redan en färdig asp-fil som jag vill använda.

 

Är detta möjligt?

 

/Vill!

 

Link to comment
Share on other sites

DanielForPresident

Du har en färdig ASP fil men vill via den skicka mail via ASP.NET på något sätt? Eller om du redan har en fil, vad behöver du då hjälp med? :)

 

Link to comment
Share on other sites

Mitt inlägg ligger kanske på fel ställe!?!?

 

Jag har en ASP-fil.

Mitt problem är att jag inte vet hur jag ska få värdet av resultet på testet

att följa med i mailet som ASP-filen skickar.

 

Mailet ska ju även innehålla en länk som återger resultatet.

 

Hur kan koden se ut???

 

/tydligare?

 

Link to comment
Share on other sites

Anjuna Moon

Fick du inte en väldigt uttömmande förklaring på hur mail via ASP fungerar i den andra tråden du startade om webbmail där bl.a Micke deltog? Exakt vad är det som är frågan som inte togs upp där?

 

Link to comment
Share on other sites

Jo, jag fick superbra svar där!

 

Men detta är en ny vinkel...

 

Såhär:

 

1. Användare A genomför ett test - resultatet bli 25 poäng.

 

2. A vill utmana B i samma test - Väljer därför "utmana".

 

3. A fyller i B´s e-post - trycker skicka.

 

3. B får ett mail som innehåller texten "A vill utmana Dig i test X,

A fick resultat 25 poäng".

 

4. B klickar på "Anta utmaningen" (som är en länk i mailet).

 

5. B vidarebefordras till hemsidan med testet - genomför testet.

 

6. Resultatet jämförs med A´s resultat.

(Detta innebär att länken måste innehålla A´s resultat, vilket ska

hämtas till sidan)

 

7. Svaret visas och vidarebefordras automatiskt till A.

(Detta innebär att länken måste innehålla A´s e-post, vilket ska

hämtas till sidan)

 

 

 

Link to comment
Share on other sites

Anjuna Moon

Nja, jag skulle inte vilja kalla det vinkel så mycket som att du fiskar färdiga lösningar. Det har du faktiskt gjort från första början.

 

E-forum är inte ett gratis konsultforum där du får färdiga lösningar på system utan att betala för dem. Ställ specifika tekniska frågor eller läs en tutorial.

 

Link to comment
Share on other sites

Jag vet det. Med mitt förra inlägg ville jag bara förklara mer i detalj vad jag var ute efter.

 

Jag ska försöka vara mer specifik.

 

/strax tillbaka

 

Link to comment
Share on other sites

Jag har kortat ner koden något...innehåller tio frågor.

Varje svar ger olika poäng.

 

Jag får inte den sista knappen att fungera.

 

När man klickar på "Utmana!" ska filen "utmana.asp" anropas.

Men det händer ingenting! Vad är fel???

 

[log]

<head>

<meta name="description" content="Kunskaps-faktor">

<title>Vad kan Du?</title>

<style fprolloverstyle>A:hover {color: #FF6600}

</style>

</head>

 

 

<script language="JavaScript">

<!--

 

function SymError()

{

return true;

}

 

window.onerror = SymError;

 

var SymRealWinOpen = window.open;

 

function SymWinOpen(url, name, attributes)

{

return (new Object());

}

 

window.open = SymWinOpen;

 

//-->

</script>

 

<script type="text/javascript">

var radio1_value="";

var radio2_value="";

var radio3_value="";

var radio4_value="";

var radio5_value="";

var radio6_value="";

var radio7_value="";

var radio8_value="";

var radio9_value="";

var radio10_value="";

 

function check() {

if(radio1_value=="" || radio2_value=="" || radio3_value=="" || radio4_value=="" || radio5_value=="" || radio6_value=="" || radio7_value=="" || radio8_value==""

|| radio9_value=="" || radio10_value=="") {

alert("Du måste besvara alla frågor");

return false;

} else {

return summera();

}

}

function summera() {

var summa = parseInt(radio1_value) + parseInt(radio2_value) + parseInt(radio3_value) + parseInt(radio4_value) + parseInt(radio5_value) + parseInt(radio6_value)

+ parseInt(radio7_value) + parseInt(radio8_value) + parseInt(radio9_value) + parseInt(radio10_value);

document.getElementById('summa').value=summa;

return false;

}

</script>

 

<body bgcolor="#A79FFD" link="#000000" vlink="#000000" alink="#000000">

<form action="#" onsubmit="javascript:return check()";>

<table border="0" cellspacing="1" style="border-collapse: collapse" width="539" height="100" id="table1">

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">Frågor...</font></td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">Testa Din kunskap!</font></td>

</tr>

<tr>

<td> </td>

<td width="130"> </td>

<td width="105"> </td>

<td> </td>

<td width="84"> </td>

<td width="81"> </td>

<td> </td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">1. Vad heter Sveriges

huvudstad?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Stockholm</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Malmö</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Lund</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Göteborg</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Kalmar</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='3'" value="3"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Luleå</font></td>

</tr>

<tr>

<td colspan="7"> </td>

</tr>

<tr>

<td colspan="7"> </td>

</tr>

<tr>

<td width="535" colspan="7"> </td>

</tr>

<tr>

<td width="25"><font face="Kristen ITC" size="2"><br /> </font></td>

<td width="230" colspan="2" align="center"><font face="Kristen ITC">

<input type="submit" value="Beräkna Poäng"></font></td>

<td width="86"> </td>

<td width="172" colspan="2">

<p align="left"><font face="Kristen ITC">

<input type="Text" id="summa" name="T1" size="20"></font></td>

<td width="24"> </td>

</tr>

<tr>

<td width="535" colspan="7"> </td>

</tr>

</form>

<FORM method="post" action="utmana.asp" onsubmit="return check()">

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">Utmana en kompis!

</font></td>

</tr>

<tr>

<td width="155" align="center" colspan="2"> </td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="155" align="left" colspan="2">

<p align="left"><font face="Kristen ITC" size="2">Ditt namn:</font></td>

<td width="228" align="left" colspan="3">

<input type="text" name="utmanare" size="27"></td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="155" align="left" colspan="2">

<font face="Kristen ITC" size="2">Din e-mail:</font></td>

<td width="228" align="left" colspan="3">

<input type="text" name="utmanaresmail" size="27"></td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="155" align="left" colspan="2">

<font face="Kristen ITC" size="2">Din kompis namn:</font></td>

<td width="228" align="left" colspan="3">

<input type="text" name="kompis" size="27"></td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="155" align="left" colspan="2">

<font face="Kristen ITC" size="2">Din kompis e-mail:</font></td>

<td width="228" align="left" colspan="3">

<input type="text" name="kompismail" size="27"></td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="155" align="left" colspan="2"> </td>

<td width="228" align="center" colspan="3"> </td>

<td width="76" align="center"> </td>

<td width="76" align="center"> </td>

</tr>

<tr>

<td width="537" colspan="7" align="center"><font face="Kristen ITC">

<input type="submit" value="Utmana!"></font></td>

</tr>

</table>

</form>

</body>

 

[/log]

 

Vad är fel här???

 

/Något har jag missat...säkert enkelt

[inlägget ändrat 2006-05-05 22:42:59 av MrHall]

Link to comment
Share on other sites

DanielForPresident

En ledtråd är att titta lite på Request.Form :) där du kan nå värdet i form elementen(e-postadressen) från koden som ska skicka mailet.

 

Du måste ha en metod som knappen kör och som skapar och skickar mailet. Den metoden måste du ha glömt i koden du bifogade.

 

[inlägget ändrat 2006-05-05 23:16:38 av DanielForPresident]

Link to comment
Share on other sites

Micke_skane
När man klickar på "Utmana!" ska filen "utmana.asp" anropas.

Men det händer ingenting! Vad är fel???

Var anropar du sidan "utmana.asp"?

Just nu anropar du en sida "#", och det går inte så bra.

 

Kolla sen på tråden där du ville skicka ett mail med Asp så kan du försöka bygga en variant och där det inte blir rätt så ta hjälp av forumet.

Roligare att själv "knäcka" sakerna :)

 

Link to comment
Share on other sites

DanielForPresident

Okej. Då ska du ändra

 

<form action="#" onsubmit="javascript:return check()";>

 

till

 

<form action="utmana.asp" onsubmit="javascript:return check()";>

 

 

Link to comment
Share on other sites

Äh, jag kom på felet... :s

 

Men hur hämtar jag resultatet från testet till ASP-filen??

 

Detta funkar inte...

 

HTML-filen

.

<input type="Text" id="summa" name="summa" size="20"></font></td>

.

 

ASP-filen

.

HTML = HTML & "<p align=""center""><font face=""Footlight MT Light"" style=""font-size: 60pt"">"

HTML = HTML & "<b>" & summa & "</b><br><br></p>"

.

 

 

/Någon hint?

 

 

Link to comment
Share on other sites

DanielForPresident

HTML = HTML & "<p align=""center""><font face=""Footlight MT Light"" style=""font-size: 60pt"">"
HTML = HTML & "<b>" & [b]Request.Form("summa") [/b]& "</b><br><br></p>"

 

[inlägget ändrat 2006-05-06 12:44:49 av DanielForPresident]

Link to comment
Share on other sites

Första raden i ASP-filen:

 

summa = Request.Form("summa")

 

...så den raden har jag redan...

 

/hjälper inte...

 

[inlägget ändrat 2006-05-06 12:54:18 av MrHall]

Link to comment
Share on other sites

Micke_skane
Okej. Då ska du ändra

Tanken var att han själv skulle få "jobba" lite för komma på det enkla felet :)

 

Första raden i ASP-filen...

Din första rad bör innehålla:

Option Explicit

 

Får du några felmeddelanden?

Det är ju rätt viktigt att veta för att man inte ska sitta och gissa vad felet kan vara. Det kan ju vara så att du ändrar i nått som redan är som det ska vara.

 

 

 

Link to comment
Share on other sites

Jag är nog inte med riktigt...

 

[log]<%

summa = Request.Form("summa")

utmanare = Request.Form("utmanare")

utmanaresmail = Request.Form("utmanaresmail")

kompis = Request.Form("kompis")

kompismail = Request.Form("kompismail")

 

HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"

HTML = HTML & "<html>"

HTML = HTML & "<head>"

HTML = HTML & "<meta http-equiv=""Content-Type"""

HTML = HTML & "content=""text/html; charset=iso-8859-1"">"

HTML = HTML & "<meta name=""GENERATOR"""

HTML = HTML & " content=""Microsoft Visual Studio 6.0"">"

HTML = HTML & "<title>Utmaning</title>"

HTML = HTML & "</head>"

HTML = HTML & "<body bgcolor=""#A2CBF9"">"

HTML = HTML & "<p align=""center""><font face=""Castellar"" style=""font-size: 60pt"">"

HTML = HTML & "<b>UTMANING!</b><br></p>"

 

HTML = HTML & "<p align=""center""><font face=""Georgia"" style=""font-size: 38pt"">"

HTML = HTML & "<i><u>" & utmanare & " vill utmana Dig i kunskapstest!</i></u><br><br></p>"

 

HTML = HTML & utmanare

HTML = HTML & " fick " & summa & "<br>"

 

HTML = HTML & kompis & ", vad får Du?"

 

HTML = HTML & "<p align=""right""><font face=""Times New Roman"" style=""font-size: 16pt"">"

HTML = HTML & "</i><br><br>Gå in på <a href=""http://www.iknowwho.se"">"

HTML = HTML & "<font face=""Times New Roman"" style=""font-size: 16pt"">www.iknowwho.se </a>och slå" & utmanare & "<br>"

HTML = HTML & "</body>"

HTML = HTML & "</html>"

 

Set objMail = Server.CreateObject( "CDONTS.NewMail" )

objMail.To = kompismail

objMail.Bcc = "hall_ola@hotmail.com"

objMail.From = utmanaresmail

objMail.Subject = kompis &"! Du har blivit utmanad!"

objMail.BodyFormat=0

objMail.Body = HTML

objMail.Host = "mailout.b-one.net"

objMail.Send

Set objMail = Nothing

response.redirect "diplomasent.htm"

 

%>[/log]

 

Så ser min ASP-fil ut.

 

/trodde jag fik rätt på det...

 

Link to comment
Share on other sites

Micke_skane

Första ska det vara:

Option Explicit

Kortfattat beskrivit så kollar den raden efter misstag du gör i Asp-koden.

 

Sen ska du deklarera dina variabler Innan du börjar lägga in värden i dem.

Dim summa, utmanare, osv...

 

Vad är det sen som inte fungerar?

Är det att du inte får något värde till variabeln summa?

Provat i så fall att skriva ut variabeln?

Några felmeddelanden?

 

Link to comment
Share on other sites

Jag får inga felmeddelanden alls.

 

Allt funkar som det ska...nästan...

Det är något jag gjort fel med variabeln "summa".

 

Den har troligtvis inget värde...

 

Det måste vara fel i HTML-filen!

 

Jag har ju två formulär...

 

Ett som innehåller testet. Skicka-knappen i detta formuläret gör att

summan visas i ett fält, som heter "summa". Variabeln som visas heter "summa".

 

Det är denna jag vill hämta till min ASP-fil.

 

Formulär två innehåller en annan skicka-knapp.

Denna kallar på min ASP-fil.

Jag vill att det ska vara två olika knappar, precis som jag har.

 

Jag tror att problemet ligger i att jag inte gör rätt när jag definierar variabeln "summa".

 

Den ska ju både hämtas i fältet "summa" och skickas till ASP-filen.

 

Jag bifogar filerna i sin helhet:

 

HTML-filen

[log]

<head>

<meta name="description" content="Ball-faktor">

<title>Är Du ballast på festen?</title>

<style fprolloverstyle>A:hover {color: #FF6600}

</style>

</head>

 

 

<script language="JavaScript">

<!--

 

function SymError()

{

return true;

}

 

window.onerror = SymError;

 

var SymRealWinOpen = window.open;

 

function SymWinOpen(url, name, attributes)

{

return (new Object());

}

 

window.open = SymWinOpen;

 

//-->

</script>

 

<script type="text/javascript">

var radio1_value="";

var radio2_value="";

var radio3_value="";

var radio4_value="";

var radio5_value="";

var radio6_value="";

var radio7_value="";

var radio8_value="";

var radio9_value="";

var radio10_value="";

 

function check() {

if(radio1_value=="" || radio2_value=="" || radio3_value=="" || radio4_value=="" || radio5_value=="" || radio6_value=="" || radio7_value=="" || radio8_value==""

|| radio9_value=="" || radio10_value=="") {

alert("Du måste besvara alla frågor");

return false;

} else {

return summera();

}

}

function summera() {

var summa = ((parseInt(radio1_value) + parseInt(radio2_value) + parseInt(radio3_value) + parseInt(radio4_value) + parseInt(radio5_value) + parseInt(radio6_value)

+ parseInt(radio7_value) + parseInt(radio8_value) + parseInt(radio9_value) + parseInt(radio10_value))/6);

document.getElementById('summa').value=(Math.round(summa));

 

return false;

}

</script>

 

<body bgcolor="#A79FFD" link="#000000" vlink="#000000" alink="#000000">

<form action="#" onsubmit="javascript:return check()";>

<table border="0" cellspacing="1" style="border-collapse: collapse" width="539" height="100" id="table1">

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">Är Du ballast på festen?</font></td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">Testa Din &quot;ball-faktor&quot; och utmana en kompis!</font></td>

</tr>

<tr>

<td>&nbsp;</td>

<td width="130">&nbsp;</td>

<td width="105">&nbsp;</td>

<td>&nbsp;</td>

<td width="84">&nbsp;</td>

<td width="81">&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">1. Hur laddar Du upp inför festen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Går på förfest</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Fixar en förfest</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Kollar min e-mail</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Kollar på TV</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Klämmer ett par bira/cider</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='3'" value="3"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Provar alla kläder i garderoben</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">2. Vad har Du på Dig till festen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Det som är inne just nu</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Inga underkläder</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Kostym/klänning</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Något som absolut ingen annan

skulle ha på sig</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Spelar ingen roll, ball ändå</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='1'" value="1"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Det som ligger framme</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">3. Hur tar Du Dig till festen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Cyklar</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Tar min värstingbil</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Åker buss</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Går</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Åker taxi</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='2'" value="2"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Mamma skjutsar</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">4. Hur gör Du entré?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Presenterar mig för alla</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Ropar; &quot;Nu är jag här!&quot;</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Ropar; &quot;Var är spriten!?&quot;</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Smyger in och skrämmer alla</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Klättrar in genom ett fönster</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='1'" value="1"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Är redan där när alla kommer</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">5. Vad dricker Du på festen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Grogg</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Öl/cider</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Vin</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Vad som bjuds</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Läsk eller mineralvatten</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='2'" value="2"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Så lite som möjligt</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">6. Vilka snackar Du med?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Värden/värdinnan</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Bara av det motsatta könet</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Alla som verkar vara balla</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">De som verkar vara mesar</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">De som dricker mest</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='2'" value="2"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Ingen, skickar SMS istället</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">7. Vilket är samtalsämnet?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Brudar/killar</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Musik, film eller böcker</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Samhällsfrågor</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Dina nya kläder</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Skitsnack om folk på festen</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="3"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Din utbildning</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">8. Vilket är Ditt bästa partytrick?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Practical jokes</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Moona</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Halsa fem öl utan att andas</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Strippa</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Berätta roliga historier</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='2'" value="2"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Visa Dina Kung Fu moves</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">9. Vilken är Din viktigaste uppgift på festen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Sköta stereon</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Blanda alla de nyaste drinkarna</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='3'" value="3"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Bjuda dit mer folk</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Knyta ihop alla skosnören</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Gömma alla jackor</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='1'" value="1"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Äta upp all mat i kylen</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7"><font face="Kristen ITC" size="2">10. Hur avslutar Du festkvällen?</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='4'" value="4"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Däckar på dass</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='6'" value="6"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Drar ut på stan</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='5'" value="5"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Går med någon hem</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='1'" value="1"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Mamma hämtar mig efter

22-nyheterna</font></td>

</tr>

<tr>

<td width="25" align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='2'" value="2"></font></td>

<td width="507" align="left" colspan="6">

<font face="Kristen ITC" size="2">Hjälper till att städa</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='3'" value="3"></font></td>

<td colspan="6" align="left"><font face="Kristen ITC" size="2">Dricker upp det sista i alla kvarlämnade

glas</font></td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

<tr>

<td width="535" colspan="7">&nbsp;</td>

</tr>

<FORM method="post" action="utmana.asp" onsubmit="return check()">

<tr>

<td width="25"><font face="Kristen ITC" size="2"><br />&nbsp;</font></td>

<td width="230" colspan="2" align="center"><font face="Kristen ITC">

<input type="submit" value="Beräkna Ball-faktor"></font></td>

<td width="86">&nbsp;</td>

<td width="172" colspan="2">

<p align="left"><font face="Kristen ITC">

<input type="Text" id="summa" name="summa" size="20"></font></td>

<td width="24">&nbsp;</td>

</tr>

<tr>

<td width="535" colspan="7">&nbsp;</td>

</tr>

<tr>

<td colspan="7">&nbsp;</td>

</tr>

</table>

</form>

<form method="POST" action="utmana.asp">

<p>Ditt namn: <input type="text" name="utmanare" size="20"></p>

<p>Din mail: <input type="text" name="utmanaresmail" size="20"></p>

<p>Din kompis namn: <input type="text" name="kompis" size="20"></p>

<p>Din kompis mail: <input type="text" name="kompismail" size="20"></p>

<p><input type="submit" value="Skicka" name="B1"><input type="reset" value="Återställ" name="B2"></p>

</form>

</form>

</body>

 

[/log]

 

ASP-filen:

[log]<%

summa = Request.Form("summa")

utmanare = Request.Form("utmanare")

utmanaresmail = Request.Form("utmanaresmail")

kompis = Request.Form("kompis")

kompismail = Request.Form("kompismail")

 

HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"

HTML = HTML & "<html>"

HTML = HTML & "<head>"

HTML = HTML & "<meta http-equiv=""Content-Type"""

HTML = HTML & "content=""text/html; charset=iso-8859-1"">"

HTML = HTML & "<meta name=""GENERATOR"""

HTML = HTML & " content=""Microsoft Visual Studio 6.0"">"

HTML = HTML & "<title>Utmaning</title>"

HTML = HTML & "</head>"

HTML = HTML & "<body bgcolor=""#A2CBF9"">"

HTML = HTML & "<p align=""center""><font face=""Castellar"" style=""font-size: 60pt"">"

HTML = HTML & "<b>UTMANING!</b><br></p>"

 

HTML = HTML & "<p align=""center""><font face=""Georgia"" style=""font-size: 38pt"">"

HTML = HTML & "<i><u>" & utmanare & " vill utmana Dig i kunskapstest!</i></u><br><br></p>"

 

HTML = HTML & utmanare

HTML = HTML & " fick " & summa & "<br>"

 

HTML = HTML & kompis & ", vad får Du?"

 

HTML = HTML & "<p align=""right""><font face=""Times New Roman"" style=""font-size: 16pt"">"

HTML = HTML & "</i><br><br>Gå in på <a href=""http://www.iknowwho.se"">"

HTML = HTML & "<font face=""Times New Roman"" style=""font-size: 16pt"">www.iknowwho.se </a>och slå" & utmanare & "<br>"

HTML = HTML & "</body>"

HTML = HTML & "</html>"

 

Set objMail = Server.CreateObject( "CDONTS.NewMail" )

objMail.To = kompismail

objMail.Bcc = "hall_ola@hotmail.com"

objMail.From = utmanaresmail

objMail.Subject = kompis &"! Du har blivit utmanad!"

objMail.BodyFormat=0

objMail.Body = HTML

objMail.Host = "mailout.b-one.net"

objMail.Send

Set objMail = Nothing

response.redirect "diplomasent.htm"

 

%>[/log]

 

/Tacksam för hjälpen

 

Link to comment
Share on other sites

Micke_skane
Det måste vara fel i HTML-filen!

Ja, där behöver du justera en del för att det ska fungera.

 

1)

Du kan inte använda ett formulär i ett annat formulär.

Du anropar utmana.asp lite hur som helst :)

Det räcker med ett formulär för att detta ska fungera.

Sätt En form-tagg som börjar såhär:

<form action="utmana.asp" onsubmit="javascript:return checkSumma()";>

 

2)

Koppla kontrollen av Ball-faktorn till en knapp.

<input type="button" value="Beräkna Ball-faktor" onclick="javascript:return check()">

 

3)

Kolla sen om där är uträknat en Ball-faktor innan man skickas vidare.

Lägg denna koll i submit-knappen.

Se punkt 1.

Skapa alltså en ny javascript-funktion(checkSumma()) som kollar om text-fältet summa är tomt eller inte.

Lägg denna funktion efter funktionen summera().

 

Sätt även text-fältet summera till att bara vara readonly.

Annars kan man ju själv skriva in nått värde utan att behöva räkna ut Ball-faktorn.

 

Börja med att göra dessa ändringar i din html-fil.

Sen får du se vad som händer...

 

Link to comment
Share on other sites

[log]

<head>

<meta name="description" content="Ball-faktor">

<title>Är Du ballast på festen?</title>

<style fprolloverstyle>A:hover {color: #FF6600}

</style>

<script language="JavaScript">

<!--

function FP_swapImg() {//v1.0

var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;

n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;

elm.$src=elm.src; elm.src=args[n+1]; } }

}

 

function FP_preloadImgs() {//v1.0

var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();

for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; }

}

 

function FP_getObjectByID(id,o) {//v1.0

var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);

else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;

if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if©

for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }

f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;

for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }

return null;

}

// -->

</script>

</head>

 

 

<script language="JavaScript">

<!--

 

function SymError()

{

return true;

}

 

window.onerror = SymError;

 

var SymRealWinOpen = window.open;

 

function SymWinOpen(url, name, attributes)

{

return (new Object());

}

 

window.open = SymWinOpen;

 

//-->

</script>

 

<script type="text/javascript">

var radio1_value="";

var radio2_value="";

var radio3_value="";

var radio4_value="";

var radio5_value="";

var radio6_value="";

var radio7_value="";

var radio8_value="";

var radio9_value="";

var radio10_value="";

 

function check() {

if(radio1_value=="" || radio2_value=="" || radio3_value=="" || radio4_value=="" || radio5_value=="" || radio6_value=="" || radio7_value=="" || radio8_value==""

|| radio9_value=="" || radio10_value=="") {

alert("Du måste besvara alla frågor");

return false;

} else {

return summera();

}

}

function summera() {

var summa = ((parseInt(radio1_value) + parseInt(radio2_value) + parseInt(radio3_value) + parseInt(radio4_value) + parseInt(radio5_value) + parseInt(radio6_value)

+ parseInt(radio7_value) + parseInt(radio8_value) + parseInt(radio9_value) + parseInt(radio10_value))/6);

document.getElementById('summa').value=(Math.round(summa));

return false;

}

function checkSumma() {

if(summa=="" || utmanare=="" || utmanaresmail=="" || kompis=="" || kompismail=="") {

alert("Du måste besvara alla frågor och fylla i alla rutor med namn och e-post");

return false;

}

}

 

</script>

 

<body bgcolor="#A79FFD" link="#000000" vlink="#000000" alink="#000000" onload="FP_preloadImgs(/*url*/'button3E.jpg', /*url*/'button3F.jpg')">

<form action="utmana.asp" onsubmit="javascript:return checkSumma()";>

<table border="0" cellspacing="1" style="border-collapse: collapse" width="400" height="100" id="table1">

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">Är Du ballast på festen?</font></td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">Hur ball är Du på en

skala från 1 till 10? Testa Din "ball-faktor"!</font></td>

</tr>

<tr>

<td> </td>

<td width="130" colspan="2"> </td>

<td width="105" colspan="2"> </td>

<td width="8"> </td>

<td width="84" colspan="2"> </td>

<td width="81" colspan="2"> </td>

<td width="64"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">1. Hur laddar Du upp inför festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går på förfest</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Fixar en förfest</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kollar min e-mail</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kollar på TV</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Klämmer ett par bira/cider</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='3'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Provar alla kläder i garderoben</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">2. Vad har Du på Dig till festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Det som är inne just nu</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Inga underkläder</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kostym/klänning</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Något som absolut ingen annan

skulle ha på sig</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Spelar ingen roll, ball ändå</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Det som ligger framme</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">3. Hur tar Du Dig till festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Cyklar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Tar min värstingbil</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Åker buss</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Åker taxi</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Mamma skjutsar</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">4. Hur gör Du entré?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Presenterar mig för alla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Ropar; "Nu är jag här!"</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Ropar; "Var är spriten!?"</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Smyger in och skrämmer alla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Klättrar in genom ett fönster</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Är redan där när alla kommer</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">5. Vad dricker Du på festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Grogg</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Öl/cider</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Vin</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Vad som bjuds</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Läsk eller mineralvatten</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Så lite som möjligt</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">6. Vilka snackar Du med?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Värden/värdinnan</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Bara av det motsatta könet</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Alla som verkar vara balla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">De som verkar vara mesar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">De som dricker mest</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Ingen, skickar SMS istället</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">7. Vilket är samtalsämnet?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Brudar/killar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Musik, film eller böcker</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Samhällsfrågor</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Dina nya kläder</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Skitsnack om folk på festen</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Din utbildning</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">8. Vilket är Ditt bästa partytrick?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Practical jokes</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Moona</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Halsa fem öl utan att andas</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Strippa</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Berätta roliga historier</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Visa Dina Kung Fu moves</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">9. Vilken är Din viktigaste uppgift på festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Sköta stereon</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Blanda alla de nyaste drinkarna</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Bjuda dit mer folk</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Knyta ihop alla skosnören</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Gömma alla jackor</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Äta upp all mat i kylen</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">10. Hur avslutar Du festkvällen?</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Däckar på dass</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Drar ut på stan</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går med någon hem</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Mamma hämtar mig efter

22-nyheterna</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Hjälper till att städa</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='3'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Dricker upp det sista i alla kvarlämnade

glas</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td width="535" colspan="11"> </td>

</tr>

<tr>

<td width="537" align="center" colspan="11"><font face="Kristen ITC">

<input type="button" value="Beräkna Ball-faktor" onclick="javascript:return check()"></font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center"> </td>

</tr>

<tr>

<td width="537" colspan="11" align="center"><font face="Kristen ITC">

<font size="2">På en ball-skala från 1 till 10 är Du en: </font>

<input id="summa" name="summa" size="2"><font size="2">:a</font></font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center"> </td>

</tr>

<tr>

<td width="537" colspan="11" align="center">

<div style="position: absolute; width: 89px; height: 26px; z-index: 4; left: 131px; top: 2254px" id="GoBack">

<font face="Kristen ITC" size="2">

<a href="../tests.htm">

<img border="0" id="img2" src="button3D.jpg" height="28" width="139" alt="Tillbaka!" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button3E.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button3D.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button3F.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button3E.jpg')" fp-style="fp-btn: Metal Rectangle 5; fp-font: Kristen ITC; fp-font-style: Bold; fp-font-size: 14" fp-title="Tillbaka!"></a></font></div>

<p><font face="Kristen ITC" size="2">Utmana en kompis!</font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center">

 </td>

</tr>

<tr>

<td width="25%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Ditt namn:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="utmanare" size="28"></td>

</tr>

<tr>

<td width="25%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din e-post:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="utmanaresmail" size="28"></td>

</tr>

<tr>

<td width="50%" colspan="11" align="left">

 </td>

</tr>

<tr>

<td width="50%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din kompis namn:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="kompis" size="28"></td>

</tr>

<tr>

<td width="50%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din kompis e-post:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="kompismail" size="28"></td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="538" colspan="11" align="center">

<input type="submit" value="Skicka utmaning!" name="Skicka"></td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

</table>

</form>

</body>[/log]

 

 

Jag får inte rätt på skiten ändå!

Nu får jag ett felmeddelande i min ASP-fil.

Meddelandet säger att det är fel i en rad, den som innehåller mottagarens mail-adres (variabeln "kompismail").

Jag tror att felet ligger i att jag inte få med mig värdena från HTML-filen.

Sen funkar inte funktionen checkSumma heller...

 

/tröttnar snart

 

[inlägget ändrat 2006-05-09 07:47:00 av MrHall]

Link to comment
Share on other sites

Micke_skane

function checkSumma() {
var oElm = document.getElementById("summa");
if (oElm.value=="") alert("Beräkna en Ball-faktor!"); return false;
}

 

Ska vidare nu så jag kan kolla senare på hur din Asp-kod ser ut.

Hur ser felmeddelandet ut? Visa det och vilken rad den pekar på.

 

Link to comment
Share on other sites

[log]

<head>

<meta name="description" content="Ball-faktor">

<title>Är Du ballast på festen?</title>

<style fprolloverstyle>A:hover {color: #FF6600}

</style>

<script language="JavaScript">

<!--

function FP_swapImg() {//v1.0

var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;

n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;

elm.$src=elm.src; elm.src=args[n+1]; } }

}

 

function FP_preloadImgs() {//v1.0

var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();

for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; }

}

 

function FP_getObjectByID(id,o) {//v1.0

var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);

else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;

if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if©

for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }

f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;

for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }

return null;

}

// -->

</script>

</head>

 

 

<script language="JavaScript">

<!--

 

function SymError()

{

return true;

}

 

window.onerror = SymError;

 

var SymRealWinOpen = window.open;

 

function SymWinOpen(url, name, attributes)

{

return (new Object());

}

 

window.open = SymWinOpen;

 

//-->

</script>

 

<script type="text/javascript">

var radio1_value="";

var radio2_value="";

var radio3_value="";

var radio4_value="";

var radio5_value="";

var radio6_value="";

var radio7_value="";

var radio8_value="";

var radio9_value="";

var radio10_value="";

var utmanare="";

var utmanaresmail="";

var kompis="";

var kompismail="";

 

function check() {

if(radio1_value=="" || radio2_value=="" || radio3_value=="" || radio4_value=="" || radio5_value=="" || radio6_value=="" || radio7_value=="" || radio8_value==""

|| radio9_value=="" || radio10_value=="") {

alert("Du måste besvara alla frågor");

return false;

} else {

return summera();

}

}

function summera() {

var summa = ((parseInt(radio1_value) + parseInt(radio2_value) + parseInt(radio3_value) + parseInt(radio4_value) + parseInt(radio5_value) + parseInt(radio6_value)

+ parseInt(radio7_value) + parseInt(radio8_value) + parseInt(radio9_value) + parseInt(radio10_value))/6);

document.getElementById('summa').value=(Math.round(summa));

return false;

}

function checkSumma() {

var oElm = document.getElementById("summa");

if (oElm.value=="") alert("Beräkna en Ball-faktor först"); return checkutmana();

}

 

function checkutmana() {

if(utmanare=="" || utmanaresmail=="" || kompis=="" || kompismail=="") {

alert("Du måste fylla i alla fält med namn och e-post");return false;

}

}

</script>

 

<body bgcolor="#A79FFD" link="#000000" vlink="#000000" alink="#000000" onload="FP_preloadImgs(/*url*/'button3E.jpg', /*url*/'button3F.jpg')">

<form action="utmana.asp" onsubmit="javascript:return checkSumma()";>

<table border="0" cellspacing="1" style="border-collapse: collapse" width="400" height="100" id="table1">

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">Är Du ballast på festen?</font></td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">Hur ball är Du på en

skala från 1 till 10? Testa Din "ball-faktor"!</font></td>

</tr>

<tr>

<td> </td>

<td width="130" colspan="2"> </td>

<td width="105" colspan="2"> </td>

<td width="8"> </td>

<td width="84" colspan="2"> </td>

<td width="81" colspan="2"> </td>

<td width="64"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">1. Hur laddar Du upp inför festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går på förfest</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Fixar en förfest</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kollar min e-mail</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kollar på TV</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Klämmer ett par bira/cider</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="1" onclick="radio1_value='3'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Provar alla kläder i garderoben</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">2. Vad har Du på Dig till festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Det som är inne just nu</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Inga underkläder</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Kostym/klänning</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Något som absolut ingen annan

skulle ha på sig</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Spelar ingen roll, ball ändå</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="2" onclick="radio2_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Det som ligger framme</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">3. Hur tar Du Dig till festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Cyklar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Tar min värstingbil</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Åker buss</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Åker taxi</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="3" onclick="radio3_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Mamma skjutsar</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">4. Hur gör Du entré?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Presenterar mig för alla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Ropar; "Nu är jag här!"</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Ropar; "Var är spriten!?"</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Smyger in och skrämmer alla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Klättrar in genom ett fönster</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="4" onclick="radio4_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Är redan där när alla kommer</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">5. Vad dricker Du på festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Grogg</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Öl/cider</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Vin</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Vad som bjuds</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Läsk eller mineralvatten</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="5" onclick="radio5_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Så lite som möjligt</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">6. Vilka snackar Du med?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Värden/värdinnan</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Bara av det motsatta könet</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Alla som verkar vara balla</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">De som verkar vara mesar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">De som dricker mest</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="6" onclick="radio6_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Ingen, skickar SMS istället</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">7. Vilket är samtalsämnet?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Brudar/killar</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Musik, film eller böcker</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Samhällsfrågor</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Dina nya kläder</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Skitsnack om folk på festen</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="7" onclick="radio7_value='6'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Din utbildning</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">8. Vilket är Ditt bästa partytrick?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Practical jokes</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Moona</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Halsa fem öl utan att andas</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Strippa</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Berätta roliga historier</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="8" onclick="radio8_value='2'" value="2" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Visa Dina Kung Fu moves</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">9. Vilken är Din viktigaste uppgift på festen?</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Sköta stereon</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Blanda alla de nyaste drinkarna</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='3'" value="3" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Bjuda dit mer folk</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Knyta ihop alla skosnören</font></td>

</tr>

<tr>

<td width="26" align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Gömma alla jackor</font></td>

</tr>

<tr>

<td align="center">

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="9" onclick="radio9_value='1'" value="1" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Äta upp all mat i kylen</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td colspan="11"><font face="Kristen ITC" size="2">10. Hur avslutar Du festkvällen?</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='4'" value="4" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Däckar på dass</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='6'" value="6" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Drar ut på stan</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='5'" value="5" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Går med någon hem</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='1'" value="1" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Mamma hämtar mig efter

22-nyheterna</font></td>

</tr>

<tr>

<td width="26"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='2'" value="2" style="float: left"></font></td>

<td width="507" align="left" colspan="10">

<font face="Kristen ITC" size="2">Hjälper till att städa</font></td>

</tr>

<tr>

<td>

<p align="center"><font face="Kristen ITC">

<input type="Radio" name="10" onclick="radio10_value='3'" value="3" style="float: left"></font></td>

<td colspan="10" align="left"><font face="Kristen ITC" size="2">Dricker upp det sista i alla kvarlämnade

glas</font></td>

</tr>

<tr>

<td colspan="11"> </td>

</tr>

<tr>

<td width="535" colspan="11"> </td>

</tr>

<tr>

<td width="537" align="center" colspan="11"><font face="Kristen ITC">

<input type="button" value="Beräkna Ball-faktor" onclick="javascript:return check()"></font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center"> </td>

</tr>

<tr>

<td width="537" colspan="11" align="center"><font face="Kristen ITC">

<font size="2">På en ball-skala från 1 till 10 är Du en: </font>

<input id="summa" name="summa" size="2"><font size="2">:a</font></font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center"> </td>

</tr>

<tr>

<td width="537" colspan="11" align="center">

<div style="position: absolute; width: 89px; height: 26px; z-index: 4; left: 131px; top: 2254px" id="GoBack">

<font face="Kristen ITC" size="2">

<a href="../tests.htm">

<img border="0" id="img2" src="button3D.jpg" height="28" width="139" alt="Tillbaka!" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button3E.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button3D.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button3F.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button3E.jpg')" fp-style="fp-btn: Metal Rectangle 5; fp-font: Kristen ITC; fp-font-style: Bold; fp-font-size: 14" fp-title="Tillbaka!"></a></font></div>

<p><font face="Kristen ITC" size="2">Utmana en kompis!</font></td>

</tr>

<tr>

<td width="537" colspan="11" align="center">

 </td>

</tr>

<tr>

<td width="25%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Ditt namn:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="utmanare" size="28"></td>

</tr>

<tr>

<td width="25%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din e-post:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="utmanaresmail" size="28"></td>

</tr>

<tr>

<td width="50%" colspan="11" align="left">

 </td>

</tr>

<tr>

<td width="50%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din kompis namn:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="kompis" size="28"></td>

</tr>

<tr>

<td width="50%" colspan="4" align="left">

<font face="Kristen ITC" size="2">Din kompis e-post:</font></td>

<td colspan="7" align="left" width="50%">

<input type="text" name="kompismail" size="28"></td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="538" colspan="11" align="center">

<input type="submit" value="Skicka utmaning!" name="Skicka"></td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

<tr>

<td width="108" colspan="2" align="left">

 </td>

<td width="108" colspan="2" align="left">

 </td>

<td width="59" colspan="3" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

<td width="107" colspan="2" align="left">

 </td>

</tr>

</table>

</form>

</body>[/log]

 

Nu funkar det att fältet med "ball-faktor" måste vara ifyllt, men nu kallas inte min ASP-fil. Det händer ingenting när man klickar på "Utmana!"-knappen.

 

Har dessutom lagt in en funktion som ska kontrollera att namn och e-post är ifyllt...

Men alerten kommer upp alltid, trots att fälten är ifyllda...

 

/blir sååå trött

 

[inlägget ändrat 2006-05-10 07:52:54 av MrHall]

Link to comment
Share on other sites

Micke_skane

Kolla på ditt förslag.

function checkutmana() {
if(utmanare=="" || utmanaresmail=="" || kompis=="" || kompismail=="") {
alert("Du måste fylla i alla fält med namn och e-post");return false;
}
}

Hur ska funktionen veta vad som är utmanare, utmanaresmail, kompis, kompismail?

Du måste berätta det för funktionen.

 

Om du nu vill kolla flera fält så gör så här.

[log]

function checkSumma([color="#0000ff"]form[/color]) {
if (form.summa.value=="") {
alert("Beräkna en Ball-faktor först");
return false
}
if (form.utmanare.value=="") {
alert("Fyll i utamanare!");
form.utmanare.focus();
return false;
}
if (form.utmanaresmail.value=="") {
alert("Fyll i utmanaresmail!");
form.utmanaresmail.focus();
return false;
}
if (form.kompis.value=="") {
alert("Fyll i kompis!");
form.kompis.focus();
return false;
}
if (form.kompismail.value=="") {
alert("Fyll i kompismail!");
form.kompismail.focus();
return false;
}

[/log]

 

Ändra sen din form-tagg till:

<form action="utmana.asp" onsubmit="javascript:return checkSumma([color="#0000ff"]this[/color])";>

 

Det blåmarkerade visar kopplingen mellan formuläret och funktionen.

Se och lär :)

 

Det finns såklart flera olika sätt att kolla ett formulär men jag tog detta då det kanske är lättast för dig att få grepp om.

Då jag är extra snäll idag fick du hela koden :)

 

[inlägget ändrat 2006-05-10 09:38:36 av Micke_skane]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...