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

[eluser]Amitabh Roy[/eluser]
I tried to figure out what you meant , but am not sure I understood you fully, so if you can elaborate more, it would be great.

What I understood is , when one clicks the add button a textfield is generated with a given value.

Code:
$(this).before('<input type="textbox" name="textbox' + tempCounter + '" id="textbox' + tempCounter + '" value="textbox'+  tempCounter + '" /><br/>')

and you need to correct the html a bit, the input type of textfield is text , so it should be


Code:
$(this).before('<input type="text" name="textbox' + tempCounter + '" id="textbox' + tempCounter + '" value="textbox'+ tempCounter + '" /><br/>')

Now you can set the value blank when you generate the textfield


Code:
$(this).before('<input type="text" name="textbox' + tempCounter + '" id="textbox' + tempCounter + '" value="" /><br/>')

User can fill up their own value here, and to save it , you will need to either submit the form via POST or make an ajax POST call to the server and pass the data so that it can be handled by a CI controller at the server end.


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