HTML - Send Button In Form Troubles
Similar TutorialsI am trying to amend an existing form so that some fields are mandatory. So far this is what I've have on the script right before </head> tag: Code: <script type="text/javascript"> function checkForm(frm){ msg = ""; if(!frm.name.value){ msg += "- Name is required\n"; } if(!frm.phone.value){ msg += "- Phone is required\n"; } if(!frm.email.value){ msg += "- Email is required\n"; } if(msg != ""){ alert(msg); return false; } } </script> and on at the begining of the form itself I have: Code: <form id="form1" name="form1" method="post" action="contact1.php" onsubmit="return checkForm(this)"> <input type="text" name="name" id="name"><br> <input type="text" name="email" id="email" style="margin-top:3px "><br> <input type="text" name="phone" id="phone" style="margin-top:3px "><br> But when I get the form back on my test email all the fields are empty! Here here my contact.php: PHP Code: <? $subject="Booking Table from ".$_GET['name'] ; $headers= "From: ".$_GET['email']."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("contactatalexotero.co.uk", $subject, " <html> <head> <title>Book Table</title> </head> <body> <br>Phone Number ".$_GET['phone']." <br>Number of people ".$_GET['people']." <br>Where? ".$_GET['where']." <br>Time ".$_GET['time']." <br>Date ".$_GET['day']."/ ".$_GET['month']."/ ".$_GET['year']." <br>Message ".$_GET['message']." </body> </html>" , $headers); echo ("Your message was successfully sent! We will contact you shortly to confirm your table!"); ?> <script> window.close </script> What do I do wrong? Please help me Hi all, I have a simple newsletter form, so just the email field and a submit, what I would like to do is to send this data to a larger subscriber form, so one that has name, email (with the data previously entered already added), list to subscribe to etc. Can this be done? Thanks how to send e-mail from a form?... I'm trying to set up a website for my Mom, and I'm not very familiar with this stuff. I created the form below, but when I try it I get 3 or 4 pop ups about security and then it still doesn't send the data, and when I had my friend try it said she couldn't because the had no profile. Quote: <FORM METHOD="POST" ACTION="mailto:sharyl@sharylsphotojournal.com"> Name: <BR> <INPUT TYPE="text" NAME="name" SIZE="35"><BR> Email(If you want a response):<BR> <INPUT TYPE="text" NAME="email" SIZE="35"><BR> Message:<BR> <TEXTAREA NAME="message" ROWS=7 COLS=35> </TEXTAREA><BR> <INPUT TYPE="submit" VALUE="Send"> <INPUT TYPE="reset"> Can anyone help me know what I did wrong? Hi, I'm working on a contact form and its almost finished. There are 2 main offices the form can go to. for example UK office and France office. I want to add 2 check boxes or radio boxes so that the person filling out the form can choose which office they want the form to go to. Is this possible and if so anyone got exampel code i can use to add to my form and mail.php script? Hi there, i would really appreciate if someone could help me. i have first tried a few things from searching around on google. but i either dont understand or its just not working!... first of all ill say im a beginner in html. but i created a survey/quiz page.. just a simple thing to see if i could. Using radio boxes etc.... I have a submit button at the bottom, but i want to know how to direct it to my email address? so that i receive the responses and can send the reply? i tried a form method to mailto my email but it doesnt work. so i think i may be on the wrong path.. all that happens is the page reloads. anyways could someone help. my page is being being hosted by free server, will this make a difference? thanks for your time. hi everyone this is my first post here and hope i will get solution of my problem i have designed an form and want when user click on submit button i can recieve that data into my email. here is the code <FORM METHOD="POST" ACTION="mailto:mandeep@vbams.com" ENCTYPE="text/plain"> <INPUT TYPE="text" NAME="username"> : name <BR> <INPUT TYPE="text" NAME="email"> : email <BR> comments <BR> <TEXTAREA NAME="COMMENTS" ROWS="10" WRAP="hard"> </TEXTAREA> <INPUT NAME="NEXT_URL" TYPE="hidden" VALUE="http://www.vbams.com/index.html"> <BR> <INPUT TYPE="submit" VALUE="Send"> <INPUT TYPE="reset" VALUE="Clear"> </FORM> this is not working can any one help me how to modify this code so it work properly Thanks Mandeep Ok, so I need something so that others can kinda half-email me (you'll get it later): Code: <form><input type="text" /></form> <form><input type="text" /></form> <img src="submit.jpg" /> So, the idea is that they write their email in the top one, and a short message in the bottom one. This is perfectly fine as it is. I don't want big text-boxes and stuff like that instead, so don't change this part. The submit.jpg is a picture that sais submit (duh..), and I'd like for this button to take this information posted into these forms and post it on another page. In other words, this can be compared to an e-mail webmaster kinda thing, and then I could go to this secret second page, and read it like this: person1@something.com There's a bug in your site. person2@something.com Cool site dude. person3@something.com Wow.. Get it? The layout of site 2 isn't important, as only I will be reading it. Also, the button would have to hide the URL it is posting to, so that others can't just read at the bottom that it will be sent to mysite.com/thispage.html. Can someone please, please, PLEASE try to help me with this??? I know how to create a form to send an email, but I'm wondering if it's possible to have a form send either an event notification or outlook calendar event that would set up an outlook event reminder once accepted by the recipient. Does anybody know if that's at all possible with HTML or Javascript? Thanks. Hello guys, Can anyone help me with a simple form. I need a form like this: A box where the user can enter his email adress. Under it a button: Send this to my email The function will be that a certain text is sent to his email adress. The text is one I choose before. Thanks guys! Hello, I am trying to to write HTML code that will let people fill out a form, but I need it sent to an email address (tcutler@lighthouseandmeyu.org) This is what I have: HTML Code: Please Provide Your Input!: <form action="tcutler@lighthouseandmeyu.org" METHOD=POST> <P><TEXTAREA ROWS=10 COLS=50 NAME=Comments></TEXTAREA></P> <P><INPUT TYPE=SUBMIT VALUE=Send></P> </FORM> Hello, I have a code ( see below) with a while loop that gives me a table that shows on the right side after every entry a link 'EDIT' that sends the variabe id to the script 'editjoke.php'. while ($joke = mysql_fetch_array($jokes)) { $id = $joke['id']; $joketext = htmlspecialchars($joke['joketext']); echo "<td>$joketext</td>\n"; echo "<td ><a href='editjoke.php?id=$id'>Edit</a></ td>\n"; echo "</tr>\n"; Now I created a new code with the same idea but it should have on the left side 'radio-buttons' and on the left side only one EDIT-button. Two days ago I thought it works but now it seems so that the variable is not send to editjoke.php. Here is the code: <form action="editjoke.php" method="post"> ... ... while ($num = mysql_fetch_array($number)) { //echo "<tr valign='top'>\n"; $id = $num['id']; $Auskunft = htmlspecialchars($num['Auskunft']); //echo "<td>$Auskunft</td>\n"; <input type="hidden" name="id" value="<?php echo $id; ?>" /> <input type="submit" value="SUBMIT" /> } </form> How do I have to change the code that the variable 'id' will be send to the script edithjoke.php? 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 I have this code that I am using for a contact form on my website. What do I need to add for it to send the data in the fields to my email address Code: <form name='Contact Time For You' action='sent.htm' method='POST' enctype='multipart/form-data' onsubmit='return verifyMe();'> <table class='table_form_1' id='table_form_1' cellspacing='0' width="271" align="right"> <tr> <td class='ftbl_row_1a' width="241" align="left" > <font face="Arial" size="2"><LABEL for='Full_Name' ACCESSKEY='none' ><b style='color:red'>*</b>Your Name </label></font> <font face="Arial"> <input type='text' name='Full_Name' id='Full_Name' size='34' value=''></font></td> </tr> <tr> <td class='ftbl_row_2a' width="241" align="left" > <p> <font face="Arial" size="2"><LABEL for='Email' ACCESSKEY='E' ><b style='color:red'>*</b><u>E</u>mail Address </label></font> <font face="Arial"> <input type='text' name='Email' id='Email' size='34' value=''></font></td> </tr> <tr> <td class='ftbl_row_1a' width="241" align="left" > <p style="margin-top: 0; margin-bottom: 0"> <font face="Arial" size="2"><LABEL for='Telephone' ACCESSKEY='T' ><b style='color:red'>*</b><u>T</u>elephone </label></font> </p> <p style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type='text' name='Telephone' id='Telephone' size='15' value=''></font></p> <p style="margin-top: 0; margin-bottom: 0"> </td> </tr> <tr> <td class='ftbl_row_2a' width="241" align="left" > <font face="Arial" size="2"><LABEL for='Enquiry_Text' ACCESSKEY='none' ><b style='color:red'>*</b>Enquiry</label></font><font face="Arial"><textarea name='Enquiry_Text' id='Enquiry_Text' cols='28' rows='6' value=''></textarea></font></td> </tr> <tr> <td class='ftbl_row_1a' width="241" align="left" > <p> <font face="Arial" size="2"><LABEL for='Code' ACCESSKEY='none' ><b style='color:red'>*</b>Offer Code </label></font> <font face="Arial"> <input type='text' name='Code' id='Code' size='34' value=''></font></td> </tr> <tr> <td align='center' width="249"> <p style="margin-top: 1; margin-bottom: 1"> </p> <p style="margin-top: 1; margin-bottom: 1"><font color="#FFFFFF"> <input type='submit' name='submit' value='Send' style="float: right; color: #FFFFFF; font-family: arial; font-weight: bold; background-color: #000080"></font> </td> </tr> </table> </form> Thank you in advance, Dan Hi. I am creating web service. But the problem must be somewhere on HTML page. When I submit form, the data send by web service (java program) to the page does not show up. If I do not submit form, then the program works; results appear on the page. The form is submitted invoking pushSubmit() javascript function. This method is invoked from setMessage() javascript function. I submit form cause in this way I discover what value is selected on drop down list. This is done using JSP code. Can I do it somehow else. Next action using retrieved data is to invoke Java class on server side. What might be the problem? This is the code: Code: <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" pageEncoding="UTF-8" %> <%@ page import="mart.ebay.database.ReadsCategoryTable" %> <jsp:useBean id="categoryList" class="mart.ebay.database.ReadsCategoryTable" scope="request" /> <jsp:setProperty name="categoryList" property="*"/> <!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=UTF-8"/> <title>eMart</title> </head> <body class="create"> <!-- shows items from that country by default --> <% // String strSiteId = "EBAY-GB"; // Object categoryList = session.getAttribute("items"); // receives result from servlet // out.println(categoryList + " result ++++++++++++++++++++++++++++"); // strSiteId = (String)session.getAttribute("siteId"); // strSiteId =(strSiteId == null)? "": strSiteId; // out.println(strSiteId+ " strSiteId +++++++++++++++"); %> <% String result= ""; String strSiteId = request.getParameter("siteId"); strSiteId =(strSiteId == null)? "": strSiteId; if(strSiteId.equals("")) { out.println(strSiteId+ " global ID is empty"); result= categoryList.readTable("EBAY-GB"); } else { out.println(strSiteId+ " this is global ID"); result= categoryList.readTable(strSiteId); } %> <div id="container"> <div id="header"> <h1>Header</h1> <!-- end of header--> </div> <div id="mainContent"> <h1>Main content</h1> <!-- onsubmit="run()" --> <form name="form" id="form1" action="index.jsp" method="post" > <table id="input" border="0" cellpadding="0" cellspacing="5"> <tr> <th align="left">Looking for</th> <th align="left">Location</th> <th align="left">Category</th> </tr> <tr> <td align="left"><label><input style="width: 230px" type="text" name="message" id="message" /></label> </td> <td> <select name="siteId" id="siteId" > <option <%=(strSiteId.equals("EBAY-AT"))?"selected":""%> value="EBAY-AT">Austria</option> <option <%=(strSiteId.equals("EBAY-AU"))?"selected":""%> value="EBAY-AU">Australia</option> <option <%=(strSiteId.equals("EBAY-CH"))?"selected":""%> value="EBAY-CH">Switzerland</option> <option <%=(strSiteId.equals("EBAY-DE"))?"selected":""%> value="EBAY-DE" >Germany</option> <option <%=(strSiteId.equals("EBAY-ES"))?"selected":""%> value="EBAY-ES">Spain</option> <option <%=(strSiteId.equals("EBAY-FR"))?"selected":""%> value="EBAY-FR">France</option> <option <%=(strSiteId.equals("EBAY-FRBE"))?"selected":""%> value="EBAY-FRBE">Belgium (French)</option> <option <%=(strSiteId.equals("EBAY-NLBE"))?"selected":""%> value="EBAY-NLBE">Belgium (Dutch)</option> <option <%=(strSiteId.equals("EBAY-FRCA"))?"selected":""%> value="EBAY-FRCA">Canada (French)</option> <option <%=(strSiteId.equals("EBAY-ENCA"))?"selected":""%> value="EBAY-ENCA" onclick="pushSubmit()" >Canada (English)</option> <option <%=(strSiteId.equals("EBAY-GB"))?"selected":""%> value="EBAY-GB" selected="true">United Kingdom</option> <!-- <option value="EBAY-HK">Hong Kong</option> --> <option <%=(strSiteId.equals("EBAY-IE"))?"selected":""%> value="EBAY-IE" onclick="pushSubmit()" >Ireland</option> <option <%=(strSiteId.equals("EBAY-IN"))?"selected":""%> value="EBAY-IN">India</option> <option <%=(strSiteId.equals("EBAY-IT"))?"selected":""%> value="EBAY-IT">Italy</option> <!-- <option value="EBAY-MOTOR">Motors</option> --> <option <%=(strSiteId.equals("EBAY-NL"))?"selected":""%> value="EBAY-NL">Netherlands</option> <option <%=(strSiteId.equals("EBAY-NLBE"))?"selected":""%> value="EBAY-NLBE">Belgium (Dutch)</option> <option <%=(strSiteId.equals("EBAY-PH"))?"selected":""%> value="EBAY-PH">Philippines</option> <option <%=(strSiteId.equals("EBAY-PL"))?"selected":""%> value="EBAY-PL">Poland</option> <option <%=(strSiteId.equals("EBAY-SG"))?"selected":""%> value="EBAY-SG">Singapore</option> <option <%=(strSiteId.equals("EBAY-SE"))?"selected":""%> value="EBAY-SE">Sweden</option> <option <%=(strSiteId.equals("EBAY-MY"))?"selected":""%> value="EBAY-MY">Malaysia</option> <option <%=(strSiteId.equals("EBAY-US"))?"selected":""%> value="EBAY-US">United States</option> </select> </td> <td> <select name="Category" > <option value="100" ><%= result%></option> </select> </td> <td> <label> <input type="button" value="Start" onclick="run()"/></label></td> </tr> </table> </form> </div> <div id="footer"> <p>Footer</p> </div> <!-- the end of container--></div> <script type="text/javascript"> function getXmlHttpRequest() { try { // Firefox, Opera 8.0+, Safari return new XMLHttpRequest(); } catch (e) { // Internet Explorer try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return null; } } } } function setLocation(location) { strSiteId = location; var xmlHttp = getXmlHttpRequest(); xmlHttp.open("GET","app/messages/location/" + location,true); xmlHttp.send(null); } function setCategory(category) { var xmlHttp = getXmlHttpRequest(); xmlHttp.open("GET","app/messages/category/" + category, true); xmlHttp.send(null); } function setMessage(index) { var xmlHttp = getXmlHttpRequest(); //alert(index) xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { // document.write(xmlHttp.responseText.indexOf("<body>")); if(xmlHttp.responseText.indexOf("<body>") != -1) { s = xmlHttp.responseText.substring(xmlHttp.responseText.indexOf("<body>") + 6, xmlHttp.responseText.indexOf("</body>")) document.getElementById("output").innerHTML=s; } else { document.getElementById("output").innerHTML=xmlHttp.responseText; } pushSubmit() // submits form } } xmlHttp.open("GET","app/messages/" + index,true); xmlHttp.send(null); } function run(){ setCategory(document.form1.Category.value) setLocation(document.form1.siteId.value) setMessage(document.form1.message.value) alert(document.form1.Category.value+" "+document.form1.siteId.value+ " "+document.form1.message.value) } function pushSubmit() { document.getElementById('form1').submit(); } </script> <% // sessionObj = null; //arlItems = null; //session.removeAttribute("items"); //session.removeAttribute("siteId"); %> <h3>result</h3> <div id="output" style="border: 1px solid black; color: black; height: 18em; width: 100%"></div> </body> </html> So here's my problem, I am using a combination of div tags and tables to center my content. However, the blank space in tables overlap the content of other tables so I cannot click content in those tables, I cannot just use a z index since both tables have clickable content in them and whichever one has the lower z index becomes unusable. So my code is something along the lines of. Code: <div style="position: absolute; width: 98%; z-index: 1;" align="center"> <table width="905" height="600"> <tr> <td width="300"> this is where I have content with links </td> <td> </td> </tr> </table> </div> and then to align something on the other side of it I put Code: <div style="position: absolute; width: 98%; z-index: 1;" align="center"> <table width="905" height="600"> <tr> <td> </td> <td width="160"> This is where I have an ad </td> </tr> </table> </div> I tried wrapping the ad in another div tag and giving it a higher z index hoping that it would allow just the ad to pop out (rather than the whole table) but unfortunately it wasn't that easy for me. If anyone can help me solve this please let me know, the website it is currently uploaded on is www.docoden.com as you can see the ad on the right is not capable of being clicked (please do not try to click it just hover your mouse over it since that would violate the TOS) at least not if it's displaying text ads, for some reason image ads are still working for me perhaps due to the use of flash. If anyone can give me any help on this please do. Note: I did not stack them all in a single table because that tends to cause alignment problems from browser to browser, so if your advice is to just make it all a single table then that doesn't help me. If you can explain a simpler way for me to do this using div tags though then that may be appreciated. I apologize for the slightly sloppy code, I am very new to web development. hey ya'll... I've been having trouble with this site showing up in IE6-7 correctly and don't know how to fix it. View in FF or Safari to see how it's supposed to look. Any advice is much appreciated. Click here if more information is needed, don't be afraid to ask. Hello, I would like to move my button or <FORM> to different position than at the default location. How can I do that? So I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi. I'm new here and a bit of a noob I am having a frames issue. I have all my frames set up in my main page: <frameset cols="10%,90%"> <frame src="navbar.html"> <frameset rows="25%,75%"> <frame src="banner.html"> <frame src="home.html"> now, the frame 'navbar' is my navigation frame on the left.I want the links in my 'navbar', to be displayed in the 'home' frame. the 'home' frame is where my main content will go. The only problem is that this opens up a whole new window instead. Oh, the link I am using is a graphic. the code for the link in the navigation bar: <a href="demo.html" target="home"> <img src="../Pictures/logo.gif" width="45" height="24" /> the question is, is something typed in wrong? I am using dreamweaver and am wondering if i have to do something with the Target, since the frames are in separate documents? so i want to display the link in the 'home' frame, but it just opens a new window any help would be greatly appreciated! |