HTML - How Many Ways Are There To Show A Default Item In A Select Statement?
Hello!I would like to know if there is another way preselect OPTION VALUE than what I have done below? If I use what I have done below to dynamically the "SELECTED VALUE=" AREA WITH A _get/$VARIABLE, I will end up with 2 identical entries in my drop-down list (such as 2 AVA entries) and I would like to avoid this. Any ideas on how I could avoid this using a different type of method on selecting a default item?
Thank you! Code: <SELECT NAME="custom2"> <OPTION SELECTED="SELECTED" VALUE="Lettering Style ADX">ADX</OPTION> <OPTION VALUE="Lettering Style AJA">AJA</OPTION> <OPTION VALUE="Lettering Style AMZ">AMZ</OPTION> <OPTION VALUE="Lettering Style ATH">ATH</OPTION> <OPTION VALUE="Lettering Style AVA">AVA</OPTION> <OPTION VALUE="Lettering Style BAM">BAM</OPTION> </SELECT> Similar TutorialsHow do I get the selected item from a select option list? I dont need the value I need the text associated with the value. I can get the value with (in vbscript): strValue = .mylist.value Have searched google exhaustively to see how to do this simple thing but have found nothing. Thanks. Hi All, I've been asked to make some hyperlinks that automatically select items in a drop down menu in a contact form. Is this possible if so, how is it done Thanks in advance Bluestreak Hi, I am creating a form in which i have a dropdown menu. According to the selection(s) in drop down menu, that many text field(s) should be shown below that drop down menu. Have a look at this code... <html> <head> <title> Sample Application </title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> function callMe() { if(document.MyForm.dropDownValue.value != ""){ document.getElementById("txtBox").style.visibility = "visible"; } else{ document.getElementById("txtBox").style.visibility = "hidden"; } } </script> </head> <body> <form name="MyForm"> <table> <tr> <td> <select name="dropDownValue" onchange="callMe();"> <option value="">--None--</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> </tr> <tr id="txtBox" style="visibilty:visible"> <td> Enter Your Value He </td> <td> <input type="text" name="txtEntry" value=""> </td> </tr> </table> </body> </html> : the problem is: when I select 2, it suppose to show 2 text fileds and 3 when i select 3 accordingly. I am new to this stuff...so,can any one help me out ASAP pls?? thanks , i will be waiting for your reply... -S I have a select box like so Code: <select name="something" Size=10 multiple style="font-family:monospace; font-size:8pt"> <option value='opt1'>Option 1</option> <option value='opt2'>Option 2</option> <option value='opt3'>Option 3</option> ... <option value='opt9000'>Option 9000</option> </select> Now Let's say that I wanted opt45 to be preselected, how do I get the select box to position the scroll bar to where opt45 would be in the list. I've figured out how to preselect things, but the user can't tell because it's 35 lines below the select box. I want this select menu to show 2 items at a time and allow multiple selections. The size tag should show only 2 items but instead it shows all of the items. How can I get only 2 items shown? Thank you so much for your time! Code: <select multiple name="category" size="2"> <option value="livemodel">Live Model</option> <option value="museum">Museum</option> <option value="subwaysketch">Subway Sketch</option> <option value="livemodel">Live Model</option> <option value="museum">Museum</option> <option value="subwaysketch">Subway Sketch</option> </select> I've got a bunch of tel: links on a site that work great with mobiles and desktops that have softphones but how can I tell the browser to not treat it like a dead link if no such application exists? Here's an example - clik on any phone number: http://sketch.uk.com/admin_contacts.php?menu=8 Hello- A quick question for those in the know: Is it considered "proper" to put multiple between words to space them out, or is another method preferred as the "correct" way to do it? I've used tables and transparent 1x1 .gifs for spacing as well depending on the page, but there are a number of times where it's just easier to lay about ten or fifteen nbsps in there till the text is nudged over where you need it and be done with it. Makes for an ugly source, but seems to work fine. It seems to render properly doing it this way, at least in IE and Firefox, but is it still kosher to do so? Or is everything "proper" supposed to be done with style sheets now? Thanks, Hi, I am trying to solve this for few days, but i cant slove it, so frustrated and nervous. Following is my coding: <select name="lang" onChange="form.redirect.value='index.html'; form.submit()" > <option value=0>English</option> <option value=1>English</option> <option value=2>Francais</option> <option value=3>Castellano</option> <option value=4>Deutsch</option> </select> how can i set English as default? yet user can see the Word "English" appear as deafult. HElp me please..Thanks and appreciate for your help :-) I'm trying to put default values in my Input fields, which are text fields, of course, but I have numeric input values so I want them on the right. Is there any way to do this? here's a snippet of my code so's you can see what I mean: <form action="" id="calculate_form"> <div> <table style="width: 937px; height: 438px;"> <tbody> <tr> <td> Height: (Metres) </td> <td style="text-align: center; vertical-align: top;"> <p><input value="0" name="height" id="height" /> </p> </td> <td> Cement Price/20kg Bag<br /> </td> <td><input value="7" name="cementprice" id="cementprice" /></td> </tr> <tr> <td>Breadth: (Metres)</td> <td style="text-align: center; vertical-align: middle;"> <p><input value="0" name="breadth" id="breadth" /> and so on........... Perhaps it can't be done in HTML? In that case, what could it be done in? i've got a javascript script on this page, to do the calcs. I have a document with objects positioned with Absolute values. I want to center the page vertically and horizontally. Is there any way to change the default X and Y, so that the page will display where I want it to? Thank so much. Rick Hi Hope someone can help. I am new to HTML and i am a bit stuck. I have written a Java script to populate a text box with the contents of a directory and what I want to do is to display a gif or picture whilst the data is getting retrieved. My code is (it is in a grid) <TD><textarea name="files" cols="50" rows="20">test</textarea></TD> What I want is to have the box show a pic as default until the script loads the data. Thanks Paul I was just curious when I make a form element, if there is a default name that is set to that form if I do not use the "name=" attribute". Hi guys..i have 1 table which is background color is black. I also have link <a></a> inside that table. Once user click the link, it will change the table background color to red. Then when user click the link again,the color willl change to default color,black. i have no idea how to do that. any help? I've got a website here that's split into two frames. The top frame is the header and the bottom frame is the page body. When I print, it only seems to print the header. How can I get it to print the body by default (i.e. without clicking on the body first)? So i'm trying to change some of my default link colours, but everything that I have tried so far hasn't worked. Right now, I have this piece of code in my body tag. HTML Code: link="#00CC33" I don't know if it is correct or not, but how do I change the link colour? I've tried searching, but have had no luck at all. Is this code necessary if I only need zero for all of these, in any given table? Is zero the default setting if none is set? Can I just eliminate this code? FYI (It came as part of a table template.) border=0 cellpadding=0 cellspacing=0 style="margin-top:0;" Hi Guys, I need to display a default image if a user doesn't upload one eg: :::::::::Current Code::::::: <img src="{src}" {width} {height} border="0" hspace="0" alt="{alt}"> //shows the image if a user uploads one How can i alter the code so that if a user doesnt upload one it defaults to images/default.gif Thanks I need some way to automatically change a Frame's contents based upon the title of the RSS feed on the left, I need some way to automatically specify the APPNAME in this URL (for the frame) "http://www.google.com/search?btnI=1&q=APPNAME+site:appshopper.com". This URL loads the App Shopper page for the app it corresponds with. If there is any way to do this, I would be greatly appreciative. Thank you Is it possible to have a <li> without it showing the bullet symbol? I want a list item that does everything a normal <li> does but doesn't look like a list item. Alternatively, is it possible to end a <ul> without unwanted space appearing after it? I want the next item to appear exactly on the next line but no matter what margins I specify in my <ul>'s CSS it leaves a blank line. A solution to either of these issues will solve my problem! Thanks, -sbs Ok here is my story i have a really good page page for my pc but when i try and open it on my iphone it looks really bad. I have created an iphone web page but i don't want to have to type the address into the address bar. I am running iis5 on windows xp Cheers Gozy |