HTML - Form Or Email Field Which Matches The Last <h>
I have no idea whether this is a reasonable thing to seek to do. My site is:
http://archemni.co.uk/products_adw.php Have a look at the first product (MLDC). I am getting a lot of hits on my pages but no one is contacting us. We are not going to be setting up shopping carts etc. as that is not how the business works. What I was thinking of was a button or a link which would either take me to a form or open an email. That much is trivial, even for me! The problem comes because there are upwards of 100 products on there which are actually coded onto the pages (don't try persuading me to sql yet, I am not ready for that and not confident that it will not make us hard for google to 'pick up'). So I have some code like: Code: <h3>MLDC</h3> <p>MLDC is a premium professional detergent for machine dishwashing. Highly concentrated. Removes fats, proteins and starch residues. Suitable for use with all commercial dishwashers within catering establishments and professional kitchens.</p> <table class="table_products" cellspacing="0" summary="product specs"> <tr> <td class="body_products_emp">Uses:</td> <td class="body_products"><ul><li>General Machine Dishwashing use in areas with hard water - up to 400 ppm.</li></ul></td> </tr> <tr> <td class="body_products_emp" width="100px">Application:</td> <td class="body_products">Automatic dosing</td> </tr> </table> So I want a common piece of code that will, into either a field on a form or into the subject/body of an email paste 'something' that allows me to identify which product I am being contacted about. The ideal solution would be that I can write a bit of code which searches up the document and returns me the last statement which is wrapped in <h3></h3> (in this case MLDC). This would mean that I can have one bit of code which is common for every product and then it will return me a different product depending on which one a person is viewing. I am certain that this can be done, but I am only learning programming so do not know how. Can it be done in html? Do I need to resort to php or even javascript? Any help is greatly appreciated Adam Similar TutorialsHow do I hide the field names in the output from a form in email ? ex. Name. I want just the persons name to appear, not proceeded by the word name. Hi everyone, I am having trouble trying to figure this out.. I have an example page here for a layout.. http://trial.musclemaxout.com/ on that page it asks you to enter your email address... when the person hits enter... it will redirect you to a product page... instead of having the person reenter their email adress... I want the data to reappear on the landing page... Im sure their is a way to temp store the data... I have no idea what to do If anyone know or could point me in the correct direction id be very thankful Hi, I want to put in a form to get queries from the user, like so: Name: Email: Comments: 'Send' button and that it will send the information to my email address which is gmail? Thanks script completed, thx ok im new go easy. im trying to make a site and i need the user to post a url into a form input field say .. PIC . this is a standard input field. now ... i want to display a pic using <img> and then instead of a "www.blah blah" hardwired , i want to use the string the user entered instead. any ideas? thanks do much I'm relatively new to html, specifically I have never programmed a web form before. My submit page (It's an archive-style site where I encourage people to submit their own stories) seems to have multiple problems, including he simple fact that it doesn't seem to display properly. My main issue, and the one I'm asking about here, is that people keep submitting blank forms and I want to make it so the STORY field is required. Sorry that the code is a mess, but as I said I'm pretty new to this. Thanks for any help you can provide. Code: <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Archive Poster</title> </head> <body text="#ffffff" vlink="#FF0000" alink="#FF0099" bgcolor="#000000"><style type="text/css"><!--A {text-decoration: none} .style1 { border-left-style: solid; border-left-width: 1px; border-right: 1px solid #FFFFFF; border-top-style: solid; border-top-width: 1px; border-bottom: 1px solid #FFFFFF; } --> </style> <center><table width="600" cellpadding="0" cellspacing="0" class="style1"> <tbody><tr> <td valign="CENTER" width="600" align="left"> <br><blockquote><hr><hr> <font size="6" color="#ffffff" face="ARIAL"><b>Post Your Story Here</b> </font> <br> <hr><hr> <p align="justify"><font size="3" face="ARIAL"><b> To help us to post your story faster -- please supply some basic <br> information about your story below. Please try to answer all <br> pertinent questions, then click the "submit" button and submit your <br> story to the archive. Thank you.</b> </font><br><br> </p><hr> <hr> <form action="http://acctcgi.xxxxx.org/formmail.cgi" method="post"><font size="3"> <input name="subject" value="New Story Submission" type="hidden"> <input name="successpage" value="thanks.htm" type="hidden"> </font><pre><font size="3"><font size="4" face="ARIAL">Story title:</font> <input name="TITLE" size="50" type="text"> <font size="4" face="ARIAL">Author name or nickname:</font> <input name="NAME" size="50" type="text"> <font size="2" face="ARIAL">If you wish to remain anonymous leave blank</font> <font size="4" face="ARIAL">A brief description of your story:</font> <textarea name="COMMENTS" rows="10" cols="60"></textarea> <font size="4" face="ARIAL">Appropriate story codes: GENDER (Pick one that best describes your story)</font><br> <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <input name="ITEM1" value="xxxxx" type="radio">(xxxxx) xxxxx <br> Other: <input name="GENDER" size="50" type="text"> <font size="4" face="ARIAL">Appropriate story codes: TYPE (Pick as many as necessary)<br> </font> <input name="ITEM2" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM3" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM4" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM5" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM6" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM6" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM7" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM8" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM9" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM10" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM11" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM12" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM13" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM14" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM15" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM16" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM17" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM18" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM19" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM20" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM21" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM22" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM23" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM24" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM25" value="xxxxx" type="checkbox">(xxxxx) xxxxx <input name="ITEM26" value="xxxxx" type="checkbox">xxxxx <br> Other: <input name="TYPE" size="50" type="text"> <font size="4" face="ARIAL">Public Author Contact Address:</font> <input name="EMAIL" size="50" type="text"> <input name="Annon" value="Yes" type="checkbox">Please hide my address.<br><br> </font><hr size="6" noshade="noshade"><center><font size="3" face="ARIAL">Story submission guidelines</font></center> <hr size="6" noshade="noshade"> <font size="2" face="ARIAL"><br></font><p align="justify"> <font size="2" face="ARIAL">Please follow these steps when submitting a story: <br><br> We want to have the files available to everyone. ASCII PLAIN TEXT is the basic medium and there is no one with computer access that can't read a text file. <br> The best format to send your story in, is "plain text" with white space between paragraphs. Don't format line length and don't worry about story length since we can accept any length story. <br><font size="4" color="#ff0000"><b> We will accept only plain text files. You may copy and <br> paste to the window below.</b><br></font> We will not accept DOC, WPS, or any other word processor formats. The archive staff apologizes for any inconvenience that this may cause contributing authors, but there are a few "funny" people out there who continually try to "pass along" viruses to us and with the proliferation of these viruses we find it no longer feasible to accept the risk. <br>If you are unable to copy and past and transmit your story using the archive poster please contact us through the link shown at the bottom of the page and we will try to accommodate you via regular email. But even then we will only accept ASCII plain text formats. <br> We will format your story using the above guidelines if you submit it in any other form.</font></p> <font size="2" face="ARIAL"><br> </font><center><table width="515" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="CENTER" width="515" align="left"><blockquote> <br> <center><font size="4"><b>Story Submission box</b></font></center></blockquote> </td> </tr> </tbody></table> </center> <font size="2" face="ARIAL"><font size="4" color="#000000" face="ARIAL">Copy and past your story he </font> <label for="Story"> <textarea name="STORY" rows="50" cols="62"></textarea></label> <br></font><center> <font size="2" face="ARIAL"> <input name="subject" value="New Story Submission" type="hidden"> <input name="successpage" value="thanks.htm" type="hidden"> <input value="Submit Story" type="submit"></font></center> </tr> </tbody></table> </center> <br> <center><a href="index.htm">Return to the Main Page</a></center> </body></html> Hello, I have a form which is used to pass a password in 2 factor authentation. What I am looking to do is to take : <input class=CTXMSAM_ContentFont type="Password" title="Enter password" name="passwd1" size="13" maxlength="32"> and split it into two form fields but when the user submits the form combining both fields to be submitted wth the name="passwd1" This is crutial for authentication to work. The reason for this is that the password is a secure token which contain a PIN + Tokencode. Currently the need to put both in one field and hit submit combining it them selves. This is not optimal as end users are not the smartest eggs out there. Thanks The full .js script is below: var loginPrefilled = false; function SetCookie(cookieName,cookieValue) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000*24); document.cookie = cookieName+"="+escape(cookieValue)+";path=/;expires="+expire.toGMTString(); } function UnsetCookie(cookieName) { document.cookie=cookieName+"=nothing;expires=Thursday, 1 Jan 1970 00:00:00 GMT; path=/"; } function ns_check() { var login=document.forms['vpnForm'].login.value; if(login == "") {window.alert("You need to enter login name"); return false; } SetCookie("NSC_USER", login); return true; } function ns_disperrmsg() { if(document.cookie.length>0) { if(document.cookie.indexOf("NSC_VPNERR=4001") != -1) { document.writeln("<FONT COLOR=#000000><B><CENTER> Invalid username or password.</CENTER></B></FONT>"); UnsetCookie("NSC_VPNERR"); return; } } document.writeln(" "); } UnsetCookie("NSC_AAAC"); UnsetCookie("NSC_USER"); function ns_getcookie(name) { var cookie=document.cookie; if(cookie.length > 0) { begin=cookie.indexOf(name+"="); if(begin!=-1) { begin+=name.length+1; end=cookie.indexOf(";", begin); if(end==-1) end=cookie.length; return unescape(cookie.substring(begin, end)); } } return null; } function ns_fillName() { var value=ns_getcookie("NSC_NAME"); document.vpnForm.login.focus(); if(value!=null) { document.vpnForm.login.value = value; loginPrefilled = true; document.vpnForm.login.style.color = "#777"; document.vpnForm.passwd.focus(); UnsetCookie("NSC_NAME"); } } function loginFieldCheck() { if(loginPrefilled == true) { document.vpnForm.login.blur(); } } function ns_showpwd() { var pwc = ns_getcookie("pwcount"); document.write('<TR><TD align=right><SPAN class=CTXMSAM_ContentFont style="FONT-WEIGHT: bold">Windows Password'); document.write(':</SPAN></TD>'); document.write('<TD><input class=CTXMSAM_ContentFont type="Password" title="Enter password" name="passwd" size="13" maxlength="32"></TD></TR>'); if ( pwc == 2 ) { document.write('<TR><TD align=right> <SPAN class=CTXMSAM_ContentFont style="FONT-WEIGHT: bold">SecurID PASSCODE:</SPAN> </TD> <TD> <input class=CTXMSAM_ContentFont type="Password" title="Enter password" name="passwd1" size="13" maxlength="32"> </TD></TR>'); } UnsetCookie("pwcount"); } Hi Guys I have a text input field in a form that has data in it from a previous entries. Is there something i can do that ensures the field is empty when the form is pulled up? Thanks everyone How do I prefill an input field in a form? I don't mean "value=hello" I mean have a light gray text inside that says "enter your first name" and then when the user starts typing that text disappears. I thought there was an html tag that did this (or a form tag like type=""). I hope it doesn't require CSS... thanks! Hi, I am a complete HTML novice and as such may lack certain use of terminology that you might take for granted so please allow for that. I have been linking to certain .jsp web pages , and pre-entering the data into the page by putting a "?" after the .jsp part and following it with some code. For example: - Take the page http://logis.korail.go.kr/driveinfo/TrainLocSearchg.jsp. By using the URL http://logis.korail.go.kr/driveinfo/...jsp?carNo=7001 I don't need to type the number 7001 in the form and press the submit button. This works fine on this page, however, for the following page, http://logis.korail.go.kr/driveinfo/...riveGuideg.jsp, I can't seem to get this method to work. I think the names of the fields in the form are as follows: - stYukCd wbMd1 wbMd2 trnKind trnNo trnUpDn I can't however get any of these fields to auto-fill by using this method. Any ideas? Thanks Damian I have a form field that I want to remember the text that was put into it after the submit button is pressed......do i need to do that with cookie or is there a way to make a form field remmber the last inputed data?.....for clarity's sake i don't mean for it to remember the data when a user comes back to the page just while they are visiting it. Here is a link to what I am working on now... http://209.97.201.191/ If you notice the drop down menus they disappear, or only partially show when using Firefox. In IE they work perfect. I have never come across this problem before. Any ideas as to what is causing it? Hi, I need some help. I am using a script which breaks down the cookie information to retrieve a cookie ID. This ID is then displaying using the following function: Code: <script type="text/javascript">var gac = new gaCookies(); document.write(gac.getUniqueId());</script> I have a form which my site visitors can fill in. On the form there is a text field called CookieID. What i am after, is getting the output of the code above to become the 'value' of the field... I am using the following javascript to populate the filed when the page loads: Code: function initForm(){ document.getElementById("Field110").setAttribute("value", "text_to_display"); } However, this function can only be used to display 'text' not html or a script. Does anyone have any insight as to how this could be done? Any help appreciated! Hi all! I'm trying to pass an array as a hidden field from a form in the URL of the browser but it's not working. Can you tell me what is wrong with this...it's my first attempt so be gentle The form HTML is <form name="filter" action="http://www.myurl.com" method="get"> <input type="hidden" name="main_page" value="index" /> <input type="hidden" name="Flt_Grade[]" value="100" /> <select name="filter_id" onchange="this.form.submit()"> <option value="1">Most Popular</option> <option value="2" selected="selected">Price: Low to High</option> <option value="3">Price: High to Low</option> <option value="4">Title</option> <option value="6">Date Added: Newest</option> <option value="7">Date Added: Oldest</option> </select> </form> I would expect, when option 4 in the dropdown is selected the URL to be http://www.myurl.com&main_page=index...00&filter_id=4 Where %5B = [ and %5D = ] But what I actually get is http://www.myurl.com&main_page=index...e=&filter_id=4 The Flt_Grade array is not passed properly. Can this be done so the hidden field is passed in the URL as an array? Thank you! Hey everyone! So after ruling out more complex Java implementations of passing a string onto the end of a static link, I'm attempting to do the same using <form> and onclick but am having difficulties. What I am trying to do is simple. There will be a form box where the user enters their ZIP CODE and then clicks a button 'Go'. Once clicked, I'd like to open a separate window (or possibly leave everything in the same window-not important) where the 'zip code' string (ie: 12345) is attached to the end of a static link (ie www.website.com/zip= ) to direct the user to the link 'www.website.com/zip=12345' I realize this is a simple idea, but thus far tutorials have lost me. This is the code that I have, but I admit it is a mess and might just be a better idea to ignore it: Code: <form> <input type="text" maxlength="8" name="zip" style="color:#555555;" value="Your ZIP" class="cleardefault" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip"> <input type="button" value="Go!" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip" > </form> Again, I know this is very n00bish and annoying, but if you could help I'd greatly appreciate the time! Is there a way to have an email form that includes a field where you would enter an email address and this would be used in the "to" field of the email. Hey guys, I've made a form for my website. It should send the information in my form directly to the emailaddress I added, but it doesn't. I would also like to get some sort of confirmation so that when you have filled in the form and sended it, you get some sort of confirmation that the form was filled in correctly and was send to my emailaddress. Here is the code: HTML Code: <h1>Join us:</h1> <form action="MAILTO:joinus@mysitename.nl" method="post" enctype="multipart/form-data" name="Joinus"> Nickname:<br /> <input type="text" name="name" value="your nickname" /><br /><br /> Age:<br /> <input type="text" name="age" value="your age" /><br /><br /> E-mail:<br /> <input type="text" name="mail" value="your email" /><br /><br /> Name:<br /> <input type="text" name="name" value="your name" /><br /><br /> Main skill:<br /> <input type="text" name="skill" value="your main skill" size="50" /><br /> Country:<br /> <input type="text" name="country" value="your country" /><br /><br /> CoD series: <input type="checkbox" name="name" value="CoD United Offensive" /> CoD United Offensive<br /> <input type="checkbox" name="name" value="CoD Modern Warfare" /> CoD Modern Warfare<br /> <input type="checkbox" name="name" value="CoD Modern Warfare 2" /> CoD Modern Warfare 2<br /> <input type="checkbox" name="name" value="CoD Black Ops" /> CoD Black Ops<br /> <br /><br /> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> I used a tutorial on another website to create a Email Form. But the form doesn't work. Can someone help me work out whats wrong. I also want to add a confirmation page. HTML Code: <form action="mailto:exterminate-tcg@hotmail.co.uk?subject=Join Form" method="post" enctype="text/plain"> <table><tr><td> Name: <INPUT NAME="Name" TYPE="text" SIZE=15 MAXLENGTH=50><BR> Email: <INPUT NAME="Email" TYPE="text" SIZE=20 MAXLENGTH=90><BR> Website URL: <INPUT NAME="Website URL" TYPE="text" VALUE="http://" MAXLENGTH=4555><BR> Birthday: <INPUT NAME="Birthday" TYPE="text" VALUE="dd/mm" SIZE=6 MAXLENGTH=5><BR> Set Colecting: <INPUT NAME="Set Colecting" TYPE="text" SIZE=15 MAXLENGTH=11111><BR> Referred By (Optional): <INPUT NAME="Referred By (Optional)" TYPE="text" SIZE=15 MAXLENGTH=30><BR> Comments?<BR><TEXTAREA NAME="Comments?" ROWS=4 COLS=20></TEXTAREA><BR> </td></tr> <tr><td align=center> <INPUT TYPE="submit" value="submit" style="color: #000000 ; background-color: #FFFAFA "> </td></tr></table> </FORM> Hi, I would like to have a html form that automatically emails the input to my email address. It will include a drop down box and text fields. Could anyone help me with this? Thanks. Hello all, I am building a website for a church and I am having trouble getting the contact form working properly. Below is the form code I have. I am also new to ipage, so if anyone is familiar with any server setup, it would be greatly apreciated! <form method= "post" action="http://www.ipage.com/scripts/formemail.bml"> <input type="hidden" name="my_email" value="mailto:info@blanchardnaz.org"> Name<br> <input type="text" name="Name" size="25"><br> Email<br> <input type="text" name="Email" size="25"><br> Phone Number<br> <input type="text" name="Phone Number" size="25"><br> <br> <textarea rows="15" cols="50"></textarea> <br> <input type="submit" name="submit" value="Send" > <input type="reset" name="reset" value="Reset" > <input type="hidden" name="thankyou_url" value="http://www.blanchardnaz.org/index.html"> </form> |