Page 1 of 1

Slide Div

Posted: Sat Feb 25, 2012 12:39 am
by YoussefSiblini
Hi Guys,

I will try to make it simple, I have this code:

Code: Select all

<input name="ufile[]" type="file" id="ufile[]" size="50" /><a href="#" id="add" class="add">Add</a>
What I want to achieve is when user click the add link it add another <input name="ufile[]" type="file" id="ufile[]" size="50" /> and if he clicked again it add again until 5, I don't want him to add more than 5.

I am newbie with JavaScript/Jquery, So it will be appreciated if you can put code example :)

Many thanks,


Youssef

Re: Slide Div

Posted: Sat Feb 25, 2012 6:26 am
by Gopesh
Hi,Hope that u need to dynamically create textbox for file upload.
Check this links:
http://stackoverflow.com/questions/4204 ... ing-jquery
http://jsfiddle.net/u9hvp/
It uses jquery .Hope it gives u an idea.

Re: Slide Div

Posted: Sat Feb 25, 2012 9:43 am
by YoussefSiblini
Thank you very much,

This done it for me.

Re: Slide Div

Posted: Sat Feb 25, 2012 10:34 pm
by Gopesh
Ok..Good Luck..