All the lines in the form needed to be written with document.write. I have made the modification to your code and fixed a few syntax errors. The new code is as follows:
Code:
<script language="javascript" type="text/javascript">
<!--
{
var p="$90.00"
if (p == '$90.00')
{
document.write(p)
document.write('<form action="https://xxx.xxx.xxx/cgi-bin/script" method="post"> ')
document.write('<input type="hidden" name="cmd" value="_xclick"> ')
document.write('<input type="hidden" name="user" value="xxxxxxx"> ')
document.write('<input type="hidden" name="item_name" value="item selected"> ')
document.write('<input type="hidden" name="amount" value="90.00"> ')
document.write('<input type="hidden" name="no_note" value="1"> ')
document.write('<input type="hidden" name="currency_code" value="USD"> ')
document.write('<input type="image" src="https://xxx.xxx.xxx/button.gif"> ')
document.write('</form> ')
}
else if (p == '$130.00'){}
else if (p == '$165.00'){}
else if (p == '$175.00') {}
else
document.write("ERROR")
}
-->
</SCRIPT>
Bookmarks