Hej NG!
Jeg har et stort problem som jeg ikke selv kan finde løsningen på. Håber på
hjælp!
Sagen er: Jeg har få hjælp fra NG dk."edb.internet.webdesing.clientside"
m.h.t. et javascript til 4 dato rullemenuer.
Ham der har hjulpet mig (Stig) og som lavede scriptet, lagde siden op på sin
hjemmeside. Testen fungerede perfekt, men når jeg laver en "copy and paste"
fra HTML-koden fra "demo" siden og sætter ind i FrontPage siden, ser det
rigtigt, men straks jeg "saver" laver FP om på koderne og linie 166 til 394
forsvinder ud i den "blå luft". hvilket er meget uheldigt!
Kan en eller anden hjælpe mig.
Scriptet "som forsvinder" kommer her:
<body bgcolor="#B8E0F0" vlink="#0000FF" alink="#0000FF"
background="blaabaggrund.gif">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script
Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (!validate_date()) return false ;
if (theForm.Dette_er_en.selectedIndex == 0)
{
alert("The first \"Jeg ønsker at foretage\" option is not a valid
selection. Please choose one of the other options.");
theForm.Dette_er_en.focus();
return (false);
}
if (theForm.Vi_skal_spille_til.selectedIndex < 0)
{
alert("Please select one of the \"Hvad skal vi spille til\" options.");
theForm.Vi_skal_spille_til.focus();
return (false);
}
if (theForm.Vi_skal_spille_til.selectedIndex == 0)
{
alert("The first \"Hvad skal vi spille til\" option is not a valid
selection. Please choose one of the other options.");
theForm.Vi_skal_spille_til.focus();
return (false);
}
if (theForm.Dag.selectedIndex < 0)
{
alert("Please select one of the \"Dag\" options.");
theForm.Dag.focus();
return (false);
}
if (theForm.Dag.selectedIndex == 0)
{
alert("The first \"Dag\" option is not a valid selection. Please choose
one of the other options.");
theForm.Dag.focus();
return (false);
}
if (theForm.Dato.selectedIndex < 0)
{
alert("Please select one of the \"Dato\" options.");
theForm.Dato.focus();
return (false);
}
if (theForm.Dato.selectedIndex == 0)
{
alert("The first \"Dato\" option is not a valid selection. Please
choose one of the other options.");
theForm.Dato.focus();
return (false);
}
if (theForm.Mdr.selectedIndex < 0)
{
alert("Please select one of the \"Måned\" options.");
theForm.Mdr.focus();
return (false);
}
if (theForm.Mdr.selectedIndex == 0)
{
alert("The first \"Måned\" option is not a valid selection. Please
choose one of the other options.");
theForm.Mdr.focus();
return (false);
}
if (theForm.Året.selectedIndex < 0)
{
alert("Please select one of the \"År\" options.");
theForm.Året.focus();
return (false);
}
if (theForm.Året.selectedIndex == 0)
{
alert("The first \"År\" option is not a valid selection. Please choose
one of the other options.");
theForm.Året.focus();
return (false);
}
if (theForm.Klokkeslet.selectedIndex < 0)
{
alert("Please select one of the \"Klokkeslet\" options.");
theForm.Klokkeslet.focus();
return (false);
}
if (theForm.Klokkeslet.selectedIndex == 0)
{
alert("The first \"Klokkeslet\" option is not a valid selection. Please
choose one of the other options.");
theForm.Klokkeslet.focus();
return (false);
}
if (theForm.Vi_skal_spille_for.value == "")
{
alert("Please enter a value for the \"Hvem skal vi spille for\"
field.");
theForm.Vi_skal_spille_for.focus();
return (false);
}
if (theForm.Vi_skal_spille_for.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Hvem skal vi spille
for\" field.");
theForm.Vi_skal_spille_for.focus();
return (false);
}
if (theForm.Adressen.value == "")
{
alert("Please enter a value for the \"På hvilken adresse\" field.");
theForm.Adressen.focus();
return (false);
}
if (theForm.Adressen.value.length > 50)
{
alert("Please enter at most 50 characters in the \"På hvilken adresse\"
field.");
theForm.Adressen.focus();
return (false);
}
if (theForm.Postnummeret.value == "")
{
alert("Please enter a value for the \"Hvilket postnummer\" field.");
theForm.Postnummeret.focus();
return (false);
}
if (theForm.Postnummeret.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Hvilket postnummer\"
field.");
theForm.Postnummeret.focus();
return (false);
}
if (theForm.Relation.selectedIndex < 0)
{
alert("Please select one of the \"Dine relationer\" options.");
theForm.Relation.focus();
return (false);
}
if (theForm.Relation.selectedIndex == 0)
{
alert("The first \"Dine relationer\" option is not a valid selection.
Please choose one of the other options.");
theForm.Relation.focus();
return (false);
}
if (theForm.Navn.value == "")
{
alert("Please enter a value for the \"Navn\" field.");
theForm.Navn.focus();
return (false);
}
if (theForm.Navn.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Navn\" field.");
theForm.Navn.focus();
return (false);
}
if (theForm.Adresse.value == "")
{
alert("Please enter a value for the \"Adresse\" field.");
theForm.Adresse.focus();
return (false);
}
if (theForm.Adresse.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Adresse\" field.");
theForm.Adresse.focus();
return (false);
}
if (theForm.Postnummer.value == "")
{
alert("Please enter a value for the \"Postnummeret\" field.");
theForm.Postnummer.focus();
return (false);
}
if (theForm.Postnummer.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Postnummeret\"
field.");
theForm.Postnummer.focus();
return (false);
}
var checkOK =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfSOZsozYÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
\t\r\n\f";
var checkStr = theForm.Egne_forslag.value;
var allValid = true;
var validGroups = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("Please enter only letter and whitespace characters in the \"Egne
forslag\" field.");
theForm.Egne_forslag.focus();
return (false);
}
if (theForm.Hvor_fandt_du_hjemmesiden.selectedIndex == 0)
{
alert("The first \"Hvor fandt du hjemmesiden ?\" option is not a valid
selection. Please choose one of the other options.");
theForm.Hvor_fandt_du_hjemmesiden.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form
method="POST" action="_vti_bin/shtml.dll/formular.htm" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript"
name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" s-email-format="TEXT/PRE"
s-email-address="kontakt@morgenmusikken.dk" b-email-label-fields="TRUE"
b-email-subject-from-field="FALSE" s-email-subject="Formular"
s-builtin-fields u-confirmation-url="svar.htm" startspan --><input
TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults"
endspan i-checksum="43374" --><p align="center">
Efter der er "saved" er HTML-koden kun: (linie 167-169)
<body bgcolor="#B8E0F0" vlink="#0000FF" alink="#0000FF"
background="blaabaggrund.gif">
<form method="POST" action="--WEBBOT-SELF--" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript"
name="FrontPage_Form1">
<!--webbot bot="SaveResults" s-email-format="TEXT/PRE"
s-email-address="kontakt@morgenmusikken.dk" b-email-label-fields="TRUE"
b-email-subject-from-field="FALSE" s-email-subject="Formular"
s-builtin-fields u-confirmation-url="svar.htm" startspan --><input
TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults"
endspan i-checksum="43374" --><p align="center">
Linket til siden er:
www.morgenmusikken.dk/formular.htm
På forhånd, tak!
hilsen
Peter