>Why not use radio buttons? That way you will automatically get the one-checkbox-allowed behavior.
Weird-ly requirement says it should be check box only ;P
I have 5 check box in my HTML (JSP). Out of those 5, at a time only 1 could be selected. So if I click on one check box, other 4 should be disabled. This is true for all the 5 check boxes.
var A= document.getElementById("A");
var B= document.getElementById("B");
var C=...
I am using struts 1. I have Adobe SPRY tabs in my JSP.
There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed.
I was wondering if there is any way...
Burt since this is autgenerated from JSP, I cannot change it manually, is there any thing I can do in jsp?
in JSP:
<html:text onkeyup="adjustCalcs()" property="A" />
getc onverted to HTML:
<input type="text" name="A" tabindex="2" value="25" onblur="adjustCalcs()">
:) I am not using any HTML. The code I sent you is all I am using in JSP which in turns get converted to HTML usually.
<html>
<table>
<tr>
<td>
<html:text onkeyup="adjustCalcs()" property="A" />
</td>
</tr>
</table>
</html> ....like this.
Right, my code also works but the issue is that the value of 'A' which I read is the old one(25) not the changed one(35).
But surprisingly the changed value of 'B' is being read correctly. Confusing? browser issue?
>What browser are you using? IE 8
HTML: (JSP actually)
<tr>
<td>
<html:text onkeyup="adjustCalcs()" property="A" />
</td>
</tr>
//Javascript function
function adjustCalcs() {
var vala = parseInt(document.getElementById("A").value);
var valb =...
Now I read the values from JSP text fields as:
var vala = parseInt(document.getElementById("A").value);
var valb = parseInt(document.getElementById("B").value);
alert(vala);
alert(valb);
var valc=document.getElementById("C")...
>2. Can you alert the value of dCalc before you try and populate it.
alert for the dCalc comes ok. But assigning part doesn't work. I do not see value of 'd' being changed.
>4. Is your FORM called "form" ?
Yes.
I have a excel sheet that I need to replicate in JSP (using struts 1 framework). Now everything is done but I am stuck at the calculation part. As you might have seen in excel, some columns are calculations based on other columns.
So if I change field 'a', 'd' field should change automatically...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.