Forum Moderators: open
The problem seems to be the action attribute on the form, it somehow stops netscape in it's tracks and it doesn't process my js functions.
If I remove the action attribute altogether then it works fine in all of them, but then it's not valid html.
Can anyone help please?
It has more form objects than this, but they are more or less the same as the balance one shown.
This is what doesn't work in netscape,
<form name="ccform" action="">
<input type="text" name="balance" onblur="validbalance(this.value);" value="balance in here" />
<input type="button" name="Button" value="Calc" onclick="process();" />
But changing to, <form name="ccform">, works in everything, but the drawback is it's not valid markup without the action attribute.
Any ideas?
onblurand
onclickevents into simple
alert()calls and it worked OK with
action=""in FF 1.5, Mozila 1.6 and Netscape 4(!)
In fact it makes no difference (to me) whether the action attribute is present or not.
Not sure if you can try setting:
action="javascript:;"
Is there a problem with the functions you call?! May need to see the complete form?
I think I'll just use a browser redirect on netscapes to a seperate version of the file without the action attribute.
Here's the full form, less table tags (i was in a hurry, hehe).
<form name="ccform" action="">
<div align="center">
<input type="text" name="balance" onblur="validbalance(this.value);" value="balance in here" />
</div>
<div align="center">
<select name="monthcc" >
<option value="1" selected>January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
</div>
<div align="center">
<input type="text" name="yearcc" size="10" value="2010" onblur="validyear(this.value);" />
</div>
<div align="center">
<input type="text" name="payment" value="payment in here" onblur="validpayment(this.value);" />
</div>
<div align="center">
<input type="text" name="apr" onblur="validapr(this.value);" value="apr % in here" />
</div>
<div align="center">
<input type="text" name="payprot" onblur="validprot(this.value);" value="protection % in here" />
</div>
<div align="center">
<script language="JavaScript" type="text/javascript">
<!-- hide js
if (brname=="Microsoft Internet Explorer")
{
document.write("<BUTTON name=\"test\" onClick=\"process();\"><IMG src=\"img/calc.gif\" alt=\"calculate now!\" width=\"41\" height=\"21\"></BUTTON>");
}
else
{
document.write("<input type=\"button\" name=\"Button\" value=\"Calc\" onClick=\"process();\">");
}
// end hide -->
</script>
</div>
<div align="center">
<textarea name="output" cols="100" class="results" rows="20"></textarea>
</div>
</form>
I've searched loads of topics on form attributes, bugs, etc, and still can't understand why it won't work on netscape.
Maybe you're right about the javascript being the problem, I'll check that next.
Cheers
<form name="ccform" action="">
<input type="text" name="balance" onblur="alert(this.value);" value="balance in here">
<input type="button" name="Button" value="Calc" onclick="alert('process()');">
</form>
Do the alert boxes show?