Code:
<script type="text/javascript" language="JavaScript">
window.onload = function()
{
if (confirm('Are you a current EvaluteEnergy Subscriber?'))
{
window.open('download.php', 'Download');
}
else
{
<form name="order" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value ="user@dom.com">
<input type="hidden" name="currency_code" value="GBP">
<INPUT TYPE="hidden" NAME="item_number_1" VALUE="11">
<INPUT TYPE="hidden" NAME="item_name_1" VALUE="2004 Results Analysis">
<INPUT TYPE="hidden" NAME="amount_1" VALUE="50.00">
</form>
order.submit();
}
}
</script>
I'm using the above to prompt the user, however nothing is coming up currently.... anyone see any glaring errors?
EDIT: Found the error, due to my complete n00bness to JS, obviously you declare the form before the js. Duh...
Thanks
Bookmarks