javatiger wrote:
Grant Wagner <gw*****@agricoreunited.com> wrote in message news:<41***************@agricoreunited.com>... javatiger wrote:
Can anyone give me the code or point me in the direction of a simple
javascript certificate maker so that users can input there name and
date so as to use on my site?
cheers
Since client-side JavaScript has no ability to write to the local disk,
even if it could generate certificates, they could not be stored
anywhere locally. If you want your end users to have certificates to use
your site, you'll need to generate them and distribute them to your
users (or pay someone else to generate them).
Maybe I'm misunderstanding your question?
I meant an award certificate, you type in your name, date of award etc
then click go, then theres a page with your award certificate.
Simple:
page1.html:
<body>
<form name="myForm" method="get" action="page2.html">
<input type="text" name="personsName">
<input type="text" name="theDate">
<input type="submit" value="Get certificate">
</form>
</body>
page2.html:
<body>
<script type="text/javascript">
var searchString = window.location.search.substring(1);
var Parameters = {};
var nameValuePairs = searchString.split(/&/);
var nameValuePair;
for (var i = 0; i < nameValuePairs.length; i++) {
nameValuePair = nameValuePairs[i].split(/=/);
Parameters[nameValuePair[0]] = nameValuePair[1];
}
document.write(
'<h1>Certificate for ' +
Parameters['personsName'] +
'</h1>' +
'<h2>issued on ' +
Parameters['theDate'] +
'.</h2>' +
'<h3>Congratulations on your achievement!</h3>'
);
</script>
</body>
Of course, there is no way to stop someone from visiting page1 and issuing certificate after certificate for
themselves or others, for any date they wish.
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq