HTML - Auto Scrolling To Bottom Ofa Page After A Form.submit()
Hi all,
I'm trying to find a way to have my webpage scroll to the bottom automatically after the script: document.form1.submit() is called. I need to run the function/refresh in order to reload some different data into part of the page, but after the refresh the position of the page is always at the top... making the user have scroll down again. I could set some anchors or use window.scroll(0.500); on the page load, but i only want it to scroll down if that function of form1.submit() is called - and thats only called once the page has already loaded for the first time. So the first time a user goes to the page, it loads normally at the top of the page. Then they scroll down themselves and select an option. Once the select an option, the form1.submit() is called and the page refreshes with new data in it but is still at the top. Is what I want possible? Thanks, Mike Similar TutorialsHi All, I want to autosubmit my file to google.com. Here is the code I wrote to execute it. Unfortunately output is not what is intended. I tried in IE and mozilla only. Basically I want the script to be browser independent Any help will be appreciated. Below is the code. My file name is autosub.html <HTML> <HEAD> <TITLE>My First JavaScript</TITLE> </HEAD> <BODY onload=""> <FORM NAME="search_Key" METHOD="post" ACTION="http://www.google.com" target="_top" id="search_key"> <p align="center"> Search value : <INPUT NAME="search_value" SIZE="10" MAXLENGTH="3" VALUE="spiderman"></p> <INPUT type="submit" value=Go> </FORM> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> <!-- document.write("I love JavaScript"); //--> function myautosubmit() { document.pnr_stat.submit(); document.write("I love JavaScript2"); } </SCRIPT> </BODY> </HTML> When open my autosubmit.html, browser shows "I love JavaScript2" only. Thanks in advance Using below script after clicking the button it will reload the page and starting the application I want people go to anchor link location after clicking the submit button, for example go to the bottom of the page because the program is in the bottom of the page how to do that guys please help Code: echo '<form action="" id="frm_chat" method="post"><fieldset id="fieldset_chat"><legend>Chat</legend><div>'; echo $err_msg; echo "<label>Nick: </label>".$txt_nick->getHtml()."<br />"; echo "<label>Server: </label>".$ddl_server->getHtml()." or ".$txt_server->getHtml()."<br />"; echo "<label>Channel: </label>".$ddl_channel->getHtml()." or ".$txt_channel->getHtml()."<br />"; echo ' <input type="submit" class="btn" name="btn_chat" value="Chat Now"/></div></fieldset></form>'; What HTML code creates a bar that stays at the bottom of the screen, even when the paged is scrolled Like the Wibiya toolbar does http://wibiyareview.com/ Thanks James 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> I'm using this div container on my web page to display data in: PHP Code: <div id="id_screen_area" style="border:1px solid black; width:400px; height:100%; overflow:scroll; overflow-y:scroll; overflow-x:hidden;"> I'm bringing the data in via Ajax (through the "ajax data tunnel") and as the data comes into the div container, it scrolls the page up as the data fills the web page. This works very nicely in Firefox and Windows Safari but not in IE8. Here is the Ajax portion that populates the div as the data comes into the browser from the server: PHP Code: function returnAjaxSendTextMessage() { var objDiv = document.getElementById('id_screen_area'); if (http.readyState == 4) //Finished loading the response { var response = http.responseText; document.getElementById("id_screen_area").innerHTML = response; objDiv.scrollTop = objDiv.scrollHeight; } } I was wondering if anyone knows a trick to make it scroll in IE8? Thanks for any tips... 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 Hello, I am very new to these forums, so I apologize if this question is either in the wrong location, or impossible to accomplish. I am very new to HTML editing. While I have got the basics down, I have been tasked with creating a website for one of my friend's business. I have been "attempting" to finish this task, but I seem to come across a road block. What I would like to do is create a form with several checkboxes. Each checkbox would be assigned a numeric value. Below the form field, data that is displayed would change based on the combined values of the checkboxes. I will try to clarify. For example. Say you have 6 checkboxes. The number in parenthesis is the value. [ ] (1) [ ] (2) [ ] (1) [ ] (4) [ ] (3) [ ] (7) Now say that two of the boxes are checked. [ ] (1) [ ] (2) [x] (1) [ ] (4) [x] (3) [ ] (7) Their total value is four [(1) and (3)]. Now what would be displayed, in either an iFrame, or on the page itself if it is possible, would be dependent on the total value, say 0<=4 would be one set of information; 5<=8 would be another; 9+ a third set. Also, this form would have to update on every click. No submit button. I believe you can understand my dilemma. I have been searching the web for an answer to both of these problems, both together and separate. Please, anything will be helpful and appreciated, even if not an answer, a point in the right direction. Thanks. When I expand menu items IE automatically detects if scrollbars are needed. When I expand them in Firefox and the menus push below the bottom of the page no scrollbars show up. This might be a scripting issue as opposed to HTML - not sure. I am stuck with this stupid code that i have been trying to fix for an hour! Please help. Heres my problem...: I want to embed a webpage within another and scroll it to the bottom of the page automaticly because i want the information at the bottom which is updated frequently. I also dont want a scroll bar, so all that is seen is the table. the website is www.totalfta.com. I want from below the ENTER|EXIT sign to the bottom of the table. I have attached what i have so far. ***I have the embed into another page, and the no scroll bar... i just want to make it auto scroll to the table..**** Thank you..! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-... <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Tester</title> </head> <iframe height="410" width="100%" frameBorder="0" src="http://www.totalfta.com" mce_src="http://www.totalfta.com" scrolling="no" body onLoad="for (i=0;i<window.screen.availHeight;i++) {window.scroll(0,i); }"</iframe> <body> I'm making a website which will include a gallery of several images, in addition to a navbar. I would like to be able to put the images and corresponding text in a little thing that can be scrolled through independently from the overall page; I'd like the navbar to be a permanent fixture on the page. I'm sure my terminology isn't correct, but we've all seen this sort of site before, right? Thanks! I am a novice when it comes to html and can't figure out why there is a gap at the top and bottom of my web page in Mozilla? In AOL browser it is ok. http://www.nomoreheartdiseaseandstrokes.com Thanks http://wantedfraternity.webs.com/officerschat.html At the very bottom of my page I've got a gap...and I cant seem to see whats causing it. I had this problem before on another page, but I was able to fix it. This one I just cant seem to. Now the grey background is suppost to go all the way down, but its got a black spot stopping it now. Any help on what is causing it I'd be greatful. Thanks Hi, How in HTML can you force a webpage to scroll down to a certain point of the page when the page loads up. Is this possible in HTML. Once it does scroll down to the certain point, I still want to be able to scroll up and down AFTER it has loaded up...is this possible. Can someone please urgently help. Thanks I need to remove the scrolling bar for a text box. How can I do this? I'm looking for some help getting an html table I created to be at the top of a page. It looks alright to me, but then when I post it to my blog it has like 50 blank lines and puts it at the bottom of the page. I want it right at the top. I'm not the best at html, especially tables... I just try and copy excisting table examples and add my own information. If someone can help it would be greatly appreciated. Heres the code: HTML Code: <table cellspacing="1" cellpadding="2" border="1"> <tbody></tbody></table><table border="6"> <tbody><tr> <td><b><center>Player</center></b></td> <td><b><center>G</center></b></td> <td><b><center>PA</center></b></td> <td><b><center>AB</center></b></td> <td><b><center>R</center></b></td> <td><b><center>H</center></b></td> <td><b><center>HR</center></b></td> <td><b><center>RBI</center></b></td> <td><b><center>BB</center></b></td> <td><b><center>SO</center></b></td> <td><b><center>SB</center></b></td> <td><b><center>BA</center></b></td> <td><b><center>OBP</center></b></td> <td><b><center>SLG</center></b></td> <td><b><center>OPS</center></b></td><b> </b></tr> <tr> <td align="middle">Corey Hart</td> <td>60</td> <td>221</td> <td>194</td> <td>34</td> <td>61</td> <td>10</td> <td>31</td> <td>21</td> <td>35</td> <td>15</td> <td>.314</td> <td>.391</td> <td>.531</td> <td>.922</td> </tr> <tr> <td align="middle">Carlos Lee</td> <td>76</td> <td>331</td> <td>292</td> <td>41</td> <td>85</td> <td>13</td> <td>60</td> <td>24</td> <td>30</td> <td>4</td> <td>.291</td> <td>.341</td> <td>.503</td> <td>.844</td> </tr> <tr> <td align="middle">Corey Hart Projected</td> <td></td> <td></td> <td>294</td> <td>51</td> <td>91</td> <td>15</td> <td>46</td> <td>31</td> <td>52</td> <td>22</td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> </tr></tbody></table> I need help with this html page. I would like the disclaimer at the bottom of the page to not follow the body. Is that possible? Take a look at this html and let me know if it is possible to recode it to show the disclaimer across the entire width of the page bottom as in this url : http://www.stocktraderspress.com/mem..._01112012.html Here is the html code for the new page I am trying to edit: <html> <head> <title>Stock Traders Press :: 2011 Performance</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style3 { font-size: 24px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; } .style4 { font-size: 18px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; } .style11 {font-size: 10px} .style15 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .numbersbody { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; text-align: center; } .datebody { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; text-align: right; } .tickerbody { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; text-align: left; } .style17 {font-size: 14px; font-family: Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr align="center" valign="middle" bgcolor="#FFFFFF"> <td width="20%" height="19">*</td> <td width="20%" height="19">*</td> <td width="20%" height="19">*</td> <td width="20%" height="19">*</td> <td width="20%" height="19">*</td> </tr> <tr align="center" valign="middle" bgcolor="#FFFFFF"> <td colspan="5"> <table width="89%" border="1" cellpadding="10" cellspacing="0"> <tbody> <tr> <td valign="middle" bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td colspan="5"><img src="/stp_logo.gif" width="363" height="42"></td> <td>*</td> <td><span class="style3">2011 Performance</span></td> </tr> <tr> <td colspan="2"><a href="/members/welcome.php">Go Back </a></td> <td colspan="5"><span class="style4">************************** </span></td> </tr> <tr> <td colspan="7"><span class="style4">These are the recommendations our Firm made in 2011 </span></td> </tr> <tr> <td colspan="7"><span class="style4">By purchasing an equal amount of every stock, you would have had an average gain of 9.41%</span> </td> </tr> <tr> <td width="87">*</td> <td width="115">*</td> <td width="80">*</td> <td width="79">*</td> <td width="197">*</td> <td width="140">*</td> <td width="175">*</td> </tr> <tr> <td colspan="2" class="style15">Closed Positions </td> <td>*</td> <td>*</td> <td>*</td> <td>*</td> <td>*</td> </tr> <tr bgcolor="#CCCCCC"> <td> <div align="center"> <strong><span class="style17">Stock</span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Date Bought</span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Date Sold </span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Time Held </span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Price (Recommended) </span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Price (Sold) </span></strong></div> </td> <td> <div align="center"> <strong><span class="style17">Profit/Loss</span></strong></div> </td> </tr> <tr> <tr bgcolor="#E6FFFF"> <td class="tickerbody">GT</td> <td class="numbersbody">01/05/2011</td> <td class="numbersbody">04/29/2011</td> <td class="numbersbody">114 Days</td> <td class="numbersbody">$12.69</td> <td class="numbersbody">$18.20</td> <td class="numbersbody">43.42%</td> </tr> <tr bgcolor="#E6FFFF"> <td class="tickerbody">CMG*</td> <td class="numbersbody">07/08/2011</td> <td class="numbersbody">08/18/2011</td> <td class="numbersbody">41 Days</td> <td class="numbersbody">$325</td> <td class="numbersbody">$285</td> <td class="numbersbody">12.36%</td> <td class="numbersbody">*Cover of a Short position</td> </tr> <tr bgcolor="#E6FFFF"> <td class="tickerbody">GT</td> <td class="numbersbody">09/06/2011</td> <td class="numbersbody">10/24/2011</td> <td class="numbersbody">2 1/2 months</td> <td class="numbersbody">$11.11</td> <td class="numbersbody">$13.58</td> <td class="numbersbody">24.46%</td> </tr> <tr bgcolor="#E6FFFF"> <td class="tickerbody">OLN</td> <td class="datebody">10/04/2011</td> <td class="numbersbody">10/27/2011</td> <td class="numbersbody">23 Days</td> <td class="numbersbody">17.17</td> <td class="numbersbody">$21.37</td> <td class="numbersbody">24.46%</td> </tr> Hey been looking around for an example on how to get an Iframe to load at the bottom of a page and not move, just a small Iframe, like 25px in height and 100% width, Ive got a page which scrolls news and I didnt want it to reload every time the user clicked on another page. I dont want it to be at the bottom of the content on the page, but on the bottom of the actual browser window if that makes sense Any suggestions would be great thanks Hi, i have tables on my site at the top, middle, right,left etc... but I can't seem to get one to stick at the bottom of the page, it just stays underneath the other page info, i want it to go right to the bottom.... any ideas? thanks I don't understand why there is white space at the bottom of the page. I am using negatives which one would assume would take away space and not add it. Below is the HTML and CSS codes. If someone could take a look at this and let me know what it is that I need to do to get rid of the white space at the bottom, I would be greatly appreciative. Thanks in advance. McClain 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>Blakeslee - Quality Commercial Dishwashing and Prep Equipment</title> <link rel="stylesheet" href="css/styles.css" type="text/css" /> </head> <body> <div id="header"></div> <div id="nav"></div> <div id="content"> <ul> <li class="premiere"><a href="#"><img src="images/p1.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Flight-Type Dishwashers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="primary"><a href="#"><img src="images/Rack_type_dishwasher.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Rack-Type Dishwashers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="endProduct"><a href="#"><img src="images/vegetable_peelers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Vegetable Peelers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="primary"><a href="#"><img src="images/door_type_dishwashers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Door-Type Dishwashers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="endProduct"><a href="#"><img src="images/food_slicers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Food Slicers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> </ul> <img id="productBg1" src="images/first_row_background.png" /> <div id="clear"></div> <ul class="Hproducts"> <li class="premiere"><a href="#"><img src="images/glass_washers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Glass Washers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="primary"><a href="#"><img src="images/undercounter_dishwashers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Undercounter Dishwashers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="endProduct"><a href="#"><img src="images/planetary_mixers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Planetary Mixers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="primary"><a href="#"><img src="images/pot_utensil_washers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Pot & Utensil Washers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> <li class="primary"><a href="#"><img src="images/silver_stainless_burnishers.gif" alt="ok" border="none" /></a> <ul> <li class="title"><a href="#">Silver/Stainless Burnishers <img src="images/arrow.gif" alt="arrow" border="none" /></a></li> </ul> </li> </ul> </div> <img id="productBg2" src="images/second_row_background.png" /> </body> </html> CSS Code: body{ margin-right: 10%; margin-left: 10%;} #content,#nav,#productBg1,#productBg2,.Hproducts,.premiere,.primary,.title{ position:relative;} #header{ background:url(../images/header.gif) no-repeat; width: 100%; height: 496px;} #nav{ width:450px; height:60px; background-color:#000000; top: -220px; left:250px;} /*************************************************/ /******************* CONENT ***********************/ #content{ width: 1100px; top: -200px; margin-left: 50px;} #content ul{ display:inline;} #content ul li{ display:inline; list-style-type:none;} #content ul li a{ text-decoration:none; color: #1a4d9e;} #productBg1{ top: -110px; left:40px; z-index: -1;} #productBg2{ top: -410px; left:90px; z-index: -2;} .Hproducts{ top: -100px;} .premiere{ margin-left: 15px;} .endProduct{ margin-left: -180px;} .primary{ margin-left: -140px;} .title{ right: 200px; top:10px;} |