DickDeeds Posted June 21, 2007 Share Posted June 21, 2007 I have a function that was working OK and now does not seem to respond at all. Here is some of the code:$one=”1”;Amount #1 <input type="text" id="amount1" name="amount1" onblur="getremainder($one);" onfocus="setback(this);" disabled value="'.$amount1.'"><script language="javascript" type="text/javascript"><!-- hide the script for older browsersfunction getremainder(iwhich){var total;alert("in getremainder");if (!isNaN(document.frm_collection.amount))amount=0;elseamount=document.frm_collection.amount.value;amount = parseFloat(amount);amount1=0;amount2=0;amount3=0;amount4=0; …….I tried just (1) in the onblur call as well as (\'1\') and (\"1\"). I put the alert statement ("in getmemainder") and it never shows nor does the logic work any longler. No code was changed in the function since it was working.Q1. Can you have more than one call in the <input tag-onblur="getremainder($one);" onfocus="setback(this);" ?If you can, any ideas why the function does not respond??TIA###### Deeds Link to comment Share on other sites More sharing options...
justsomeguy Posted June 21, 2007 Share Posted June 21, 2007 If this is PHP code, then the syntax is a little wrong for the input line, I'm not sure what's going on there. It should be like this: <?php$one="1";echo "Amount #1 <input type=\"text\" id=\"amount1\" name=\"amount1\" onblur=\"getremainder($one);\" onfocus=\"setback(this);\" disabled value=\"".$amount1."\">";?> Also, due to the fact that the input box is disabled, it probably doesn't receive focus or blur events at all. You can also try using a Javascript console to check for error messages. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.