HTML - Html Form And Parsing Code Problem
Help please
I have a form and am entering in some html code into it, but it's not posting. I guess it's a parsing error. In PHP I would addslashes or something like that, but i don't know what to do for a form... I'm sure this is really simple and i've got it wrong. I have been trying different things and searching the web for hours now... Thank you, Jo Similar TutorialsMy html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the 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=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> Hello, I have coded my site, and I have a form on the page, and I'm not sure why I am getting the errors I am getting. If anyone can help me out I would be forever grateful! Here is my code: http://pastie.org/366071 And if you paste it into: http://validator.w3.org/#validate_by_input then you will see what errors I have encountered. Hi, Been having a few problems with my code and need to seek help! I have pasted the code below of what i currently have, which works but the code it's self is invaild and will not pass xhtml checker. This is because i have the link arround other tags so the idea is when you hover over it the background image will change. If i put the link on its own in front of the code it will then just show the hover backgrounds but the text will be pushed below. I cant see how you get around this issue and help or pointers would be great! Thanks This is what i have: Code: div class ="features"> <a href="design.htm"> <h2>Starter</h2> <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> </ul> <div class="more">More</div></a> </div> The Css: Code: .features { display:block; width: 202px; height: 202px; float:left; margin-left: 25px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 25px; color: #0066FF; } .features a{ display: block; height: 202px; width: 202px; background: url(images/button.gif) top left; background-repeat: no-repeat; } .features a:hover { background-position: bottom left; display:block; width: 202px; height: 202px; background-repeat: no-repeat; } Hello Everyone, The following html code supposed to do simple arithmetic operations (calculator). It generates the calculator table but i can't do any computation. I don't know the problem. Please see the code and give me suggestion/s. Thank you, joealem P.S: I am using dreamweaver. 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=UTF-8" /> <head> <title> CALCULATOR </title> <style type="text/css"> td{ border:1px solid blue; width: 50px; } #results { height:20px; } </style> </head> <body> <table width="379" height="229" border="0" cellpadding="2" cellspacing="2"> <tr> <td colspan="4" id="results"></td> </tr> <tr> <td width="88"><a href="#"onclick="return addDigit(1)">1</a></td> <td width="91"><a href="#"onclick="return addDigit(2)">2</a></td> <td width="85"><a href="#"onclick="return addDigit(3)">3</a></td> <td width="89"><a href="#"onclick="return addDigit('+')">+</a></td> </tr> <tr> <td><a href="#"onclick="return addDigit(4)">4</a></td> <td><a href="#"onclick="return addDigit(5)">5</a></td> <td><a href="#"onclick="return addDigit(6)">6</a></td> <td><a href="#"onclick="return addDigit('-')">-</a></td> </tr> <tr> <td><a href="#"onclick="return addDigit(7)">7</a></td> <td><a href="#"onclick="return addDigit(8)">8</a></td> <td><a href="#"onclick="return addDigit(9)">9</a></td> <td><a href="#"onclick="return addDigit('*')">x</a></td> </tr> <tr> <td><a href="#"onclick="return reset()">Clear</a></td> <td><a href="#"onclick="return addDigit(0)">0</a></td> <td><a href="#"onclick="return calculate()">=</a></td> <td><a href="#"onclick="return addDigit('/')">/</a></td> </tr> </table> <script type="text/javescript"> function addDigit(digit){ var resultField=document.getElementById("results"); resultField.innerHTML=resultField.innerHTML+digit; return false; } function calculate(){ var resultField=document.getElementById("results"); resultField.innerHTML=eval(resultField.innerHTML); return false; } function reset(){ var resultField=document.getElementById("results"); resultField.innerHTML=""; return false; } </script> </body> </html> <body> </body> </html> I'm looking to write a form with input fields which, upon submitting, would post to a specific forum. Now, I'm not sure if this is some kind of javascript trickery or something (I am far from familiar with JS). Here's an example of this page: http://www.violentrevolution.net/e10...y/survey.php?2 Now, what happens upon submitting that forum, the information is posted to a forum where clan members can discuss the application. I'm looking to replicate that function, but I've gone over the code and I can't seem to see the modularity of it (i.e. changing the forum to which it posts). Thanks for any help in advance. hi, problem with my code. it does not post to the save.php, the only thing that gets posted to the php file is a ":" can someone help Code: <form method="POST" action="save.php"> <div align="center"> Username: <input type="text" name="username" size="15" /><br /> <div align="center"> Gender: <input type="gender" name="gender" size="15" /><br /> <div align="center"> E-mail: <input type="email" name="email" size="15" /><br /> <div align="center"> <p><input type="submit" value="Sign Up" /></p> </div> </form> Hey, For some reason my table portion of this code does not display... Also, my background color or my td color also do not display...HTML code is posted below. Any help would be awesome... Thanks! HTML Code: <html> <head> <title>Business Projection Site</title> <style> body {bacground-color: #00AAAA} table {border-collapse: collapse} td {background-color: rgb(0,230,0)} </style> <script> L=211; verty=Math.floor(L/20)*1.0; function forecast(){ a1=parseFloat(document.form1.input1.value); a2=parseFloat(document.form1.input2.value); a3=parseFloat(document.form1.input3.value); a4=parseFloat(document.form1.input4.value); d1=a2-a1; d2=a3-a2; d3=a4-a3; dmax=Math.max(Math.abs(d1),Math.abs(d2),Math.abs(d3)); dmin=Math.min(Math.abs(d1),Math.abs(d2),Math.abs(d3)); err=dmax-dmin; avga=(a1+a2+a3+a4)/4.0; erra=err/avga; avgd=(d1+d2+d3)/3.0 r1=a2/a1; r1=a3/a2; r1=a4/a3; rmax=Math.max(r1,r2,r3); rmin=Math.min(r1,r2,r3); errg=rmax-min; avgr=(r1+r2+r3)/3.0; if(errg<erra)stype="A"; else stype="g"; if(stype="A") { a5=a4*avgd; a6=a5*avgd; a7=a6*avgd; a8=a7*avgd; } else{ a5=a4*avgr; a6=a5*avgr; a7=a6*avgr; a8=a7*avgr; } document.form1.out1.value=a5.toFixed(2); document.form1.out2.value=a6.toFixed(2); document.form1.out3.value=a7.toFixed(2); document.form1.out4.value=a8.toFixed(2); msglin='Your data is more like a linear trend than a % growth. '; msglin= msglin+'The average change per period is '+avgd; msgexpgr='Your data is more like % growth than linear trend. '; avgrgr =100.*(avgr-1.0); avgrgr=avgrgr.toFixed(2); msgexpred='Your data is more like % reduction than linear trend. '; avgrred = 100.*(1.0-avgr); avgrred=avgrred.toFixed(2); msgexpred= msgexpred+'The average reduction per preiod is '+avgrred+'%'; if(stype=="A")document.form1.anal.value=msglin; else if(avgr>1.0) document.form1.anal.value=msgexpgr; else document.form1.anal.value=msgexpred; } function plot() { var values=new Array (a1,a2,a3,a4,a5,a6,a7,a8); var yt2=new Array(8); var xt1=new Array(8); var minPV=9999; var maxPV=-9999; for (i=0; i<8; i++){ if (values[i]<minPV) minPV=values[i]; if (values[i]>maxPV) maxPV=values[i]; } for (i=0; i<8; i++){ yt2[i]=(values[i]-minPV)/(maxPV-minPV)*(L-(2*verty))+verty; } for (i=0; i<8; i++){ xt1[i]=Math.round((L-(2*verty))/(8-1)*i+verty); } for (i=0; i<4; i++){ line1(xt1[i], yt2[i], xt1[i+1], yt2[i+1], "#FFF7F7"); points (xt1[i], yt2[i], "#000000", 3); } for (i=4; i<8; i++){ line1(xt1[i], yt2[i], xt1[i+1], yt2[i+1], "00EEEE"); points (xt1[i], yt2[i], "#000000", 3); } function clearplot() { for(i=1;i<=L;i++){ for(j=1;j<=L;j++){ a=document.getElementById(j+","+i); a=style.backgroundColor="#FF7777"; } } } function point(xx1,yy1,color1) { yy1=Math.round(yy1); xx1=Math.round(xx1); idPoint=(L-yy1+1)+","+xx1; cell1=document.getElementById(idPoint); cell1.style.backgroundColor=color1; } function points(xx1,yy1,color1,n) { n2=Math.floor(n/2); for(i1=0; i1<n; i1++) for(j1=0; j1<n; j1++) point(xx1-n2+i1,yy1-n2+j1,color1); } function line1(xx1, yy1, xx2, yy2, color1) { m=(yy2-yy1)*1.0/(xx2-xx1); if (Math.abs(xx2-xx1) >= Math.abs(yy2-yy1)) { for (j=xx1; j<=xx2; j++){ y=m*(j-xx1)+yy1; point(j,y,color1); } } else { ymax=Math.max(yy1,yy2); ymin=Math.min(yy1,yy2); for(k=ymin; k<=ymax; k++){ x=(k-yy1)/m+xx1; point(x,k,color1); } } } function expGrowth() { document.form1.input1.value="10.0"; document.form1.input2.value="20.0"; document.form1.input3.value="40.0"; document.form1.input4.value="80.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function expReduction() { document.form1.input1.value="200.0"; document.form1.input2.value="100.0"; document.form1.input3.value="50.0"; document.form1.input4.value="25.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function linGrowth() { document.form1.input1.value="10.0"; document.form1.input2.value="20.0"; document.form1.input3.value="30.0"; document.form1.input4.value="40.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function linReduction() { document.form1.input1.value="40.0"; document.form1.input2.value="30.0"; document.form1.input3.value="20.0"; document.form1.input4.value="10.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } </script> </head> <body> <h2>Revenue Projection</h2> <form name='form1'> <b>Enter 4 historical data points:</b> <br/> <pre>1. Enter at least 2 data points in this section to forecast and plot your data. 2. Or click on one of the buttons below for examples of linear or exponential growth, or shrink or linear reductions growths.</pre> <p> <input type= 'textfield' size=15 name='input1' /> <input type= 'textfield' size=15 name='input2' /> <input type= 'textfield' size=15 name='input3' /> <input type= 'textfield' size=15 name='input4' /> <p> <input type="button" value="Exponential Reduction" onclick="expReduction()"/> <input type="button" value="Linear Reduction" onclick="linReduction()"/> <input type="button" value="Linear Growth" onclick="linGrowth()"/> <input type="button" value="Exponential Growth" onclick="expGrowth()"/> <p> <b>Predicted Future Values:</b> <p> <input type="text" name="out1" size=15 /> <input type="text" name="out2" size=15 /> <input type="text" name="out3" size=15 /> <input type="text" name="out4" size=15 /> <p><input type="button" value="Forecast" onclick="forecast()"> <p><input type="text" size="115" name="anal" /> </form> <h4>Normalized Plot:</h4> <p> <input type="button" value="Plot Data" onclick="plot()"> <input type="button" value="Clear Plot Data" onclick="clearplot()"> <p> <table> <script> for(i=0; i<L; i++){ document.write("<tr>"); for(j=0; j<L; j++){ document.write("<td id='"+i+","+j+"'>"); } document.write("</tr>") } </script> </table> </body> </html> How do I make a blank text field where people can type in their e-mail and press submit and then that gets emailed to me? I have this code: <FORM method="post" name="newsletter" action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" enctype="multipart/form-data"> <INPUT type=text name="email" value="Type Here" size=15 AUTOCOMPLETE=ON> <INPUT TYPE="image" src="http://www.averytrips.com/submit.jpg" alt="Submit"> </FORM> It's supposed to be e-mailed to newsletter@averytickets.com. I put in the CGI action that dreamhost gave to me, but I don't know how to point it towards newsletter@averytickets.com. Any help is much appreciated, thanks! Hello, I have created a form, but i have a big problem. I think i make a terrible mistake with the code. I think problem is comming from here, and this is the code where i have doubts: <form action=" mailto:name@somemail.com ?subject=form submission" method="post" enctype="text/plain"> My idea is to receive an email with some information of the next fields, but when i submit the information from the form , my outlook express is opening. How can i fix it and the submited info to go to my email? Thanks !!! Dear Friends, I need to sort out this "HTML Form" problem asap. Actually I want to link up the form submit button to my email so that when an user click the submit button of the form, it will staright away submit to my email address without using any outlook or other mail clients. My email address is dev@hss.org and i wanna link up the submit button to it using the below mentioned form... can anyone do that for me ... Please ... Thank you .. Arco <script language='javascript'> function verifyMe(){ var msg=''; if(document.getElementById('Name').value==''){ msg+='- Full Name\n\n';} var email=document.getElementById('Email').value; if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))){ msg+='- Invalid Email Address: '+email+'\n\n';} if(document.getElementById('Email').value==''){ msg+='- Email\n\n';} if(document.getElementById('Country').value==''){ msg+='- Country\n\n';} if(document.getElementById('Problem').value==''){ msg+='- Questions/Problem\n\n';} if(document.getElementById('Newsletter').value==''){ msg+='- Newsletter\n\n';} if(document.getElementById('Prescription').value==''){ msg+='- Medical Prescription\n\n';} if(msg!=''){ alert('The following fields are empty or invalid:\n\n'+msg); return false }else{ return true } } </script> <form name='Doctor' action="htmform.htm"' method='POST' enctype='multipart/form-data' onsubmit='return verifyMe();'> <table class='table_form_1' id='table_form_1' cellspacing='0'> <tr> <td class='ftbl_row_1' ><LABEL for='Name' ACCESSKEY='F' ><b style='color:red'>*</b><u>F</u>ull Name </td> <td class='ftbl_row_1a' ><input type='text' name='Name' id='Name' size='45' value=''> </td> </tr> <tr> <td class='ftbl_row_2' ><LABEL for='Email' ACCESSKEY='E' ><b style='color:red'>*</b><u>E</u>mail </td> <td class='ftbl_row_2a' ><input type='text' name='Email' id='Email' size='45' value=''> </td> </tr> <tr> <td class='ftbl_row_1' ><LABEL for='Country' ACCESSKEY='A' ><b style='color:red'>*</b>Country </td> <td class='ftbl_row_1a' ><input type='text' name='Country' id='Country' size='45' value=''> </td> </tr> <tr> <td valign='top' class='ftbl_row_2' ><LABEL for='Problem' ACCESSKEY='Q' ><b style='color:red'>*</b><u>Q</u>uestions/Problem </td> <td class='ftbl_row_2a' ><textarea name='Problem' id='Problem' cols='35' rows='6' value=''></textarea> </td> </tr> <tr> <td class='ftbl_row_1' ><LABEL for='Newsletter' ACCESSKEY='N' ><b style='color:red'>*</b><u>N</u>ewsletter </td> <td class='ftbl_row_1a' ><select name='Newsletter' id='Newsletter'> <option value='Yes'>Yes</option> <option value=' No'> No</option> </select> </td> </tr> <tr> <td class='ftbl_row_2' ><LABEL for='Prescription' ACCESSKEY='M' ><b style='color:red'>*</b><u>M</u>edical Prescription </td> <td class='ftbl_row_2a' ><input type='file' name='Prescription' id='Prescription' size='45' value=''> </td> </tr> <tr> <td colspan='2' align='right'><input type='submit' name='submit' value='Submit'> <input type='reset' name='reset' value='Reset'><br /> </td> </tr> </table> </form> I have created a simple HTML email form on my linux server. Seems simple enough, yet every time I test it, Outlook tries to open and my form is never emailed. Does anyone know how to correct this? Here is my code: <CENTER> <FORM METHOD=POST ACTION="mailto:test@yahoo.com" ENCTYPE="text/plain"> Subject:<INPUT TYPE="text" NAME="username"> <BR> <INPUT NAME="email" TYPE="hidden" VALUE="<?php echo $_SESSION['email']; ?>"> <BR> Question <BR> <TEXTAREA NAME="COMMENTS" ROWS="10" WRAP="hard"> </TEXTAREA> <INPUT NAME="redirect" TYPE="hidden" VALUE="gm.php"> <INPUT NAME="NEXT_URL" TYPE="hidden" VALUE="gm.php"> <BR> <INPUT TYPE="submit" VALUE="Send"> </FORM> </CENTER> Also, if anyon knows how to create this form in php, that would work as well. Hi all, I can not seem to figure out why a form on my fathers website is having trouble being read by Internet Explorer. The text directing what should be written (ie. Name, Telephone, Email Address, etc...) is being cut in half. I have no idea why it is doing this I have tried playing around with the cell padding to no avail. I appreciate you help Thanks, Josh Korn Hello! I have a blog on blogger and i want to make a c++ tutorial.. But every time i type "<iostream>" on post, when i see it, it is only "iostream". How can i make a code like the "[code]" from BBcode to cancel the compiling from HTML? Thanx! script completed, thx Hello everybody, I'm new here. I'm redesigning my own website and came up with some tricky situation. I write HTML lessons and I want to put just the pure code in my posts, but they appear as a regular html document... How do I make the code to be shown just as text (code), like we do in the forum boards (code tags or whatever)? I have a website where I want to make a drop down menu that will bring you to different pages. It is a very basic, sort of old-fashioned website that relies entirely on html. What I'm trying to do is make a drop-down menu that will be used as navigation for a section of a website and I want to have it in each internally linked page in that section, but I'm going to be adding more pages to it over time so I want to be able to put the drop-down menu code in a separate text file and then substitute it into the pages that I make that the options in the menu link to and then just edit the code in the text file when I add another page so that I don't have to go back and edit the code every single individual page whenever I add a new one among them. Basically all I'm asking is how I can put html code in a text file and then substitute that code into an html page by referring to the file. Thanks in advance for any help. Dear Forum-goers, If I knew what to search for I would, but I don't know what this idea is called. I want to create a website with code that does the following: <body> (INSERT FROM OTHER HTML FILE: Page introduction) (INSERT FROM OTHER HTML FILE: Content) (INSERT FROM OTHER HTML FILE: Sidebar) </body> Is there a way to do this? If not, then okay. I've tried using <link />, which doesn't do the job. You'll see the line in question in blue font: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>This is the main page.</title> <link type="text/css" rel="stylesheet" href="journal.css" /> </head> <body> <link type="text/html" rel="content" href="tobelinked.html" /> </body> </html> Hi All... I am having problems with a page...the table displays on one page, but not on another page...and all I've done is c + p from the bad page into the working one and voila! It went bad this is when viewed in Firefox... Here's the page that works...the middle column keeps the text all the way down the page: http://www.ediblog.com/audjblog.htm Here's the page where the table ends, but the text continues down the page: http://www.ediblog.com/rae.htm Can someone tell me what I'm doing wrong here?? wacko.gif I'm very confused... Thanks this code has been giving me trouble for days and i just cant make it work, please someone help me make the submit button mail the information forms to this email: abuse@hotmail.com PLEAAAAAAAAAAASE. Hi, I am new to custom tag help, I am working in Joomla. I have to bold a keyword in the content but it should not be displayed on the front end. I mean its more for Search Engines, I understood that its a custom code that I need to write for it. If some one has an idea about this please help me out |