Welcome Guest, Not a member yet? Register   Sign In
jquery and CI
#10

[eluser]mehwish[/eluser]
all i have done thans alot for your help Smile one thing more actually i have a value which is generated inside a for loop consider this:

Code:
[removed]
for(i=1; i<=tempCounter1; i++){
        msg= "\n Textbox #" +i+":"+$('#textbox'+i).val();   // this is better
                $('#msg').val(msg);

[removed]

as you can see "msg" values are being updated after every cycle of for loop and using
Code:
$('#msg').val(msg);
i am also updating the hidden field with id "msg". but when a time comes to pass this hideen field value to controller , the last updated value in passed which is obvious.

how to pass the all values to controller ... can I directly pass the "msg" value to database from inside the for loop like is:



Code:
[removed]
for(i=1; i<=tempCounter1; i++){
        msg= "\n Textbox #" +i+":"+$('#textbox'+i).val();   // this is better
                $('#msg').val(msg);
                 DATABSE CODE (insert msg value to table)    

}

[removed]

Or is there any other way to accomplish this?


Messages In This Thread
jquery and CI - by El Forum - 07-08-2011, 05:18 AM
jquery and CI - by El Forum - 07-08-2011, 07:24 AM
jquery and CI - by El Forum - 07-08-2011, 09:34 AM
jquery and CI - by El Forum - 07-08-2011, 10:37 AM
jquery and CI - by El Forum - 07-08-2011, 01:13 PM
jquery and CI - by El Forum - 07-08-2011, 01:16 PM
jquery and CI - by El Forum - 07-08-2011, 01:18 PM
jquery and CI - by El Forum - 07-08-2011, 01:54 PM
jquery and CI - by El Forum - 07-09-2011, 02:56 AM
jquery and CI - by El Forum - 07-10-2011, 06:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB