Slide Div

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Slide Div

Post 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
Gopesh
Forum Contributor
Posts: 143
Joined: Fri Dec 24, 2010 12:48 am
Location: India

Re: Slide Div

Post 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.
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Re: Slide Div

Post by YoussefSiblini »

Thank you very much,

This done it for me.
Gopesh
Forum Contributor
Posts: 143
Joined: Fri Dec 24, 2010 12:48 am
Location: India

Re: Slide Div

Post by Gopesh »

Ok..Good Luck..
Post Reply