Hi-
I’ve been working on a site where you can make greeting cards (just birthday cards so far). The problem I’m having is when you try to send the card. It’s supposed to check the location.search to detirmine if the user is sending the card or recieving it. But it always displays as if you are recieving it ?… The card-maker file is attatched. I’ll post the code to the “sendcard.html”, since you can only attatch one file at a time. Here is the code for “sendcard.html”:
<body onLoad=”Check()”><h3><div id=”recieve”>Click Here To Recieve Your Greeting: <div id=”recieve_link”></div></div><div id=”send”>Click Here to send this card to the addressee: <div id=”send_link”></div></div>
<script>
function Check() {
if (!location.search) { document.write(“There is no card to display.”); return; }
if (location.search.match(“&*recieve”)) { document.getElementById(“recieve”).style.visibility=””; document.getElementById(“send”).style.visibility=”hidden”; }
loc=location.search.split(“&”)[1];
mess=location.search.split(“&”)[0];
document.getElementById(“send_link”).innerHTML=”<a href=”MailTo:
document.getElementById(“recieve_link”).innerHTML=”<a href='”+loc+”?message=”+mess.substring(1, mess.length)+”‘>Your Greeting</a>”;
}
</script>
This is only supposed to work on Netscape so far. Please help me if you can.
-IceMetalPunk ?
[upl-file uuid=75edbc6e-ee3e-4d71-82cf-8e2fb84e6899 size=4kB]cardmaker.txt