/    Sign up×
Community /Pin to ProfileBookmark

Greeting Card Maker Help

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:[email protected]?subject=A Greeting Card Has Been Sent&body=<a href='”+escape(window.location.href)+”&*
recieve”;
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[/upl-file]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @IceMetalPunk 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,
)...