Hi all

I'm trying to let a variable value select what form is displayed.

<script language="javascript" type="text/javascript">
<!--
{
var p="$90.00"
if (p == '$90.00')
{
document.write(p)
<form action="https://xxx.xxx.xxx/cgi-bin/script" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="user" value="xxxxxxx">
<input type="hidden" name="item_name" value="item selected">
<input type="hidden" name="amount" value="90.00">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://xxx.xxx.xxx/button.gif
</form>
}

else if (p == '$130.00'){}

else if (p == '$165.00'){}

else if (p == '$175.00') {}

else
document.write("ERROR")
}


Now - the document.write(p) is to test that the variable is set.
After each ELSE IF i would have a variation of the form.
Tell me why this script does not work? Can you tell i'm a neophyte with Java?


John