HTML - Form Wont Display Default Text, Help Please
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. Similar Tutorialsi know this is prob somethin simple but iv tried everythin n cant get the image to display...... i no my code is right, its got to do with the actual pic, i have the right file type(gif), i have tried resizing it, saving it under diff file types by using gif converters!! but nothing seams to work... and yet the other pic's beside it work!! originally it was a micro visio diagram.... when i load the page into IE the normal gif,jpg images work. but when i right click on the image thats not working and go to properties its says not associated! plz help Cindy xx 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, can someone help me. I'm trying to get my text to sit like this: however it sits like this: www.studioeighty.co.uk thanks Steve hey guys, In order to align text isnt the command something like this? <h3 align="center">Text Here</h3> Is this right? I know its something really simple just for some reason I cannot get my text to center in the webpage. Any suggestions? Many thanks in advance! <html> <form> <p><input type="text" name="T1" size="20" /></p> <p><input type="submit" value="B1" name="B1" /></p> <p><input type="submit" value="B2" name="B2" /></p> </form> </html> Say I have the above form in a web page. When the page loads, the browser will highlight the first submit button b1, such that if the user hits enter, the form is submitted with that button. I'd like the default button to be B2, which is displayed second on the form. I'd greatly appreciate any advice on how to accomplish this. Thanks, jsfgguy Hi All its been quite some time since i have hand coded anything and i am having some probs with a form i am using.. i want to use my own image for the button instead of the default.. can someone let me know how this code should look to use my own image.. any help would be much appreciated Code: <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><input type="text" name="loginusername" accesskey="u" tabindex="1"></td> <td style="padding-left: 5px;"><input type="password" name="loginpassword" value="" accesskey="p" tabindex="2"></td> <td style="padding-left: 5px;"><input type="submit" name="login" value="Login" accesskey="l" tabindex="3"></td> </tr> <tr> <td class="loginusername" style="padding-top: 3px;">Username</td> <td class="loginpassword" colspan="2" style="padding-left: 5px; padding-top: 3px;">Password</td> </tr> </table> 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. 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, I hope I'm posting in the right area as this is my first thread. The problem I'm facing is I have 7 links in a row | Link 1 | Link 2 | Link 3 | Link 4 | Link 5 | Link 6 | Link 7 | and below those links I have nothing. What I want is for Text to appear on rollover on Link 1 and stay there until Link 2 or another link is hovered over. Example: Mouse hovers on Link 1 - called Free Home Survey Text appears below row of links about Free Home Surveys that the company does Mouse hovers on Link 3 - called Personalisation Text appears below the row of links about Personalisation etc Any help would be greatly appreciated. Thanks in advance Hi, this is appleguy.......6142! I was wondering how to make a text box display something somewhere else for example (This does not work)---- ------------------------------------------------------------------ [page1.html] (Pretend this is a text box)>>> [Text Text Text...] [page2.html] -This is the text displayed in the text box->>>Text Text Text... HOW DO I DO THAT PLEASE HELP!! .......... How do i display the text contents of a txt file in ip addresses box after i clicked the send button? here is my website http://ip2url.tk/ code: <html> <head> <title>IP TO URL Converter</title> </head> <body> <h1>IP TO URL Converter</h1> Please specify a log file:<br> <input type="file" name="datafile" size="40"> </p> <div> <input type="submit" value="Send"> </p> IP addresses:<br> <form method="post" action=""> <textarea name="comments" cols="40" rows="5"> </textarea><br> </form> </p> <button type="button">Convert</button> </p> URLs:<br> <form method="post" action=""> <textarea name="comments" cols="40" rows="5"> </textarea><br> </form> </div> </form> </body> </html> Hi everybody, I have a textbox and I want the text of that textbox display in a div. I want the text in the div to be updated as the user writes in the textbox. I hope this makes sense, I have searched everywhere and I have no idea on how to get it working, please help me out here. I also want this to work when the textbox is set to disabled. Thanks Hi Guys, Hope you can help. I need to add some text to an existing site but I'm having a problem doing so. The text I add is displayed behind some other existing text? The page is currently live without the changes at www.bulksms.com but I have commented out the bit I need to add in so you can see it in the source, it's an A - Z directory toward the bottom of the page. I've managed to do it successfully at www.bulksms.vsms.net but this unfortunately does not seem to work on the .com version and ends up displaying as attached. Any ideas? I have a input form i.e: Code: <tr> <td>Enter Salary:</td> <td><input type="text" name="text1" /></td> </tr><tr><td> <input type="button" name="button1" value="Submit" onClick="func(this.form)" /> </td></tr> This takes a input,and user clicks submit and it does some processing.... But I want to take multiple entries from the user before he clicks the submit button.But I dont know how many times he will enter data..so how to display the text field multiple times dynamically???? Hello, I am trying to command a mouse-rollover to display a text under the photo that is to be mouse-rollovered. I know how to display a second picture to showed up upon mouse-rollover on a first picture, but I do not know how to display a text message upon a picture mouse-rollover. Thank you kindly guys how do I display html code as text? The page is an html document, I want users to be able to highlight and copy a piece of html code. I have tried putting it in a text box in a form, but I can't seem to do it without the code being read as REAL html. Thanks in advance Hugeknot I have a website that needs to display a meeting day and location for a group meeting. The area this is displayed (and the format) is the same for each page of the site. Typing this into the code for each page whenever a location changes is a pain in the ass and I would like to just edit a text(or other simple format file) to have it call and display the text on all pages. I don't want to call up a whole page in a frame though. That looks terrible and the site is nice and sleek Thanks for the help! Hey, I have a few questions.. It might take php, Im not sure. What I am wanting to do is kinda like make 1 page where some one can type in one box then it displays above. View image, It shows what i mean. Ruff example... could any one put this together.. i have tried and tried I get nothing that saves or nothing.. http://i36.tinypic.com/2r7aqo5.png |