HTML - Edit Contact Form So That It Does Not Reload Page?
Hi--
I was hoping someone could tell me how to edit this contact form so that it does not redirect to another page (the php page)? I'd like it to just simply send the message without leaving the page. The trick here is that I am using a javascript link to submit the form, NOT a button... Any help would be most appreciated! HTML PAGE: <body> <script type="text/javascript"> function submitform() { document.forms["form"].submit(); } </script> <form id= "form" method="POST" name="form" action="mailer.php"> Name: <input type="text" name="name" size="19"><br> <br> E-Mail: <input type="text" name="email" size="19"><br> <br> Message:<br> <textarea rows="9" name="message" cols="30"></textarea><br> <br> <a href="javascript: submitform()" >Searchthis</a> </form> </body> PHP FILE: <?php $to = "info@abcsofufos.com"; $subject = "ABCs of UFOs"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; echo "Data has been submitted to $to!"; mail($to, $subject, $body); ?> Similar TutorialsHi Im new to the forum, it looks like a great place, would be very grateful for your help I am looking for some code to make up a contact system. When a user clicks on a link or button in my website it forwards them to my contact form and in a field in the contact form it pastes either the items title they were enquiring about or the page they had been enquiring on at the time I found a javascript function that may be able to do it called dopostback but after reading some forums I am concerned it will hinder web crawlers from crawling my site Is there anything equivalent in HTML or other language that could achieve it? Regards Jamie I have plain HTML on the main page and <iFrame> tag on it, inside tag i have URL to other page that using some script that forces host page to reload and show page from frame instead of it. Can i somehow stop it from messing my entire main page? I have a page and need an image to load from the server whenever the page is loaded (even if the user hits the back/forward button). I am aware of doing it with a META tag, but I only want it with one image - not every image on the page. Thanks in advance for the help! Hello, I'm not sure if what I'm asking is possible using html, but I'm going to ask anyway... I'm trying to figure out how to have a sidebar randomly cycle through a series of images each time the page is loaded/refreshed. I'd like the same image displayed at the top and bottom of my sidebar, one image each at the top and bottom of my menu list. But I want to make sure that the image displayed at top and bottom are the same one. Here's my current version of the site: http://home.comcast.net/~blayne81/l5rrpgweb/ You can see the menu on the left side of the page and the two images at the top and bottom of the menu. I have another eight or so images I'd like it to display randomly or cycle through in order (it really doesn't matter which), whenever the page loads/reloads so I don't have to manually pick which image appears every page I write, the code will do that for me. Thanks for your help, Brienprime I've got a page that, on starting, checks its URL for a hash extension and behaves accordingly. So the hash, or lack thereof, is important. I want this page to contain some hyperlinks to itself, with various hash extensions. It doesn't work! If the URL is just to the page (eg. mypage.html) it reloads fine. But if the URL is, for example mypage.html#&e=extrastuff, the page doesn't reload at all. Is there a solution to this? Hi, I am working on adding non java-script buttons on my website using CSS style sheets. I used a technique given at http://builder.com.com/5100-6371-5323375-2.html. I modified the colors a little but it is basically using technique 2 at this link. Everything works well with the exception of one issue. In Internet Explorer, when I press a link and then use the back button on the browser to return to the previous page, the link for the previous page is still selected and the button appears to still be "pressed". You can see this by going to http://www.apexmoves.com with internet explorer, clicking one of the buttons on the left side of the site, and then using the browser's back button. You will see that the link that was clicked is still selected and this button appears to be stuck in the down position. If you click anywhere else on the screen, the button is released. This is because the link for the pressed button is has the status of active. Does anyone have any ideas on how to solve this. Is that a way to make the status of this link "visited"? Any Ideas would be greatly appreciated. Thanks Brad Hello I have an issue where I have two web pages generated from Java servlets in NetBeans 5.5. The first of these pages requires some user input and when the page's form is submitted, this input is sent to the server. The server processes the input to generate a text file which is used by a graphing tool to plot a graph as a 'png' file. This text file and graph are then displayed in the HTML generated for the second page using 'href's in a table. This works perfectly well but if the user wants to alter the graph, they have to go back to page one and change the options and resubmit the form. This is where the problem occurs; in Firefox all is well but in Internet Explorer and Opera, when they resubmit the form, page two displays the original graph rather than the changed one. A hard 'refresh' is required via F5 to force the displaying of the new text file and graph. I have tried various of the HTML: meta http-equiv=\"refresh\" content=\"0\"> alternatives and forcinf reload upon loading the second page but the graph and text file still show original data. Is there a way to force the browser to 'pick up' the new text and graph generated so that the page display is correct? I see this more as an HTML issue rather than a servlets one hence its inclusion in this forum. Thanks Martin O'Shea. I have need to include a button in a SharePoint page that will refresh that page, but strip out everyting after the .aspx in the URL (meaning "?blablabla"). I know the simple code <a href="#">click me</a> will load the current page. But is there a code that will strip out everything after the "?" portion? Hello, sorry for any trouble I may cause but this game maplestory, I am trying to get my account back but I have forgotten the e-mail address to get the account. I have been linked to this page on the website but it gives me only the first letter of my email address followed by @gmail.com It is, l_______@gmail.com Is it possible to edit the source of the page to view the missing letters? Here is the source; 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=utf-8" /> <title>Change Your Password!</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $('input').focus(function(){ $(this).addClass('focused'); $(this).removeClass('filled-out'); }); $('input').focusout(function(){ $(this).removeClass('focused'); if(this.value != 0){$(this).addClass('filled-out')} }); }); </script> <link href="http://nxcache.nexon.net/passport/password/css/styles.css" rel="stylesheet" type="text/css"/> <!--[if IE 6]> <script type="text/javascript" src="http://nxcache.nexon.net/passport/password/js/ie6-transparency.js"></script> <script type="text/javascript"> DD_belatedPNG.fix('.png_bg'); </script> <style type="text/css"> body.MapleStoryTheme #FormBackground{background-position:20px 0;} body.MabinogiTheme #FormBackground{background-position:20px 0;} body.DungeonFighterTheme #FormBackground{background-position:20px 0;} body.PopTagTheme #FormBackground{background-position:20px 0;} body.CombatArmsTheme #FormBackground{background-position:22px 0;} body.iTCGTheme #FormBackground{background-position:20px 0;} body.NexonTheme #FormBackground{background-position:58px 0;background-color:#f2efe7} body.NexonTheme .remind-me-later{margin-left:80px} .remind-me-later{width:180px} </style> <![endif]--> <!--[if IE 7]> <style type="text/css"> .remind-me-later{width:180px} </style> <![endif]--> </head> <body class="MapleStoryTheme no-pw"> <form name="frmReactivationComplete" method="post" action="ReactivationComplete.aspx" id="frmReactivationComplete"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTYwMjg2NzYzM2Rk" /> </div> <div id="FormBackgroundTop"> <h1 onclick="javascript:window.location.href='http://maplestory.nexon.net/';">Nexon</h1> <h2>Change your password!</h2> </div> <div id="FormBackground"> <span class="game-character png_bg"></span> <h4>Email Verification Incomplete</h4> <div class="info-box"> <h3>You’re almost there. Account Activation Link Sent!</h3> <p><strong>Activate Your Account and You're Ready to Play!</strong><br /> An Account Activation Link has been sent to the email address below:</p> <p><span>l_______@gmail.com</span></p> <p><a class="btn-goto-email" href="http://gmail.google.com/">Go to gmail.com now!</a></p> </div> <h3>Helpful Tips!</h3> <div class="tips"> <p>Click the link in the email to automatically activate your account and you’ll be on your way!</p> <p>If you have not yet received a confirmation email, please be patient. Click your email browser’s refresh button to refresh your inbox.</p> <p>If you can’t find the email in your inbox, please check your “spam” folder as some email filters will mistakenly redirect this automatically generated message to that folder.</p> </div> <p class="please-read large-text">If you no longer have access to this email, please contact Customer Support by <a href="http://www.nexon.net/Support/SupportForm.aspx?view=email&nexonTheme=MapleStory">clicking here</a></p> <div class="cl"></div> </div> <div id="FormBackgroundBot"></div> </form> </body> </html> Thank you I'm having trouble finding the admin login to edit my gallery.I have the login and Password.The original webmaster abandoned my friend and I decided to learn how the edit html.I've looked in all the directories and the other files listed. I have a table-based site (with CSS for styling and some placement within cells) built in Dreamweaver 8 that now needs to be editable from Contribute CS3 (Mac). This is maybe the fourth or fifth site I've pulled into Contribute for updating and I've never had any issues with the program or how I build sites until now. The website looks fine in web browsers, Dreamweaver, and in Contribute's browser view, but as soon as I hit the edit button and go into the page everything is squashed up against the left side of the screen, like this: (Click for bigger image) It's like all of a sudden none of the cells have a width value. What's really strange is images are overlapping too, not just butting up against one another. Any ideas why this is happening? I've tried searching online and so far can't find anyone who's had a similar issue. Thanks, m19 I'm not sure if this is the right forum for this question but I was just wondering how to change my links so that they look like: http://website.com/?page=contact Thanks for any help. Hello, please can you help me with my contact page. I really don't know how to fill my page. What do you guys include on your pages?? The attachment show's you what mine looks like at the moment.. Thanks I'm currently helping someone maintain a pretty simple website, mainly text. And they would like to update their site relatively often, but I don't have the time and they don't have the knowledge of updating the page. So I was wondering if I could just embed the text into the html file using a .shtml file (ex <!--#include file="maintext.shtml" -->) and create a form on a seperate, password protected page that would have a simple textarea and submit button that would allow them to edit the text in the .shtml file and press submit, therefore editing the text in the .shtml file? Is this possible? Can anyone tell me why? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Main</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> #container { width:990px; padding:8px; border:1px solid #999; margin:auto; } #lefthome { width:100px; height:74px; border-top:1px solid #999; border-bottom:1px solid #999; border-left:1px solid #999; margin-bottom:4px; background-color:#fee; float:left; } #time { width:119px; height:74px; border-top:1px solid #999; border-bottom:1px solid #999; border-left:1px solid #999; margin-bottom:4px; background-color:#fee; float:left; } #banner { width:531px; height:74px; border-top:1px solid #999; border-bottom:1px solid #999; border-left:1px solid #999; margin-bottom:4px; background-color:#efe; float:left; } #date { width:119px; height:74px; border:1px solid #999; margin-bottom:1px; background-color:#eef; float:left; } #righthome { width:100px; height:74px; border-top:1px solid #999; border-bottom:1px solid #999; border-right:1px solid #999; margin-bottom:4px; background-color:#fee; float:left; } #about { width:482px; height:210px; border:0px solid #999; margin-right:2px; margin-bottom:4px; background-color:#ffe; float:left; } #program { width:482px; height:210px; border:0px solid #999; margin-left:2px; margin-bottom:4px; background-color:#eff; float:left; } .topic { height:110px; border:1px solid #999; margin-bottom:4px; background-color:#eee; float:left; } .left { width:320px; margin-right:2px; } .center { width:320px; margin-right:2px; margin-left:2px; } .right { width:320px; margin-left:2px; } #footer { width:970px; height:38px; border:1px solid #999; background-color:#fef; clear:both; } </style> </head> <body> <div style="font-family: Arial;" id="container"> <div id="lefthome">Click here to go home</div> <div id="time">Tianjin Time<iframe src="http://free.timeanddate.com/clock/is4qzpf/n33/th2/ts1" frameborder="0" height="18" width="62"></iframe></div> <div id="banner">name of site</div> <div id="date">Tianjin date<iframe src="http://free.timeanddate.com/clock/is4qzpf/n33/tt1" frameborder="0" height="18" width="218"></iframe></div> <div id="righthome">Click here to go home</div> <div id="about">me </div> <div id="program">program</div> <div class="topic left">western business</div> <div class="topic center">Chinese word</div> <div class="topic right">culture</div> <div class="topic left">calendar </div> <div class="topic center">links (sausage links) </div> <div class="topic right">archives</div> <div id="footer">bottom banner thermometer icon, weather icon, newspaper icon, chat with me, rss feeds, bookmark this site, guestbook, counter</div> my story/objective </div> </body> </html> Hello everyone, I know this might sound easy but I can't remember how to do this. Does anyone know how to send information from a simple form by hitting the submit button and I should be able to view the data in my domain email? I guess you can say I can check my email and the name, email and message form fields would displayed. I've created the form, form fields and the buttons in dreamweaver. I'm not sure if the enctype is ="multipart/form-data" I've done this before in front page. it come out as a web bot but i cant remember how this works in dreamweaver. I hope I haven't confused anyone. Please reply if you know what I'm talking about. Thank you. Here is the code below from my contact.html page: <form action="thankyou.asp" method="post" enctype="text/plain" name="contactform" target="_blank"> <span class="formstitle">Name:</span><br> <input name="textfield" type="text" class="formstitle2" size="30" maxlength="30"> <br> <br> <span class="formstitle">Email:</span><br> <input class="formstitle2" name="email" type="text" id="email" size="30" maxlength="30"> <br> <br> <span class="formstitle">Message:</span><br> <textarea name="message" cols="30" rows="4" class="formstitle2" id="message"></textarea> <br> <br> <input name="Submit" type="image" value="Submit" src="images/submit.gif" alt="submit" width="56" height="28"> <input type="image" src="images/clear.gif" alt="clear" width="56" height="28"> <br> </form> I'm new to this so I'm going to post the template I found and then hopefully someone can make it right. Will upload two text files first is the contact page its an html file. the other is the contact script as a php file. Sorry if this has been brought up before but i've been trying now for about 6 hours. Thank you Bill Ruiter Not sure if this is the right place but I was just wondering if anyone could help me. I'm trying to make an option on my contact form that when you click it, it affects whether you have to enter the other fields or drop-down box. For example and simply put, if someone clicked the box labeled 'red', then it would be required for them to fill out the box that says 'explain your choice'. However if they do not click red, then they do not need to fill out the 'explain your choice' box... How do I do this? Is there a name for it? Thanks for any help Alright, i'm having a problem with this contact form. I made it so that it will send to your email. But when I submit, its supposed to say on a new page "Your message has been sent.", but when I send it, all it says is "'); header('Location: sent.html'); ?>". Here is the codes: Code: <html> <head> <title>Contact</title> </head> <body> <form action="form.php" method="post"> Name<br/><input type="text" name="name" /><br/> Email<br/><input type="text" name="email"/><br/> Message<br><textarea row="7" cols="70" name="message"></textarea><br/> <input type="submit" value="Submit" /> </form> </body> </html> Code: <?php $name = $_POST['name']; $email = $_POST['email']; $text = $_POST['mesasge']; mail('EMAILHERE', 'message, $text, 'From: ' . $name . ' <' . $email . '>'); header('Location: sent.html'); ?> Code: <html> <head> <title>Sent</title> </head> <body> Your message has been sent. </body> </html> Help will be appreciated. Thanks for your time. Hello guru's, I have created a contact form on the website, but i dont know how to send the information that the users has typed to my email address What code do i need to type? |