HTML - Display Form Results Inside A Different <div>
Hello all,
I searched the board for an answer and didn't have any luck. This makes me wonder if what I want to do is possible. I have a webpage that uses divs to section the page into four sections (top, bottom, content, and navigation). On the navigation side is where users select a set of form options and based on those options details should display in the content section. Frames is not an option as we're trying to get away from frames and I need to make subsequent pages for other things without the frames. Thanks in advance for you helpm ~ML Similar TutorialsHi, I have a jsp page, in which i have a search button. When i click on the search button, it should display the results in a table format in the same jsp page. I am unable to find a solutuion for this. If Anybody knows, please help me. Thanks in Advance Regards Venu How i create a frame type space( which is scrollable ) similar to seperate window inside a webpage ? So, I have made a form as a pre-LAN-event thing.. The problem is that I have never really used forms before and am not really that familiar with more advanced HTML besides simple layout stuff.. So my question is, how do I take the information from this form: HTML Code: <form name="input" action="Result.asp" method="get"> <font size="2" face="arial">Gender:<select name="gender"> <option value="male">Male</option> <option value="female">Female</option> </select> <br> Age:<select name="age"> <option value="12">0-12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25+</option> </select><br><br /> <b><u>What games do you want to see tournament in?</u></b><br /> <input type="checkbox" name="Game" value="CS16" /> Counter Strike 1.6<br /> <input type="checkbox" name="Game" value="CSS" /> Counter Strike Source<br /> <input type="checkbox" name="Game" value="LoL" /> League of Legends<br /> <input type="checkbox" name="Game" value="LoLD" /> League of Legends Dominion<br /> <input type="checkbox" name="Game" value="TF2" /> Team Fortress 2<br /> <input type="checkbox" name="Game" value="TF2" /> Left 4 Dead 2 Versus<br /> <input type="checkbox" name="Game" value="MC" /> Minecraft PvP<br /> <input type="checkbox" name="Game" value="BC" /> Bloodline Champions<br /> <input type="checkbox" name="Game" value="RoA" /> Rock of Ages<br /> Other: <input type="text" name="otherGame" /> (ex. 1, ex. 2, osv.) </font><br /> <input type="submit" value="Submit" /> </form> and submit it to another page so I can go on there and see how many males, females and people of different ages that have signed up, and what games they wanted. Sorry if it is a noobish question.. Thx in advance. - Ward, out! Hi, its been many years since i've done any website / html work but a friend of mine asked me to help him add a form to his marriage website that basically works as a RSVP option. he wants people to be able to add their name and click if they are going to be attending or not...click submit and have it send it to his e-mail. Making the form was easy (and i won't bore u with the code), the only problem i'm having with is how to make the submit button send an e-mail. I did some looking and it seems like its going to require the user to have sending e-mails enabled thru their browser? does anyone know of an easy way to do this (preferably one that doesn't require the user to have any sort of brain) ? Simple is better and all i need is a quick fix thx for any help bigunn See the below HTML: <table width="100%" > <tr><td align="left" style="background:blue"> <form name="rrrevsortform" method="post" valign="center"> <select name="RRSort" onchange="Redirect(this.value);"> <option value="http://something" selected="true">one choice</option><option value="http://sdfsd">sfd first</option> </select> <input type="submit" id="sortSubmit" value="Go"> </form> </td> </tr> </table> If you save this as .html and view you will find that TD height(blue color) is double the height of form? why so? how can I contract TD to take the height of form. Surprisingly even the height attribute does not work! Hello, I have a form which links to Results.htm Basically I want the title of that page which opens in a new window to be whatever was input in the form previously. Hope you all can help me, it's been bothering me for quite some time. Thanks, Jooey Hello everyone, I am creating a HTML form which is driven by PHP. This is working fine, but when I get results in email box they appear like this. Name : james Email : Telephone : dhfjdfjdhf Collection_address : fhdjfhdjhjh Number_of_bedrooms_current_location: : jhhjhjh Delivery_address : hjhhj Number_of_bedrooms_new_location : hjhhj Items_that_need_moving : hjhhj Pack_items : No Store_any_items? : NO Provide_details : hjhhjhj Submit_email : Submit Is there any way of making form results look more attractive to the reader of the email form? If so where is the code applied for the doing this? Will it be on contact form itself? Thanks Hi Folks, Is there a way to target the results of a form on one of my pages to a frame in a frameset. I have a form which produces a search on a site I pay to use. I want the results of this search to be in the bottom of a two row frameset. The top row of the framset will have links back to. The form itself is on my main page and is NOT a part of a frameset. Hope i have been clear. I'm assuming I may have to use javascript or php but not sure. All the best, Libman I am trying to create a form where I can check boxes of skills to return results of how many "departments" i have checked have those skills. It would look something like this: Check box - Description of skill1 Check box - Description of skill2 Check box - Description of skill3 SUBMIT BUTTON Department | Skill1 | Skill 2 | Skill 3 | Total -------------------------------------------------- ABC________1_______1______0____2 XYZ ________1_______1______0____2 So I need a code where I can check the boxes that apply, hit the submit button and have a value box display in each department instance if there was a match of not (1 = match 0 = no) So if i checked box skill 1 and skill 2 there would return a 1 under skill 1 and 2 for each department and show the tally of that under the total. Can someone help? thanks! I know from personal experience, the specs and some great posts that DIV's are not allowed inside of P tags. And it's normal to be so, but what about inline-blocks? I could simply use SPAN or some other inline element which works inside the P, but IE only renders natural blocks as inline-block. Meaning if it's an inline element it will work in Firefox but not IE, if it's a block the other way arround. So how do I solve this quanundrum? Either I need an element which is a natural block in IE and is allowed inside a P by the specs, or I'll use DIV instead of P, but I would much rather avoid this. Hi, I am having a problem with the formating of a search box inside a table. All I want is for the text field and submit button to sit exactly in the middle (vertically aligned) inside the table with an equal space above and below (table background is dark colour so very noticeable) In Dreamweaver, it looks fine until published - then there is a large gap below the text field and submit button but small space above. I basically am trying to get the space below the same as the one above. Take a look at the code to see what I mean. <style type="text/css"> <!-- .style2 { font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 12px; } --> </style> <table width="540" border="0"> <tr> <td width="534" height="26" bgcolor="#666666"><form action="http://www.soundscalpel.com/search.php" method="get" name="form1" target="_blank" id="form1"> <label for="textfield"></label> <div align="right"> <span class="style2">Search for Sound Effects </span> <input type="text" name="q" id="q" /> <input type="submit" value="Submit" /> </div> </form> </td> </tr> </table> Hope someone can help Thanks Hope someone can help me. I've got a html page set up so that my clients can type in their name, choose several options via radio buttons, an option to clear the form, then submit the form. What I'm having trouble with is how to obtain the information from the form. I think I would prefer this to be retrieved via email. Is there a way I can: 1. Have the subject of the email be the name of the client (whatever they type in) 2. The results of the form sent to my email (let's say it's myemail@university.edu) Thanks in advance! Here is the html code I have: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Bonus</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form method = "post" action = "mailto:myemail@university.edu"> <p> Type your name in the box below then select the advancing team and click <i>submit</i> when finished. </p> <p> Name: <input type = "text" name = "name" maxlength = "30"/> </p> <table border = "5"> <tr> <td colspan = "2" align = "center"><b>STANLEY CUP PLAYOFF HUNT BRACKET</b></td> </tr> <tr> <td width="328" align = "center">Eastern Conference</td> <td width="359" align = "center">Western Conference</td> </tr> <tr> <td><input type = "radio" name = "group1" value = "BB"/>Boston Bruins (1) <input type = "radio" name = "group1" value = "MC"/>Montreal Canadiens (8)</td> <td><input type = "radio" name = "group2" value = "SJS"/>San Jose Sharks(1) <i>vs.</i> <input type = "radio" name = "group2" value = "AD"/>Anaheim Ducks (8)</td> </tr> <tr> <td><input type = "radio" name = "group3" value = "WC"/>Washington Capitals (2)<input type = "radio" name = "group3" value = "NYR"/>New York Rangers (7)</td> <td><input type = "radio" name = "group4" value = "DRW"/>Detroit Red Wings (2) <i>vs.</i><input type = "radio" name = "group4" value = "CBJ"/>Columbus Blue Jackets (7)</td> </tr> <tr> <td><input type = "radio" name = "group5" value = "NJD"/>New Jersey Devils (3) <input type = "radio" name = "group5" value = "CH"/>Carolina Hurricans (6)</td> <td><input type = "radio" name = "group6" value = "VC"/>Vancouver Canucks(3) <i>vs.</i><input type = "radio" name = "group6" value = "SLB"/>St. Louis Blues(6)</td> </tr> <tr> <td><input type = "radio" name = "group7" value = "PP"/>Pittsburgh Penguins (4) <input type = "radio" name = "group7" value = "PF"/>Philadelphia Flyers (5)</td> <td><input type = "radio" name = "group8" value = "CB"/>Chicago Blackhawks (4) <i>vs.</i><input type = "radio" name = "group8" value = "CF"/>Calgary Flames (5)</td> </tr> </table> <p></p> <p><input type = "reset" value = "Reset"/> <input type = "submit" value = "Submit" /></p> </form> </body> </html> I would like to know how to create a mini form of two pull down boxes so that when the two selections have been made and submitted it returns back a designated page or picture. For example I want to build a simple method to show routes of an office building. Pulldown box 1 would be the office number you want to start from, and pulldown box two would be the office you want to get to. when you click submit it would pull up either a page or picture which contains the corrrect floor plan and route. I feel like this should not be too hard as I don't need anything very flashy. I just don't know how to start it. If anyone knows of something open source already created to do this I would be open to that too. Thanks in advance for any assistence you can give. So I've been trying to set up a search box to blank out its default text when clicked, and reappear when it goes away (if empty). The script works fine--I know that much. However, when using it inside a table inside a form, it seems to fail every single time. Even "this.value=' ' " falls flat on its face. I'm relatively new to HTML, so please bear with me. Below is the script, a text box it does work in, and then the box I'm trying to make it work in. Quote: <script type="text/javascript"> function clickIn(field){ if (field.value==field.defaultValue){ field.value=''; } } function clickOut(field){ if (field.value==''){ field.value=field.defaultValue; } } </script> <form> <input type="text" name="text" id="test" value="test" onfocus="clickIn(this)" onblur="clickOut(this)"/> </form> <form> <tr> <td style="border-style:solid;border-color:#4B7B9F;border-width:1px;"> <!--Search Box Dimensions--> <input type="text" title="Search Terms" name="lookfor" id="search" value="Search the Catalog" onfocus: "clickIn(this)" onblur="clickOut(this)" style="width:300px; border:0px solid; height:50px; padding:0px 3px; position:relative;"/> </td> <td style="border-style:solid;border-color:#4B7B9F;border-width:1px;"> <!--The search button--> <input type="image" value="Go" src="Search Button.jpg" style="border-style: none; width: 50px; height: 50px;"/> </td> </tr> </table> </form> 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> Hi, I have a tricky problem that you kind people might be able to solve. I want to put one set of forms inside another set of forms without them interfering with each other. At the moment, the form I've created inside the other form is not responding. The code, when simplified, looks something like this: <FORM (1)> <FORM (2)> </FORM> </FORM> Am I trying to do the impossible or is there a way to overcome this problem? Thanks! / Stefan Hi! I'm new to creating websites and this forum. I recently created a website with a "mailto" form in Dreamweaver MX 2004. I have a fairly new laptop that came with Windows Vista and IE 7. When I go to display the form, you cannot scroll to the bottom of the form. The window just ends. However, if you display the form in Fire/Fox or an earlier version of IE you can scroll down to the end of the form. I searched the MS website FAQ's but there was noting listed for this particular issue. Does anyone know how to fix this? Or is there a script I can add to the form code for it to display properly in IE 7? Or is there a patch (assuming it is a IE 7 issue) available? Any help or insite to this problem would be most appreciated! Thanks, Sonja Dear all, I am new to html. If I create a html form, after a visitor input the data to the form and click submit, this form will send data to another web page with the form data, e.g. http://www.mydomain.com/confirm.html...m&name=someone What is the html command to display the passed form value in the destination page? e.g. If I want to show the following: Hi, someone, You subscription with email abc@yahoo.com has been received. Thanks! I have a form where a user makes selections from selection lists. As they make selections a counter displayed in the form keeps them up to date with how many selection they have made. To display this counter I have been using an input box as follows; <input type="text" id="counter" name="counter" value="0" size="2" /> A JavaScript function updates the value of this input box every time the user makes another selection from any selection list on the form. The JavaScript funtion is called from the selection lists' attribute declaration as follows; onchange="calllFunction()" However I feel the input box is not the right element to use to display the counter's value. An input box does the job but it allows the user to enter stuff in it, and I don't want this to be allowed. Any suggestions? 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. |