JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 30th, 2012, 03:48 AM
yousg27 yousg27 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 4 yousg27 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 10 sec
Reputation Power: 0
Question PHP-General - Display hidden element twice or more

Hello

I could display hidden element through the use of Java script.

How can I display the same hidden element more than once.



lets say that the email input filed is hidden and when user clicks display email field then it comes up. I wanted to come up again when user clicks the same bottom again.

Reply With Quote
  #2  
Old December 30th, 2012, 04:52 AM
sir_drinxalot's Avatar
sir_drinxalot sir_drinxalot is offline
Known to taste like chicken
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: In front of my computer
Posts: 377 sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level)sir_drinxalot User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 3 h 27 m 44 sec
Reputation Power: 293
Send a message via MSN to sir_drinxalot
not a php question from what I can tell. You would need to use javascript for this.

I think what you are saying is that you want a user to be able to click the button and it adds another field each time they click it? so click it once get 1 field, click it again get a second field etc etc?

if so you would do something like

Code:
document.getElementById('containerDivId').innerHTML += "<input type=\"text\" name\"blah\" id=\"blah\">";


take that code with a grain of salt it's only an example and I'm no javascript expert. Also that would only add the input at the end of the div, so it would be after the </form> tag etc, so more would be needed to achieve what you want, but that's the gist of what you would need.

Maybe a mod could move this thread to the JS forum where you will get more love?
__________________
"Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe

Looking for a project Idea?

Last edited by sir_drinxalot : December 30th, 2012 at 04:55 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > PHP-General - Display hidden element twice or more

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap