![]() |
| ||
| text box value in asp hi plz tell me how to increment textbox value by 1 whenever click submit button in asp.Example let say now my text box value is 1.When user click submit the text box value must change to 2 and so on.Plz reply me. thanx in advance;) |
| ||
| Re: text box value in asp oops... |
| ||
| Re: text box value in asp sorry, continued. <script language="JavaScript">[html] <form method="post" action="somepage.asp" onSubmit="addone()"><input type="text" name="textbox1"><input type="submit" value="submit"></form>[/html] Or more like: <script language="JavaScript">[html] <input type="text" name="textbox1"><input type="Button" value="submit" onClick="addone()"></form>[/html] |
| ||
| Re: text box value in asp Quote:
If combobox value is A.textbox value must be A1.Once user submit,and user choose another item in combobox the item (let say B) textbox must display B2.hope u understand my question.Thanx in advance.Plz post me as soon as possible.Because I need to finish tis function as earlier as possible. |
| ||
| Re: text box value in asp I think this will do it. Tell me what you think... [html] <html><head> <script language="JavaScript"> function addone(){ form1.counter1.value=eval(form1.counter1.value) + 1 form1.submit() }</script> </head><body> <% countsofar = CInt(Request("counter1")) ddselected = CStr(Request("dropdown1")) textbox1now = ddselected & countsofar %> <form method="post" action="test.asp" name="form1"> <select name="dropdown1"> <option value="a" <%if ddselected="a" then response.write("selected") end if%>>a</option> <option value="b" <%if ddselected="b" then response.write("selected") end if%>>b</option> <option value="c" <%if ddselected="c" then response.write("selected") end if%>>c</option> </select> <input type="text" name="textbox1" value="<%=textbox1now%>"> <input type="hidden" name="counter1" value="<%=countsofar%>"> <input type="button" value="submit" onClick="addone()"> </form> </body></html> [/html] |
| ||
| Re: text box value in asp [quote=kdv]hi plz tell me how to increment textbox value by 1 whenever click submit button in asp.Example let say now my text box value is 1.When user click submit the text box value must change to 2 and so on.Plz reply me. thanx in advance;)[/quote iam sending the coding copy pste in ur applcation function ChkZero(x) { if(x == "") return 0; else return x; } function calc(el1,el2,el3,el4) { var a = ChkZero(eval("document.frmansadd."+el1).value); var b = ChkZero(eval("document.frmansadd."+el2).value); var c = ChkZero(eval("document.frmansadd."+el3).value); d = parseInt(a)+parseInt(b)+parseInt(c) eval("document.frmansadd."+el4).value=d; } |
| All times are GMT -4. The time now is 9:46 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC