HTML - Form Selection List Wont Select! Styled With Css
HTML Code:
<div class="contactlistdiv"> <select multiple="yes" name="send" class="contactlistone" size="6"> <option value="1" >hello</option><option value="2" >gee</option><option value="3" >gluba</option></select> </div> I am creating a list like the one above. When I style it with CSS it wont let me select any options! E.g if i float left or right(float:right; ) with CSS it wont work. Where as if I place it absolutely somewhere it will work. Problem is to get it exaclty where I want i need to float it. I have tried placing it inside a relatively placed div absolutely but it still wont let me select. I have also tried styling both classes contactlistdiv and contactlistone but it doesnt make a difference. Any help appreciated. Thanks. Similar TutorialsHow can I select the correct field in my "Select form field", once I know the value from php/mysql? PHP Code: $_SESSION['job'] = "FX"; Now I want to update the form to display the selected value... HTML Code: <select multiple="true" name="field"> <option value="FL" selected="true">Flash</option> <option value="FX">Flex</option> <option value="AJ">Ajax</option> <option value="PH">Php</option> <option value="HT">Html</option> <option value="JV">Java</option> <option value="CC">C++</option> </select> I am coding a page in strait HTML. It was going fine until I put in a list. When I put the list in, it wont show, just caused a large area of blank space. Below is the code I used for the list. Let me know if you need the whole page. I am new to this and would greatly appreciate any help you can give. <ol type="I"> <li>Complete G1 Collection</li> <ol type="a"> <li>C-8.0+ Transformer</li> <li>All Accessories</li> <li>Tech Spec File Card</li> <li>Instructions</li> </ol> <li>Japanese only G1 Transformers</li> <ol type="a"> <li>C-8.0+ Transformer</li> <li>As Complete as Possible</li> </ol> <li>Complete G2 Collection</li> <ol type="a"> <li>C-8.0+ Transformer</li> <li>All Accessories</li> <li>Tech Spec File Card</li> <li>Instructions</li> </ol> <li>Complete Classics Collection</li> <ol type="a"> <li>C-9.0+ Transformer</li> <li>All Accessories</li> <li>Instructions</li> </ol> </ol> Pretty strange failure since all the browsers incl. Safari change color when hovered on.. IE only wants the first 1 on the left, and the first 2 on the right to work? Please have a look, oh its still in development, heavily, the only clickable link is the first one on the left. Thanks. Hi Experts, I am designing a webpage where based on the year selection the associated years webtable needs to be displayed in the webpage. Pls give som suggestions and if possible the code on to how to code this using HTML and Jav Script. I know I have to write afunction and then call the fn based on the input.but need your help on this. Thanks, Bsquare Hello. I was wondering if it's at all possible to have a specific checkbox or radio button checked/selected when the user gets to that page depending on the link they clicked to get to that page. For example, I have a client who wants the user to go to a single form but from different categories (rather than having a form for each), but to make sure the recipient of the email knows which category it came from, the checkbox for that category would already be checked. The user would be able to check it themselves as well, but this ensures it's already selected and creates convenience for the user. Thanks I have a form that contains a drop down list; <select name="list" id="list" multiple="multiple"> When the user clicks the form's submit button I want to run a function that returns true if an <option> from that <select> object was selected and false if they forgot to make a selection. What is a simple way of doing this? I was thinking that maybe there was an object method like; if(document.form.select.optionSelected()==true) {do something; return true}; else {do something else; return false;} I am having a problem with IE7 rendering this page's last two select boxes. It renders fine in Firefox. It doesn't seem to like the height properties of the select boxes being set to percentages. Thanks in advance HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>BLAH BLAH BLAH, WEIRD IE BEHAVIOUR</title> </head> <body id="bodyBODY"> <form name="frmFORM" id="frmFORM"> <table align="center" width="100%" height="800px" border="1"> <tr> <td style="width: 30%; text-align: center; vertical-align: top; height: 90%;"> <div> TITLE 1<br /> </div> <select name="select1" size="2" id="select1" style="height: 90%; width: 100%;"> <option value="00023">00023</option> <option value="04988">04988</option> <option value="05560">05560</option> <option value="05565">05565</option> <option value="05915">05915</option> <option value="05M">05M</option> <option value="06970">06970</option> <option value="07M">07M</option> <option value="09015">09015</option> <option value="09020">09020</option> <option value="09030">09030</option> <option value="09065">09065</option> <option value="09275">09275</option> <option value="09330">09330</option> <option value="09335">09335</option> <option value="09340">09340</option> <option value="09441">09441</option> <option value="09442">09442</option> <option value="09491">09491</option> <option value="09615">09615</option> <option value="09763">09763</option> <option value="09810">09810</option> </select> </td> <td style="width: 30%; text-align: center; vertical-align: top;"> <div> TITLE 2<br /> </div> <select name="select2" id="select2" size="2" style="height: 90%; width: 100%;"> <option value="09330">09330</option> <option value="09335">09335</option> <option value="09340">09340</option> <option value="09441">09441</option> <option value="09442">09442</option> </select> </td> <td style="width: 40%; text-align: center; vertical-align: top;"> <div> TITLE 3<br /> </div> <select name="select3" id="select3" style="height:90%;width:100%;" size="2"> <option value="A-008FXD">A-008FXD</option> <option value="A-1251BOLTE">A-1251BOLTE</option> <option value="A-1251F31">A-1251F31</option> <option value="A-6901RW7">A-6901RW7</option> <option value="A-6901RW8">A-6901RW8</option> <option value="A-6901RW9">A-6901RW9</option> <option value="A-6901SA1">A-6901SA1</option> <option value="A-6901SA2">A-6901SA2</option> <option value="G-813R0070">G-813R0070</option> <option value="G-813R0127">G-813R0127</option> <option value="G-813R0174">G-813R0174</option> <option value="G-813R0192">G-813R0192</option> <option value="G-813R6500">G-813R6500</option> <option value="G-813RDJX">G-813RDJX</option> <option value="G-813RGEL">G-813RGEL</option> <option value="G-813RICM2">G-813RICM2</option> <option value="G-813RLIQD">G-813RLIQD</option> <option value="G-813ROPT">G-813ROPT</option> <option value="G-813RPCC">G-813RPCC</option> <option value="G-813RQTM">G-813RQTM</option> <option value="G-813RTAB">G-813RTAB</option> </select> </td> </tr> </table> </form> </body> </html> hi guys, I have a form with HTML Code: <select name="myOnClick" onChange="DoSubmission()"> <option value="1">Year 1 </option> <option value="2">Year 2</option> <option value="5">Year 5</option> <option value="10">Year 10</option> <option value="25">Year 25</option> </select> when the user clicks on one of these, it refreshes the page and updates a variable somewhere bsaed on the value. However when it refreshes the value showing is always Year 1. I want it to show the option they have just clicked. Anyone know the code that allows you to choose which one shows up? I can then use php to script which one is selected. TIA How can I drop down a select list with onmouseover instead of clicking it. Select list cannot be clicked in javascript to emulate that. eg: onmouseover="(this.click())" Also setting the 'size of select list' = 'its length' in javascript does not accurately emulate the click event because the adjacent layout changes. I tried using z-index and position attribute but doesn't help. Hi girls and guys, I have confront a problem regarding the select menu list. From an example, have 1000 customer name records in the select list, I try to scroll down the list and select one of them only. So it may spend some time to look through the 1000 customer name records and select only one customer name. Any ways or solution can solve this kinds of messy works? Thank you. How 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. This is a problem that i driving me crazy. I have this forms on my website that people can use to post comments. They have one textarea that they should write their name in and another that they should write their comment. I try to make the default text "Namn" and "Kommentar", but only "Namn" is showing in firefox. The weird thing is though, that if I change places between the two textareas, both are showing fine. I provide the site with the source code, and for a quicker check, the code for the two textareas. <textarea name="db_comment_namn" type="text" value="Namn" rows="1" cols="15" style="font-size: xx-small; font-family: Verdana; font-weight: Bold; font-style: Italic; border: 1px inset #CCCCCC; padding: 1px;">Namn</textarea> <textarea name="db_comment_kommentar" type="text" value="Kommentar" rows="1" cols="50" style="font-size: xx-small; font-family: Verdana; font-weight: Bold; font-style: Italic; border: 1px inset #CCCCCC; padding: 1px;">Kommentar</textarea> http://foto.jaxell.se Thanks in advance. First of all, WOW does this look like a site that can make it happen for me.. websitemakingwise. Im new and boy, loving the info so far.. ok, my problem: So Im cleaning up this code, yes.. again. And I wanted to make this automated php thing that sends emails straight to my inbox. Without having to use the client installed. Only problem is that the submit button isnt doing anything. Could someone have a look whats wrong? Filename: ContactForm.html HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Mailformulier updates - As it is in heaven again</title> <style type="text/css"> <!-- body { background-image: url(afbeeldingen/ups_and_simulation.jpg); } .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; color: #000000; } .style2 {font-family: Verdana, Arial, Helvetica, sans-serif} .style4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; } .style6 {font-size: 14px} .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; } a:link {color: #000000;} a:visited{color:#009;} a:hover {color: #000000;} .style10 {color: #FFFFFF} .style14 {font-family:"Bookman Old Style"; font-size: 14px; color: #000000; } #txt{ position:relative; text-align:center; left:100px; top:55px; width:420px; height:40px; z-index:2; font-stretch:wider; } div.row { clear: both; padding-top: 5px; } div.row span.label { float: left; width: 100px; text-align: right; } div.row span.formw { float: right; width: 235px; text-align: left; } div.spacer { clear: both; } --> </style></head> <body> <table width="600" height="400" border="1" align="center" bgcolor="#FFFFFF"> <div id="txt"> <p class="style1">Ja, ik heb interesse. Graag ontvang ik verdere informatie over de toekomstige activiteiten.</p> </div> <tr> <td width="44" height="150"> </td> <td width="814" height="100"> <br /> <br /> <br /> <br /> <div style= "width: 360px; background-color: #ccc; border: 1px dotted #333; padding: 5px; margin: 0px auto;"> <span class="style4"> <form> <div class="row"> <form action="FormToEmail.php" method="post" name="ContactForm"> <span class="label">Naam:</span> <span class="formw"><input type="text" name="Naamgegevens" title="Hier uw volledige naam" size="25" /></span> </div> <div class="row"> <span class="label">Adres:</span><span class="formw"> <input type="text" name="Naamgegevens" title="" size="25" /></span> </div> <div class="row"> <span class="label">Postcode:</span><span class="formw"> <input type="text" name="Postcode" title="" size="25" /></span> </div> <div class="row"> <span class="label">Woonplaats:</span><span class="formw"> <input type="text" name="Woonplaats" title="" size="25" /></span> </div> <div class="row"> <span class="label">Telefoon:</span><span class="formw"> <input type="text" name="Vaste telefoon" title="Uw vaste telefoon-nummer" size="25" /></span> </div> <div class="row"> <span class="label">Mobiel:</span><span class="formw"> <input type="text" name="Mobiel" title="" size="25" /></span> </div> <div class="row"> <span class="label">E-Mail:</span><span class="formw"> <input type="text" name="E-Mail" title="Het E-mail adres" size="25" /></span> </div> <p align="center"> <span class="style14"> <br /> <br /> <br /> ruimte voor opmerkingen/suggesties/reacties</span> <br /> <textarea name="opmerkingen" cols="40" rows="6"></textarea> </p> <div class="spacer"> </div> </form> <div align="center"> <input type="submit" value="Versturen"><br> </div> <br> </div> <div align="center"><span class="style10">-----</span> <a href ="basis.html"><img src = "afbeeldingen/TERUG.png" width="95" height="60" style="border-style: none"/></a></span></div></td> <td width="44"> </td> </tr> <tr> <td height="100" colspan="3"><div align="center"> </div></td> </tr> </table> </body> </html> Thanks for reading till this point! Hop you didnt mind the Dutch lol. FILENAME: FormToEmail.php PHP Code: <?php $my_email = "rsizania@gmail.com"; /* Enter the continue link to offer the user after the form is sent. If you do not change this, your visitor will be given a continue link to your homepage. If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "mypage.htm" or "http://www.elsewhere.com/page.htm" */ $continue = "www.google.com"; /* Step 3: Save this file (FormToEmail.php) and upload it together with your webpage containing the form to your webspace. IMPORTANT - The file name is case sensitive! You must save it exactly as it is named above! Do not put this script in your cgi-bin directory (folder) it may not work from there. THAT'S IT, FINISHED! You do not need to make any changes below this line. */ $errors = array(); // Remove $_COOKIE elements from $_REQUEST. if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}} // Check all fields for an email header. function recursive_array_check_header($element_value) { global $set; if(!is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_header($value);} } } recursive_array_check_header($_REQUEST); if($set){$errors[] = "You cannot send an email header";} unset($set); // Validate email field. if(isset($_REQUEST['email']) && !empty($_REQUEST['email'])) { if(preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";} $_REQUEST['email'] = trim($_REQUEST['email']); if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}} } // Check referrer is from same site. if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = "You cannot send a blank form";} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;} if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL.""; $message = stripslashes($message); $subject = "FormToEmail Comments"; $headers = "From: " . $_REQUEST['email']; mail($my_email,$subject,$message,$headers); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Dreamweaver Tutorial - Contact Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#ffffff" text="#000000"> <div> <center> <b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b> <br>Your message has been sent <p><a href="<?php print $continue; ?>">Click here to continue</a></p> <p><b>Dreamweaver Spot</b> by <a href="http://dreamweaverspot.com">dreamweaverspot.com</a></p> </center> </div> </body> </html> Ok thanks!! So.. whats wrong? Im a total noob.. and it isnt even that I started from scratch.. some of it was already there. Appreciate your advice Hi all, I have one listbox( in form ) with multiple selection option. upon clicking submit button this form will send details to servlet program. The problem here for me is , whichever is selected in listbox, that only am getting in servlet side. Is it possible to get all the values from list box even without single selection. can any one help me ? Hello All, I have recently founded a non-profit performing arts company (www.the roarkfaction.org). We'll be accepting members for $60 a year, payable at once or in monthly increments of $5.00. I've written this HTML code, which, paired with a simple PHP script, sends me an e-mail with details entered: <form method="post" name="myemailform" action="FormToEmail.php"> <center> <p> <label>Your Full Name:</label> <input name="name" type="text" id="SNN" size="50"><br /> <label>E-Mail Address:</label> <input name="e-mail" type="text" id="e-mail" size="51"><br /> <label>Payment Preference:</label> <input type="checkbox" name="yearly" id="yearly" /> <label for="yearly">$60 Once for One Year</label> <input type="checkbox" name="monthly" id="mointhly" /> <label for="monthly">$5 a Month, For One Year</label> <br /> <label for="paymeth">Payment Method</label> <select name="paymeth" id="paymeth"> <option value="1">Please Select One</option> <option value="cash">Cash</option> <option value="check">Check</option> <option value="cc">Credit Card</option> <option value="mo">Money Order</option> <option value="pp">PayPal</option> </select> <br /> <br /><br /> <center>Click Below to Submit Your Request</center> <center><input type="submit" name="submit" id="submit" value="Submit"> </center></form> What I'd like to do, though, is have it so if the user chooses "Credit Card" or "Paypal", upon clicking submit the e-mail is still generated, but a _blank is opened to our Paypal page. I have no idea how to do this. Any suggestions would be greatly appreciated. Regards, Samuel Is there any way to limit the selection form a multiple select box to a certain number. <select multiple="multiple" size="5"> <option>Beer</option> <option>Vodka</option> <option>Guinness</option> <option>Sambuca</option> </select> How can I stop people selecting more than 2 options? Cheers in advance for the help. Hey, Using PHP and MySQL but I thought this problem is more suited to HTML (admin, please move if its not). I have a drop down select form which I want to automatically change the page once the user has selected it. Like a home page of a company and you choose the country, when it automatically goes to the appropirate page. Any ideas of how to do this? Thanks, Hey, just a quick question... How would i go about using an image as a select option in a form? i know its possible as ive seen it around on a few sites before, but im not sure how to do it myself. tried the obvious: <select name="stars"> <option value="1"><img src="MYIMAGE"></option> </select> but oviously that doesnt work. any help would be greatly appreciated. I've seen it alot of places, though I cannot seem to get my hand on how it works (as I never think about checking the source when I DO see it!).. How can I get one <select> field option to control another? Like, say I have a list with: 1 2 3 4 and a list with: A B C D ..and when I select "3" in the first list, I want the second list to AUTOMATICLY change to "C". How do I accomplish this? |