HTML - Back Button Function Acting Wierd
I have an html document (not a webpage) which I'm converting
into a .pdf. I've created it before without any issue but now I'm noticing that when I click on the back button (after clicking on an internal link) that it does one of two things... It either a) returns me to the top of the document or b) takes me to some arbitrary spot in the document. Neither one being where I or my clients need to get back to. Anybody experience this or have a fix? Thanks, Hunter Similar TutorialsHi, Is it possible in HTML to have a link that takes you back to the previous page you visited. But here's the catch....i want the back link on my pages to behave exactly as the BACK button in Internet Explorer (hope that makes sense). I have a link on my pages which is this: <font size="2"><a href="javascript: window.history.go(-1)">BACK</a></font> but this works in such a way that if you go to Page1, then Page2, then Page 3, then you click on BACK in page3...that takes you to Page2...if you then click on the BACK link on Page2, it takes you back to Page 3...when in fact I want it to go to Page 1.... Please urgently help. Thanks So I found this neat tutorial (here) It was easy breezy to use it, so I did. Weird thing at Firefox is.. as soon as I replace the href="#" with a real link... The background images disappear. And only keep working when HOVERED... Even weirder (for me) is that that issue doesnt exist in the other browsers?? Could anyone take a little look? Thanks. (example here, hover over the lonely looking text please) HTML Code: <a href="http://www.xx.nl/airless-spuitwerk" class="button" > <div class="left"></div> <div class="mid"><div>30% KORTING OP AL ONS AIRLESS SPUITWERK » MEER INFORMATIE</div></div> <div class="right"></div> </a><!-- /button --> Code: a.button{float:left;height:31px;text-decoration:none;*cursor:pointer;} a.button:link .left{float:left;height:48px;width:17px;background:transparent url(images/button-edge-red.png) top left;} a.button:hover .left{float:left;height:48px;width:17px;background:transparent url(images/button-edge-red.png) bottom left;} a.button:link .right{float:left;height:48px;width:17px;background:transparent url(images/button-edge-red.png) top right;} a.button:hover .right{float:left;height:48px;width:17px;background:transparent url(images/button-edge-red.png) bottom right;} a.button:link .mid{ float:left; height:48px; color:#fff; font-size:14px; font-weight:bold; text-align:center; background:transparent url(images/button-edge-mid-red.png) repeat-x top left; text-shadow:0 0 1px #000; } a.button:hover .mid{ float:left; height:48px; color:#fff; font-size:14px; font-weight:bold; text-align:center; background:transparent url(images/button-edge-mid-red.png) repeat-x bottom left; } a.button:link .mid div{ position:relative; top:18px;} Hello, I dont know if someone had the same problems, but it seem to me that it is quite common. For a service I would offer my visitors to log in or register... Then after registering or logging in I would like to direct them back to the page where they had been diverted from. And the number of steps and the page are not always the same. Is there a way to "remember" the page name when click on register or login and at the end of the reg/log process go back there? Thanks Attila Hi guys I would like to use "back" button like this: Code: <form> <input type=button value="Back" onCLick="history.back()"> </form> Can I replace this button with my own designed button? How can I do that? I am looking for a back button but there is a catch. I want to send an email newsletter, the newsletter will link to articles on a website. I want a back button that will return the user to the Outlook email they clicked from. Any suggestions? Thanks Brian I'm currently building a website for my jewelry and I have run into a simple, but aggravating problem. Should I include a back button? A back button would be the same a clicking on home, but are my visitors going to to know that? This is what it would look like with out a back button: http://i91.photobucket.com/albums/k3...backbutton.gif This is what it would look like with the back button: http://i91.photobucket.com/albums/k3...backbutton.gif Good morning world...I've got a problem. I work for a college updating web sites, and I don't have access to anything in the CSS that they setup before me (my administrators won't let me touch it), and I know very little of jQuery and javascript. To the point though, I want to add a "back to top" button that hovers around the bottom corner of the browser. Can I do it without being able to access the CSS that the college uses as its base? (I guess using HTML and HTML only)? Hi I want to be able to turn the image that reads 'back' on the page below into a "back button" that automatically makes the browser go back a page, just like the back button within the browser. How do i do this? http://www.richardjohntaylor.com/bil...hotoerror.html Hi there, I'm coding a html website with two frames (one top, one bottom). From the homepage, when the user clicks a link, both the top and the frame the link's in change. when my user is on that new page and click the back button in the toolbar, only the top frame (title) changes, but not the bottom one. So, for the 2nd page, I need a way to make the toolbar's back button move the viewer two steps instead of one. Is that possible? thank you, RandomNameHTML Hi, I am creating a site in HTML using Dreamweaver. I use rollover buttons to navigate the site which are normally grey but white when rolled over. I have found that when I press the BACK button the button I had previously clicked is white and not grey. Try it out for yourself: http://www.RandAM.org/RichardAsh/ Once the problematic button is rolled over it works normally. Is there a way to stop this from happening? thanks, R I am building this intranet for our employees at work. I am not a programmer, nor anykind of web professional, and I'm building this as an amateur. I have very basic knowledge of HTML and a bit of CSS, and that's pretty much it. Once the thing is ready to be released, it will have to be updated on a regular basis, and by people whose background and function have nothing to do with scripting (in fact, I cannot take care of it myself all the time since I'm leaving for Europe soon). Therefore, I resigned to using MS Word 2007 as the html editor, since it's the only software anyone can usen here to update the files without having to learn how to code (I haven't found any freeware that didn't require prior html knowledge and the company will not pay for a software liscence of any kind). I know MS word is basically the worst thing one can use to build a website, but I couldn't find any better for this scenario. Now I'm encountering a bit of a problem with the website, specifically with frames. The website (which is a frameset) is divided in two sections: a menu on the left (frame_menu), which is static should remain there all the time, and a frame to the right (frame_main) displaying the pages contents. Now, when a user clicks on a link in frame_menu, the content (page A) displays in frame_main, which is what I want. Then if someone clicks on a link in the page A in frame_main that links to another page (page B), it will open gain in frame_main, replacing the page A that was there. So far, this is the behavior I want, and the frame properties were set for this. The problem comes when the back button is used. If you are on page B, and then click the back button, you will come back to page A, in frame_main (so far still good), but any subsequent link the user will click after using the back button, whether it's a link in frame_menu or frame_main, will open in a new window, even though the default for opening links of the frame is set to frame_main as the target! This renders the frameset completely useless, and the whole frameset has to be closed and reloaded to function properly again. I know frames are deprecated. The only alternative I have found was to use CSS to simulate frames. However, from what I have read (and tell me if I am mistaken), it only simulates the fact that you have a "fixed" menu on every page, but the menu is NOT a separate html file, and has to be part of every page on the website. This makes the updating of the menu very tedious, as it has to be changed on every page of the website, were an item to be added to it. This is why I used frames to begin with: no need to update every page to add something to your menu, just update the menu.html file and voila. So I would like to know if you have any workaround for this problem. Any suggestion is appreciated. This was all tested with IE8. It's the only browser provided to the employees, I cannot use another one. This is part of the code (generated by MS Word of course) that contains the frametset <frameset framespacing=0 frameborder=0 border=0 cols="215,1*"> <frame name="frame_menu" src="file:///\\sv050\GROUPS\AGT\AGT-CDS\AGT-CDS-CR\helper\html\menu.htm" scrolling=no> <frame name="frame_main" src="file:///\\sv050\GROUPS\AGT\AGT-CDS\AGT-CDS-CR\helper\html\home.htm"> <noframes> <body lang=EN-US style='tab-interval:36.0pt'> <div class=WordSection1> <p class=MsoNormal style='margin-bottom:10.0pt;line-height:115%'><span style='font-size:11.0pt;line-height:115%'>This page uses frames, but your browser doesn't support them.<o:p></o:p></span></p> </div> </body> </noframes> </frameset> If the entire script of the frameset.html is needed, tell me and I'll post it. Thanks in advance, Guill Hi everybody. Can someone come up with code that will give me the same back function that Internet Explorer has at the top of their page ? Thanks Launchnet I have a solution with ajax where I send POST-information via <a href> like this: Code: <form name="myForm" action="GoHere.php" method="POST"> <input type="hidden" name="myVariable" value="thevalueiwanttosubmit"> <a href="GoHere.php" onclick="myForm.submit(); return false;">Click here</a> </form> There's also a paginate system with page numbers at the bottom. When I press an item I go to another page with more details. When I press the Back-button in Mozilla everything works fine, but in Explorer I start from page number 1 instead of the page I originally came from. How do I get Explorer to remember the page number? Do I have to change the javascript somehow? Hi, I've got three buttons on a page and basically all I'm trying to do is put a BACK button as one of the three. But I'm having difficulties getting it to work. Code: <form name="reservationinfo" action="reservationcollected.php" method="post"> <input type="hidden" name="reservationID" value="<? echo $reservationID; ?>"> <center> <table width="400" border="0" cellspacing="5"> <tr> <td><input type="submit" value= "Reservation Collected" class="button" name="submit"></td> <td><input type="submit" value='Cancel Reservation' onclick="reservationinfo.action='admincancelreservation.php'; return true;"></td> <td><input type="submit" value='Back' onclick="reservationinfo.action='history.go(-1)'; return true;"></td> </tr> </table> </center> </form> The solutions Ive been trying either take me to reservationcollected.php OR says history.go(-1) CANNOT BE DISPLAYED. Any ideas? Cheers On the following page there is a link that says, "Jump To Church." It works fine in IE7 but in FF the only way to get it to behave like a link, as opposed to just text, is to mouse over the far right part of the link itself. What is causing that? http://www.h51school.com/1/home_page.asp Thanks~ Hello I thought my site was good to go until I viewed it on a pc. I took a look at it in IE on a pc and noticed outlines around the graphic nav. Do I need to add a bit of code somewhere? I'm attching a screenshot and below is my url to the site. thanks! http://www.bru.us.com html: <!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>BRU</title> <link rel="stylesheet" type="text/css" href="bru.css" /> <script type="text/javascript"> var revert = new Array(); var inames = new Array('about','contact'); // Preload if (document.images) { var flipped = new Array(); for(i=0; i< inames.length; i++) { flipped[i] = new Image(); flipped[i].src = "nav/"+inames[i]+"2.gif"; } } function over(num) { if(document.images) { revert[num] = document.images[inames[num]].src; document.images[inames[num]].src = flipped[num].src; } } function out(num) { if(document.images) document.images[inames[num]].src = revert[num]; } </script> </head> <body> <div id="header"> <img src="images/global/logo_gold.gif" /> </div> <div id="navigation"> <IMG SRC="nav/design.gif"/><br> <a href="tg_moodboard.html"class="catlink">TowerGroup</a><br> <a href="cbuy_moodboards.html"class="catlink">Click&Buy</a><br> <a href="mca_home.html"class="catlink">MCA</a><br> <a href="incretin_home.html"class="catlink">Incretin Forum</a><br> <a href="fifa.html"class="catlink">FIFA World Cup</a><br> <a href="psr.html"class="catlink">PSR</a><br> <a href="baraclude_banner.html"class="catlink">Baraclude</a><br> <a href="forest.html"class="catlink">Forest</a><br><br> <IMG SRC="nav/other.gif"/><br> <a href="divided.html"class="catlink">Divided</a><br> <a href="india_photos.html"class="catlink">Photography</a><br><br> <a href="about.html"> <img src="nav/about1.gif" name="about" onMouseOver="over(0)" onMouseOut="out(0)"> </a><br> <a href="contact.html"> <img src="nav/contact1.gif" name="contact" onMouseOver="over(1)" onMouseOut="out(1)"></a><br> </div> <div id="subnav"> <ul> <li><a href="tg_moodboard.html">Mood Boards</a></li> <li><a href="tg_direction_a.html">Home A</a></li> <li><a href="tg_direction_b.html">Home B</a></li> <li><a href="tg_sublevel.html">Sublevel</a></li> </ul> </div> <div id="portfolio"> <IMG SRC="images/towergroupmarketing/tw_moodboard.jpg"/>     </div> <div id="description"> <h1>TowerGroup / Moodboard</h1> <p> When TowerGroup came to us and talked about what they felt differentiated them from other financial institutions, one thing that stood out to me, was that they wanted to communicate that they're analysts are hands-on and accessible. To express this concept in a website, I thought mixing hand-drawn illustrations with photographs would help give the site a more personable feel. </p> </div> <!--Content--> <div style="position:absolute; top:474px; left:499px;"></div> </body> </html> css: body { font-family: sans-serif; background-color: #ffffff; font-size: 11px; margin: 0px; } #description { background: #ffffff; font-family: sans-serif; padding: 10px; line-height: 14px; margin: 0px 10px 10px 20px; } #portfolio { background: #ffffff; padding: 3px; margin: 0px 10px 10px 10px; } #header { position: absolute; top: 0px; background-color: #ffffff; margin: 20px; height: 80px; padding: 10px; } #subnav { background: #ffffff; padding: 0px; margin: 0px 0px 0px 0px; line-height: 10px; } #navigation { background: #ffffff; padding: 10px; margin: 0px 10px 10px 20px; } h1 { font-size: 16px; font-family: sans-serif; line-height: 24px; color: #000000; margin: -1px 0px 0px 0px; padding:0; } p { margin: 0px; padding: 0px; } a:link { font-family: sans-serif; font-size: 11px; color: #5b5b5b; text-decoration: none; line-height: 11px; font-family: arial, serif; } a:visited { font-family: sans-serif; color: #5b5b5b; font-size: 11px; text-decoration: none; line-height: 11px; font-family: arial, serif; } a:hover{ font-family: sans-serif; color:#C1A62E; font-size: 11px; text-decoration: none; background-color: line-height: 11px; font-family: arial, serif; } a.catlink:link { font-family: sans-serif; color: #5b5b5b; font-size: 11px; line-height: 14px; margin:0; padding:0; font-family: arial, serif; } a.catlink:visited { font-family: sans-serif; color: #5b5b5b; font-size: 11px; line-height: 14px; margin:0; padding:0; } a.catlink:hover { background-color:#C1A62E; font-family: sans-serif; color: #C1A62E; font-size: 11px; line-height: 14px; margin:0; padding:0; } .navheader1 { color: #C1A62E; font-size: 12px; line-height: 19px; margin:0; padding:0; } .navheader2 { color: #5b5b5b; font-size: 11px; line-height:17px; font-family: Georgia, "Times New Roman", Times, serif; margin: 20px 20px 30px 0px; padding:0; } a1:link { color: #5b5b5b; font-size: 11px; line-height:17px; font-family: Georgia, "Times New Roman", Times, serif; margin: 20px 20px 30px 0px; padding:0; } ul { margin: 0 0px 0 0; padding: 17px 10px 10px 2px; } li { display: inline; margin: 0 8px 0 0; padding: 0 0 0 10px; background: url(images/global/icon_asterisk.gif) no-repeat center left; } #description { position: absolute; top: 125px; left: 140px; width: 270px; } #navigation { position: absolute; top: 125px; width: 110px; } #subnav { height: 30px; position: absolute; top: 125px; margin-left: 475px; width: 3200px; } #portfolio { position: absolute; top: 160px; margin-left: 475px; width: 3400px; } Hello please see http://www.view-agency.com/view/Repr...x?Id=243&Cat=2 in all the RepresentedEng.aspx The .main_wrap class floats to the right, although it's inside a class that has same width and margin auto ... anyone ? ? What's even wierder is that on http://www.view-agency.com/view/Cate...Eng.aspx?cat=2 for instance, there is no floating problem although it's supposed to work on same css.... Comment - Don't bother explaning to me that it's not valid and code isn't 100% right because I didn't make it, and it ain't possible to make the site all over. I'm sure there's a way to fix this tiny problem.. Thanks !!!!! I need a button that when i click it, it will change the text of a textbox, like when i click the button it will change the text in the textbox to "hi" (i need several button's, and each button will change the text to somethign different) It would be better if the script was in html because the site i use doesnt support many javascript or css tags, but it will support any html tags. Please help! Hey I have been using some AJAX code and my <p></p> is acting like <br /> see http://www.walterdecantelupe.co.uk/new/index2.html I can't see why. please help! The html is 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>Walter de Cantelupe Inn, Kempsey ~ Worcestershire</title> </head> <body> <p><strong>The Walter de Cantelupe</strong> is situated in the village of Kempsey, just 4 miles from <a href="http://www.visitworcester.com/" title="Visit Worcester">Worcester</a> City centre on the A38, The Walter de Cantelupe is the perfect place for lunches, evening meals or a room for the night. Large open log fire, plush comfy furnishings, paved walled Garden - an Inn for all seasons.<br /> This privately owned & run free house is understated in appearance yet embraces a soul brought to life by the Landlord & the staff. The house, partly dating back to the 17th Century, retains original features such as exposed beams & roaring log fire in the winter months. One of the guest bedrooms is in the oldest part of the Inn and is said to be haunted.</p> <p>The food on offer combines both traditioanl pub dining as well as imaginative and exciting comtemporary creations all prepared in the pub's own kitchen, using as much regional, seasonal and traditional produce as possible.</p> <p>Great emphasis is also placed on top-rated British cask conditioned ales. There are normally four hand-pulled beers available featuring at least one guest ale. The wine list is small but carefully chosen reflecting the knowledge and interest of the landlord. There is even wine from the local award winning vinyards.</p> <p>"The Landlord Martin is the finest of hosts, whose attention to beer keeping, providing superb food and ensuring a great atmosphere are second to none. All this and great value, what more can you ask for in a wonderful period, intimate pub." </p> <h3>A small, old village inn keeping the genuine character of an English Public House - good food & a friendly welcome...</h3> <p><a href="http://walterdecantelupe.co.uk/Joomla_Folder/component/option,com_forme/Itemid,35/">Book a Table</a> ~ <a href="http://walterdecantelupe.co.uk/Joomla_Folder/component/option,com_forme/fid,4/Itemid,56/">Room Booking</a> </p> <h3 style="word-spacing: 5px">Paella Party</h3> <p>The assembled crowd could be forgiven for thinking that they were in some Spanish village square during the last paella party at the Inn. Well-wishers believed they remembered hearing the strains of flamenco music. If not actual reality, that was probably the only authentic element missing from the sun-blissed day. And was it hot ? Hardly a cloud in the sky. For some wide-brimmed hats and even a knotted hankerchief were seen gracing thinly thatched heads. Perfect... <strong>Click <a href="http://walterdecantelupe.co.uk/Joomla_Folder/content/view/30/69/" title="Paella Party">here</a> to read on...</strong> </p> <p>Tel. 01905 820572 <a href="mailto:martin@walterdecantelupe.co.uk">martin@walterdecantelupe.co.uk</a> Main Road, Kempsey, Worcester WR5 3NA</p> </body> </html> The CSS is Code: * { margin: 0; padding: 0; } body { background: #506d42 url(images/bg.gif) repeat-x; font-family: "Times New Roman", Times, serif; font-size: 1em; line-height: 17px; color: #333; } a { text-decoration: none; color: #157D6A; } a:hover { text-decoration: underline; color: #37AB96; } #wrap { margin: 0 auto; width: 935px; } #header { height: 130px; background: #fff url(images/walter_header.gif) no-repeat left; } #header h1 { font-size: 28px; letter-spacing: 0px; padding: 23px 0 0 20px; color: #506d42; } #header h1 a { color: #37AB96; text-decoration: none; font-weight: 100; letter-spacing: -2px; } #header h1 a:hover { color: #fff; } #header h2 { font-size: 19px; color: #fff; padding: 5px 0 0 20px; letter-spacing: -1px; font-weight: 100; } #header p { font-size: 12px; letter-spacing: 0px; padding: 23px 0 0 20px; color: #506d42; } .slidedivtop { border-top:2px solid #ffe385; color:#933; font-style:italic; font-weight:bolder; font-size:2.1em; text-align:left; letter-spacing:-1px; font-family:"Times New Roman", Times, serif; padding-bottom:0; padding-top:5px; margin-bottom:0; text-transform:lowercase; line-height:normal; } .slidediv { background:#e9cf77 url(img/bottom.gif) no-repeat left bottom; border-top:0 solid #ffe385; color:#444; margin-bottom:0; padding:20px 20px 0; } #menu { height: 70px; line-height: 70px; background: #fff url(images/menu.gif) no-repeat left; padding-left: 10px; padding-right: 10px; } #menudrop h1.drop { font-size: 28px; letter-spacing: 0px; padding-top:3px; text-align:center; color: #506d42; } #menudrop { height: 46px; line-height: 70px; background: #506d42 url(images/topdrop.gif) no-repeat left; padding-left: 10px; padding-right: 10px; } .menupadding { padding-left: 9px; display: block; z-index:auto; } #menu ul { list-style-type: none; padding-left: 40px; } #menu ul li { display: block; float: left; } #menu ul li a { padding: 0 20px 0 0; text-decoration: none; font-weight: 100; font-size: 14px; } #menu ul li a:hover { color: #37AB96; text-decoration: none; } #content { background: #506d42 url(images/content.gif) repeat-y; padding: 0 20px 20px 20px; } #content p{ line-height:normal; } #contentdrop { background: #506d42 url(images/contentdrop.gif) repeat-y; padding: 0 20px 20px 20px; } .right { float: left; width: 630px; text-align: justify; padding-left:15px; padding-right:15px; padding-top:10px; } .right h2 { font-size: 18px; font-weight: 100; padding: 15px 0 7px 0; } .right h2 a { text-decoration: none; } .right h2 a:hover { color: #37AB96; } .left { float: right; width: 230px; padding-top: 10px; } .left h2 { margin: 10px 0 0 0; padding-left: 10px; height: 24px; line-height: 24px; background: #111; color: #fff; font-size: 13px; } .left ul { padding: 10px 0 15px 10px; list-style-type: none; } .left ul li a { color: #157D6A; text-decoration: none; font-weight: 100; } .left ul li a:hover { color: #37AB96; } .paddingtop { margin-top:10px; position:relative; } .paddingtopbot { margin-top:10px; margin-bottom:15px; position:relative; } .whatson { padding: 20px 20px 20px 20px; position:relative; } #bottom { background: #fff url(images/bottom.gif) no-repeat; padding: 17px 0; } #bottomdrop { background: #506d42 url(images/bottomdrop.gif) no-repeat; padding: 23px 0; margin-bottom:8px; } #paneltop { height: 25px; background: url(images/paneltop.gif) no-repeat left; padding-left:10px; padding-top:11px; margin-right:15px; } #panelcontent { background: url(images/panelcontent.gif) repeat-y; text-align:justify; padding-left:11px; padding-right:12px; padding-bottom:5px; margin-right:15px; } #panelbottom { background: url(images/panelbottom.gif) no-repeat; height: 5px; margin-right:15px; } #footer { text-align: center; font-size: 11px; } |