I have a script that works fine, but I need to split it into two parts.
The script is located at [login to view URL]
Click the button and enter "member" as the password, and you are taken to the shopping cart URL.
Right now, all of the script code is in the <head>. I need to adjust it so the destination URL is moved to the <body> area. So the submit button code is something like this...
<input type="button" value="Buy as Member" onClick="passWord()" url="[login to view URL]">
The reason I am doing this is so I can have many "Buy as Member" links on the same page, without having to have many versions of the same script in the <head> section. I am new to Javascript though, so am not sure how to do this.
Please quote on making this change in the code for me.
* P.S. I do realize that doing passwords via Javascript is totally insecure as all the buyer needs to do is view source. The client just wanted a mild deterrent and doesn't care much whether it's secure or not (as they check member purchases against records either way). Of course, if you DO know of a secure (but still simple) way to do this, I'm all ears