/    Sign up×
Community /Pin to ProfileBookmark

include files – funky stuff

Trying to get multiple include files loaded based off of cookie values at the bottom. On some machines it works, others NO. When it doesnt work, it only loads the first include file.

<%

IF Response.Cookies(“mycookie”).HasKeys = FALSE Then

Response.redirect “/login/login.asp”

End If

Response.cookies(“meetkit”) = “KIT”

%>
<SCRIPT TYPE=”Text/JavaScript”>

<!–

function ChkForm()

{

// This will cycle through the objects on the form and check to see if the data is valid.
// Calls: ChkSelect, IsBlank, ChkText

var totmsg = “”;
var txttype = “”;
var txtsec65 = “”;
var txtmed = “”;
var txtblue = “”;
var txtfree = “”;
var txtfresec = “”;

txtsec65 = testCookie(“sec65″,”Y”);
txtmed = testCookie(“medgap”,”Y”);
txtblue = testCookie(“secblue”,”Y”);
txtfree = testCookie(“freedom”,”Y”);
txtfresec = testCookie(“secfree”,”Y”);

if (txtsec65 == true)
{
totmsg = totmsg + IsBlank(document.MyForm.tinsurer.value,”Insurer”);

totmsg = totmsg + ChkAlpha(document.MyForm.tinsurer.value,”Insurer”);
totmsg = totmsg + ChkAlpha(document.MyForm.tcity65.value,”Out of State – City”);

totmsg = totmsg + ChkNum(document.MyForm.tzip565.value,”Out of State – Zip Code”);
totmsg = totmsg + ChkNum(document.MyForm.tzip465.value,”Out of State – Zip Code+4″);
if (document.MyForm.tzip565.value != “”)
{
totmsg = totmsg + ChkLength(document.MyForm.tzip565.value,5,”Out of State Zip Code”);
}

totmsg = totmsg + ChkAlphaNum(document.MyForm.taddr165.value,”Out of State – Address Line 1″);
totmsg = totmsg + ChkAlphaNum(document.MyForm.taddr265.value,”Out of State – Address Line 2″);

totmsg = totmsg + ChkSelect(document.MyForm.tcust.selectedIndex,”Sec 65 question”);
totmsg = totmsg + ChkSelect(document.MyForm.trefer.selectedIndex,”Phone question”);
totmsg = totmsg + ChkSelect(document.MyForm.teligall.selectedIndex,”Elig for All question”);
totmsg = totmsg + ChkSelect(document.MyForm.tmmeda.selectedIndex,”Med A- Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tdmeda.selectedIndex,”Med A – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tymeda.selectedIndex,”Med A – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tmmedb.selectedIndex,”Med B – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tdmedb.selectedIndex,”Med B – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tymedb.selectedIndex,”Med B – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tmdob.selectedIndex,”DOB – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tddob.selectedIndex,”DOB – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tydob.selectedIndex,”DOB – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tplanc.selectedIndex,”Plan C question”);
}

if (txtmed == true)
{
totmsg = totmsg + IsBlank(document.MyForm.tinsurer.value,”Insurer”);
totmsg = totmsg + IsBlank(document.MyForm.tclaim1.value,”Claim # – part 1″);
totmsg = totmsg + IsBlank(document.MyForm.tclaim2.value,”Claim # – part 2″);
totmsg = totmsg + IsBlank(document.MyForm.tclaim3.value,”Claim # – part 3″);
totmsg = totmsg + IsBlank(document.MyForm.tclaim4.value,”Claim # – part 4″);

totmsg = totmsg + ChkAlpha(document.MyForm.tclaim4.value,”Claim # – part 4″);

totmsg = totmsg + ChkNum(document.MyForm.tclaim1.value,”Claim # – part 1″);
totmsg = totmsg + ChkNum(document.MyForm.tclaim2.value,”Claim # – part 2″);
totmsg = totmsg + ChkNum(document.MyForm.tclaim3.value,”Claim # – part 3″);

totmsg = totmsg + ChkSelect(document.MyForm.teligall.selectedIndex,”Elig for All question”);
totmsg = totmsg + ChkSelect(document.MyForm.tmmeda.selectedIndex,”Med A- Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tdmeda.selectedIndex,”Med A – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tymeda.selectedIndex,”Med A – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tmmedb.selectedIndex,”Med B – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tdmedb.selectedIndex,”Med B – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tymedb.selectedIndex,”Med B – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tmdob.selectedIndex,”DOB – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tddob.selectedIndex,”DOB – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tydob.selectedIndex,”DOB – Year”);
totmsg = totmsg + ChkSelect(document.MyForm.tplanc.selectedIndex,”Plan C question”);
}

if (txtblue == true)
{
totmsg = totmsg + IsBlank(document.MyForm.tinsurer.value,”Insurer”);

totmsg = totmsg + ChkAlpha(document.MyForm.tinsurer.value,”Insurer”);
totmsg = totmsg + ChkAlpha(document.MyForm.tcity65.value,”Out of State – City”);

totmsg = totmsg + ChkNum(document.MyForm.tzip565.value,”Out of State – Zip Code”);
totmsg = totmsg + ChkNum(document.MyForm.tzip465.value,”Out of State – Zip Code+4″);
if (document.MyForm.tzip565.value != “”)
{
totmsg = totmsg + ChkLength(document.MyForm.tzip565.value,5,”Out of State Zip Code”);
}

totmsg = totmsg + ChkAlphaNum(document.MyForm.taddr165.value,”Out of State – Address Line 1″);
totmsg = totmsg + ChkAlphaNum(document.MyForm.taddr265.value,”Out of State – Address Line 2″);

totmsg = totmsg + ChkSelect(document.MyForm.tcust.selectedIndex,”Sec 65 question”);
totmsg = totmsg + ChkSelect(document.MyForm.trefer.selectedIndex,”Phone question”);
totmsg = totmsg + ChkSelect(document.MyForm.tmdob.selectedIndex,”DOB – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tddob.selectedIndex,”DOB – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tydob.selectedIndex,”DOB – Year”);
}

if (txtfree == true)
{
totmsg = totmsg + IsBlank(document.MyForm.tinsurer.value,”Insurer”);

totmsg = totmsg + ChkSelect(document.MyForm.tcust.selectedIndex,”Sec 65 question”);
totmsg = totmsg + ChkSelect(document.MyForm.trefer.selectedIndex,”Phone question”);
totmsg = totmsg + ChkSelect(document.MyForm.tmdob.selectedIndex,”DOB – Month”);
totmsg = totmsg + ChkSelect(document.MyForm.tddob.selectedIndex,”DOB – Day”);
totmsg = totmsg + ChkSelect(document.MyForm.tydob.selectedIndex,”DOB – Year”);
}

if (txtfresec == true)
{
}

if (totmsg != “”)
{
alert(totmsg);
return false;
}
else
{
return true;
}

}

//–>

</SCRIPT>
<!— #include file=’../includes/jfunct.inc’ —>
<!– #include file=’../includes/vfunct.inc’ –>
<html>

<body bgcolor=black background=”welcomebg.gif” text=yellow link=yellow vlink=yellow>

<center><h2>KIT FULFILLMENT SCREEN</h2></center><BR>

<FORM NAME=”MyForm” ACTION=”popall.asp” onSubmit=”return ChkForm(this) ;” METHOD=”POST”>

<H1>Customer Information</H1> </font>

<HR>

<script language=vbscript>
DIM tfname
DIM tlname
DIM taddr1
DIM tcity
DIM tstate
DIM tzip5
DIM tphone
DIM tgroup
DIM tcust
DIM tinsurer
DIM trefer
DIM tclaim
DIM taddr165
DIM taddr265
DIM tcity65
DIM tstate65
DIM tzip565
DIM tzip465
DIM teligall
DIM tmmeda
DIM tdmeda
DIM tymeda
DIM tmmedb
DIM tdmedb
DIM tymedb
DIM tmdob
DIM tddob
DIM tydob
DIM tclaim1
DIM tclaim2
DIM tclaim3
DIM tclaim4
DIM tplanc
DIM tkit
DIM tcurrent
DIM tpolicy
DIM tidnum
DIM tccare
DIM tpblue
DIM tcoverage
</script>

<%
if request.cookies(“sec65”) = “Y” OR request.cookies(“secblue”) = “Y” Then

%>
<!– #include file=../includes/secblu.inc –>
<%
RESPONSE.WRITE “<HR>”
end if
if request.cookies(“medgap”) = “Y” then
%>
<!– #include file=../includes/medkit.inc –>
<%

RESPONSE.WRITE “<HR>”
end if
if request.cookies(“keymu”) = “Y” then
%>
<!– #include file=../includes/keykit.inc –>
<%

RESPONSE.WRITE “<HR>”
end if
if request.cookies(“compcare”) = “Y” then
%>
<!– #include file=../includes/groupkit.inc –>
<%

RESPONSE.WRITE “<HR>”
end if
if request.cookies(“dirblue”) = “Y” then
%>
<!– #include file=../includes/kithot.inc –>
<%

RESPONSE.WRITE “<HR>”
end if
if request.cookies(“freedom”) = “Y” then
%>
<!– #include file=../includes/freedomkit.inc –>
<%

RESPONSE.WRITE “<HR>”
end if
%>
<INPUT NAME=”submit” TYPE=SUBMIT VALUE=”Submit Form”>

<INPUT NAME=”reset” TYPE=RESET VALUE=”Reset Form”>

</FORM>
</body>

</html>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @kbrown2974 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...