SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
-
Nov 10, 2006, 12:40 #1
Disply none but use the values as hidden values
<div style="display:none ">
<select name="Country" >
<option value="UA">Ukraine</option>
</select>
</div>
when ii use style="display:none " as shown above , is that means drop down is not visible on UI but values are their and i can pass them to next form.
is it correct what am geting from this code.
i can use value of Country in next page ?
is this like a simple hidden variable ?
-
Nov 10, 2006, 13:26 #2
any one its urgent for me ...please
-
Nov 10, 2006, 13:33 #3
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
display none
That may work but I don't think it's really needed. A simple hidden input would do the same thing.
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Nov 10, 2006, 13:47 #4
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Also note that when you use display: none; it can foul up some screen readers (not that it would matter in this case). Mittineague also has the right idea. Just use a hidden input field instead.
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Nov 10, 2006, 14:07 #5
my case is little different , i cant use hidden field for this but i want to use drop down which is hidden.
so the main catch if am hiding this it will still work like hidden variable...?
-
Nov 10, 2006, 14:30 #6
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
hidden drop-down
If the drop-down is hidden, how can it be selected? And if it only has 1 option, why not just put that value in a hidden input?
Please explain why you can't use a hidden input so I can understand what you're trying to do.
Originally Posted by simplecode
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Nov 10, 2006, 14:42 #7
<select name="Country" >
<option selected value="US">United States</option>
<option value="CA">Canada</option>
<option value="UK">UK</option>
</select>
this is drop down and in background as per some conditions am selecting one vale of drop down
-
Nov 10, 2006, 14:54 #8
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
hidden value
Even if there is more than 1 value, I think that whatever code is being used to determine the selects value would still be more complex than code that would assign a value to a hidden input.
As I said, it should end up with the same net result doing it with a select with display: hidden as it would with an input type=hidden, it's just unnecessarily more "messy". And as Dan Schulz mentioned, it could cause problems for some users.Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Nov 10, 2006, 14:57 #9
i think the difference between display:none and visibility:hidden is
display:none hides the complete block and dont occupies space but visibility:hidden hides the block and oddupies the space as well.
-
Nov 10, 2006, 15:33 #10
- Join Date
- Oct 2003
- Location
- Your Monitor
- Posts
- 1,146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is there a particular reason you can't use hidden fields? If it's a privacy issue (or something like that) wouldn't a hidden drop-down pretty much equal a hidden field??
Besides, I'm not sure the display:none will pass the value always which could make it not so reliable.... could be wrong though.
-
Nov 10, 2006, 15:41 #11
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
css
Originally Posted by simplecode
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Nov 10, 2006, 15:48 #12
yes that true but as i told you in this case i need that drop down and its value but i dont want to show them, this main concern.
yup you are right instead of that we can use hidden values but i cant do that and i want value of drop down to get pass from this page.
i think the above code is not goin to creat any issue.....
whts ur thoughts
Bookmarks