HTML - Need Help With Form On Asp Page
A page experiencing the problem I'm describing is: http://www.gigichic.com/press.aspx
The issue is there's a form on the page at the bottom to submit your first name and e-mail to subscribe to a newsletter. The pages are all ASP generated, so it's a form within a form. To work around the issue, I added a </form> tag at the beginning of the new form to stop the ASP's form from continuing. This works great in Firefox, Opera, and Safari, but Internet Explorer destroys the layout. To attack the problem from a different approach, I've created a page called "newsletter.html" which contains the form and the social buttons (see he http://www.gigichic.com/newsletter.html ). The thought was - create the page, call it from an iFrame in the top bar (client wanted it up top originally). The problem there is that I can't figure out how to get the "Join" button to redirect the parent page instead of just the 36px*400px iFrame. The code for the form used is: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="http://www.gigichic.com/thankyou.aspx"> <input type="hidden" name="errorredirect" value="http://www.icontact.com/www/signup/error.html"> <div id="SignUp"> <table width="100%" class="signupframe" border="0" cellspacing="6" cellpadding="0"> <tr> <td align="center"> Want to know about our latest fashions, sales and events? Subscribe to our newsletter today! <input type="text" name="fields_email" size="12" placeholder="Email Address"> <input type="text" name="fields_fname" size="12" placeholder="First Name"> <input type="hidden" name="listid" value="46074"> <input type="hidden" name="specialid:46074" value="CUNO"> <input type="hidden" name="clientid" value="250803"> <input type="hidden" name="formid" value="3859"> <input type="hidden" name="reallistid" value="1"> <input type="hidden" name="doubleopt" value="0"> <input type="image" name="Submit" value="Submit" src="/images/join.png"> </td> </tr> </table> </div> <script type="text/javascript"> var icpForm3859 = document.getElementById('icpsignup3859'); if (document.location.protocol === "https:") icpForm3859.action = "https://app.icontact.com/icp/signup.php"; function verifyRequired3859() { if (icpForm3859["fields_email"].value == "") { icpForm3859["fields_email"].focus(); alert("The Email field is required."); return false; } if (icpForm3859["fields_fname"].value == "") { icpForm3859["fields_fname"].focus(); alert("The First Name field is required."); return false; } return true; } </script> I've tried using javascript to pass the "action" values to the parent page: iFrame: Code: <script type="text/javascript"> function change_parent_url(url){ document.location=url; } </script> Parent: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="javascript:parent.change_parent_url('http://www.gigichic.com/thankyou.aspx');"> <input type="hidden" name="errorredirect" value="javascript:parent.change_parent_url('http://www.icontact.com/www/signup/error.html');"> But this generates a different error. So I trying to tackle this form issue, from either a "form within a form" approach, or a "form within an iframe" approach. I'm not very good at Javascript and I don't understand the rules of ASP page generation to know how to work around it... All help is greatly appreciated. Please and thank you. Similar TutorialsHello, I have a simple quiz with 3 parts: the quiz, the results page, and a printable certificate. On the first page (the quiz itself), I have a form with 20 questions and at the bottom is two buttons: Submit and Reset. Both of these work great, that's not the problem. The problem is on the second page. IF the user did not score high enough, they cannot proceed to the printable certificate and must retake the quiz. For this I have a button which takes them back to the quiz. Unfortunately, I can't get it to reset the form. Here's my code for the button: Code: <input type="button" value="Try Again" name="tryagain" onClick="history.go(-1); document.TrainingVideosTest.reset()"> The form on the first page is named TrainingVideosTest. Here's the code for the reset button on the quiz page: Code: <input type="button" value="Reset" name="resetform" onClick="document.TrainingVideosTest.reset()"> Does anybody know how to reset form data from another page? Go to the web page: http://YourCarThings.com and then select "About Us" from the Top Menu. When you go to the "AboutUs" page, you will receive the error: "Done, but with errors" I caused this by replacing the: jumpmenu Java Script Go to any of the other pages, and you won't get the error message because they use the previous jumpmenu javascript. Please advise. Thanks. Doug Walker I have 4 <form> enclosures on one HTML page, however only the first one works. Is there a technique for using multiple ones? Quote: <form action="default.aspx" method="POST" runat="server" id="form2"> <input type="hidden" name="datfield1" value="addcanvasdeal"> <input type="hidden" name="datfield2" value="2"> <input type="hidden" name="datfieldprice" value="12.99"> <input type="hidden" name="datfieldqty" value="2"> <input type="hidden" name="datfieldcarttype" value="1"> <input type="hidden" name="datfieldtitle" value="Item 1"> <input type="submit" value="Add to Cart" name="B1" style="float: right"> </form> Each field for each form is different. I've got a form on our contact us page where people can send us emails directly through our website. I want to set it up so when a person hits send, they are redirected to a landing page where it says something like, We have received your message, blah blah blah..... How do I do this? How can I place the php form into the html page? Please see the attachment describe what I asking for. thank you. bro can u please help me in making my web page efficient.........i want 2 form method refer to the same html page with different functionality. how can i submit this form to my email can any1 one edit it and fix it for me please thank you make sure it works iv tried but it don't work cuz i cnt name the form Code: <script> function validate() { var at=document.getElementById("email").value.indexOf("@" && ".") var age=document.getElementById("age").value var fname=document.getElementById("fname").value var lname=document.getElementById("lname").value var address=document.getElementById("address").value var header=document.getElementById("header").value var footer=document.getElementById("footer").value submitOK="true" if (fname.length<2) { alert("Please Enter Your Name") submitOK="false" } if (fname.length>12) { alert("Please Enter Your Name") submitOK="false" } if (lname.length<2) { alert("Please Enter Your Last Name") submitOK="false" } if (lname.length>12) { alert("Please Enter Your Last Name") submitOK="false" } if (isNaN(age)||age<18||age>100) { alert("You have to be over 18 to place a online Order") submitOK="false" } if (address.length<25) { alert("Please Enter a valid Address in the Following Format\n\n House/Flat Number\n\n Name of Road/Street\n\n Post Code\n\n Town and the City") submitOK="false" } if (at==-1) { alert("Please Retype Your Email, The Email you Entered is not Valid") submitOK="false" } if (header.length<3) { alert("Please Enter Your Area Phone Code") submitOK="false" } if (footer.length<8) { alert("Please Enter Your Phone Number") submitOK="false" } if (submitOK=="false") { return false } function shaz() { alert("Are You Sure you want to Reset the Whole Page") } } </script> <body> <BODY BACKGROUND="http://img452.imageshack.us/img452/9413/wallpaperox6.jpg" BGCOLOR="white" TEXT="blue" > <center><IMG SRC="contact.gif"> </center> <form action="choice.html" onsubmit="return validate()"> Name (Max 9 chararcters): <input type="text" id="fname" size="20"><br /> <p> Last Name (Max 9 chararcters): <input type="text" id="lname" size="20"><br /> <p> Age (Over 18's Only ): <input type="text" id="age" size="20"><br /> <p> Address:<br><textarea id="address" cols="40" rows="5" ></textarea> <p> E-mail: <input type="text" id="email" size="20"><br /> <p> Primary telephone: (*<input type="text" id="header" size="2" maxlength="4">) <input type="text" id="footer" size="7" maxlength="8"> <p> Card Type: <select id="cardtype" onchange='alert("You Have selected "+ cardtype.value)'><br> <option value = "Home">Home </option> <option value = "Work">Work </option> </select> <p> <input type="submit" value="Click here To Continue" onClick="validate()"> <body> <form onreset="shaz()"> <input type="Reset"> </body> </html> Hi guys, All of my pages are centered in the middle of the screen except my contact_us.html page which shifts half a centimeter to the right (still in the middle of the page but it moves slightly). This page contains a form inside a table. Why does it move?? I can put code up if the answer cannot be resolved from the info provided Thanks, Raggy Hey, I was wondering if there's any way (without Javascript, I wouldn't mind PHP though) to draw a value (say a persons name) from one HTML page, to a new window with, say, a comment box, and the person they are commenting about is already typed out for them, or stored hidden somewhere. Each different page would link to the same comment box, but the name value would be different depending on WHO they want to comment on. Hey everyone, This is my first post here, and I was hoping you guys could help me with a problem I am having. I own a race photography company and I am trying to find a way to create a form that athletes can fill out and it will take them to their images. I have keyworded all the images on my smugmug site with a race id followed by a number, such as "gunstock 6" So if they visit http://blahblahblah.smugmug.com/keyword/gunstock 6 it will bring up all the images of them from that race (every image keyworded with gunstock 6) However..... what I want to do is make that into a form which will take them to that specific page. I am a newbie when it comes to designing forms and webpages, and after searching around, it seemed the form get command sort of achieves what I want, in that it takes the form input and places it in the url. However... it also places the usual query text such as the question mark, =, and all that good stuff. So when I enter the race id and number on my form, it will instead take me to the url .../keyword/?=gunstock&=6, which instead of being a defined page with all of the images keyworded gunstock 6, it will just bring me to the keyword search page of smugmug. Is there any way to design a form that redirects simply to the .../keyword/raceid # url format? Thanks a million! 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 I've got a data entry form where a user optionally puts data in a couple sections. It's too big to fit on-screen, so currently it's a multi-column, spreadsheet-style form. First, before I even chase this and waste everybody's time, is using tabs a good way to make a form that'd otherwise scroll through multiple sections? To make it easier to use I'm thinking about using tabs. I've found a couple examples and can display the tabs fine, but I"m having trouble understanding how to do the interaction between the form and php. The list is a set of hrefs like <li><a href="abcdform.php">a</a></li> <li id="selected"><a href="#">b</a></li> I can see that the first li is going to jump to "abcdform.php", but what does the "#" in the second li do? I want this to be a single php file with the html in it and a single php file with all the code. How do I get php to know what tab was hit? I"m generating the table rows and data in the php so how do I get the right rows of data into the right tab section? Alright, fairly basic question here, but I'm kicking myself over and over trying to figure out some fairly basic code. What I'm doing for a friend is helping code his gaming website so that his in-game buddies can update their stats on his page. I'm just about done with the simple database work, so they can create usernames/passwords etc, but the stats page is a bit of a problem. Basically, I want a form page only accessible once they've logged in, and they can then input their information onto the form, hit "Enter" (or some other button to that effect), and the site will update a different page with all of their stats which were input into the form. No idea where to start. Help if possible, thanks. HI, I just started here... like two minutes ago. I NEED help on getting a form to automatically post to a page on my website. So, i'm making a class website, right, and I need my teacher to be able to post stuff on a page and have it erase what was already on there (every week). My teacher does not know html, so I would like to have a text box automatically edit the page, I am a medium web designer... but I do not know ANYTHING about this, I have searched EVERYWHERE and couldn't find ANYTHING. It got so annoying that I gave up for about 6 months... until today, which is why I'm asking this. By the way, I would also like "Contact us" forms to go directly to my email, WITHOUT any CRAPPY websites (like the one I'm using now) any help would be very appreciated!! I have a form where a select list can be updated by clicking 'update' next to it. When this is clicked I would ideally like just that to be updated, but I do not think this is possible. I was thinking of having two form actions, one that submits the form as usuall, but one that submits the form somewhere else, depending on which submit button is clicked. If I could have two submit buttons, I could use one to submit the form back to the same script, with the script re-filling the form elements that where filled out, and the select box would then update. So, my main question is...... Is there a javascript submit function that can change the destination of the form? Perhaps this should be in the javascript section! I need a basic form to submit for a html web page. Can you provide one with a two seperate fields, one text area, and a submit button? Thanks I got this form in simple html HTML Code: <form name="input" action="display.html" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> When the user clicks the submit button the user should be directed to display.html and should display the name he entered on the form previously. I want the coding in either javascripts or html. y javascript or html ? I want to upload form to a site, so that users can download the form and then fill that form and view what they entered.. To fill the form when running in local machine, you cannot have php scripts, Not all will hav ephp installed in their Pc's.That's y i want in javascript or html... I want to know whats the script to be in display.html page to view the name entered by the user on the form page.......... Hello, i just re-designed my site, and also added a simple form to the home page...it's the same code i used on the contact page which works every time.... i can't figure out why it works sometimes and not other times..... This morning i tested in 3 browsers: IE: doesn't work Firefox: " Chrome: works Also in Chrome, the alignment on the About page is off......... making me crazy!! Help ASAP would be swell!! Thank you!! 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); ?> |