Hello,
I am by no means a programmer, but I was able to build a small JavaScript that redirects users to a link depending on their name. this works well.
I need to add a condition to my script but not sure how to go about it.
This is what my script looks like
so what I am looking to do is
Not sure how to add the highlighted part
I think I could do a variable?
and insert it where the highlighted code is ??
any suggestions are more than welcome!!
Thanks
EV
I am by no means a programmer, but I was able to build a small JavaScript that redirects users to a link depending on their name. this works well.
I need to add a condition to my script but not sure how to go about it.
This is what my script looks like
JavaScript:
<script language="JavaScript">
temp= window.prompt ("Please Type Your Name" , "");
if (temp=="") { window.location="[URL unfurl="true"]http://mywebsite/rma1/redirect.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>";}
else if (temp=="Shu"|| temp=="shu"|| temp=="SHU"|| temp=="SShah" || temp=="Justin"|| temp=="JUSTIN"|| temp=="justin"|| temp=="JThomas" || temp=="Jaime" || temp=="jaime" ||temp=="JAIME" || temp=="piotr" ||temp=="PIOTR") { window.location="[URL unfurl="true"]http://mywebsite/rma1/editquality.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>&" + "temp=" + temp;}
else if (temp=="Kim"|| temp=="kim"|| temp=="mike"|| temp=="Mike"|| temp=="MIKE"|| temp=="barb"|| temp=="Kimberligh") { window.location="[URL unfurl="true"]http://mywebsite/rma1/editcredit.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>&" + "temp=" + temp;}
else if (temp=="George"|| temp=="george"|| temp=="veronica"|| temp=="Veronica"|| temp=="VERONICA"|| temp=="Cindy"|| temp=="GEORGE"|| temp=="JESS"|| temp=="jessica"|| temp=="Jessica"|| temp=="jess"|| temp=="Jess"|| temp=="Kevin"|| temp=="kevin"|| temp=="Shu"|| temp=="shu"|| temp=="Sue"|| temp=="tina"|| temp=="Tina"|| temp=="TINA"|| temp=="sue"|| temp=="Justin"|| temp=="JUSTIN" || temp=="JTomas" || temp=="Jaime" || temp=="jaime" ||temp=="JAIME" || temp=="Piotr" || temp=="piotr" ||temp=="PIOTR" || temp=="cynthia" || temp=="CYNTHIA" ||temp=="Cynthia") { window.location="[URL unfurl="true"]http://mywebsite/rma1/editcustserv.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>&" + "temp=" + temp;}
</script>
so what I am looking to do is
Code:
else if (temp=="Shu"|| temp=="shu"|| temp=="SHU"|| temp=="SShah" || temp=="Justin"|| temp=="JUSTIN"|| temp=="justin"|| temp=="JThomas" || temp=="Jaime" || temp=="jaime" ||temp=="JAIME" || temp=="piotr" ||temp=="PIOTR") [highlight #FCE94F]and database field frmtype = credit then redirect to[/highlight] { window.location="[URL unfurl="true"]http://mywebsite/rma1/editquality.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>&" + "temp=" + temp;}
Not sure how to add the highlighted part
I think I could do a variable?
Code:
var S=document.form.frmtype.value;
any suggestions are more than welcome!!
Thanks
EV