HTML - Button With Frames
Hi all,
I have a page which contains two frames, on the left frame i have hyperlinks which when clicked show pages corrseponding to those links in right frame.(basically its a navigational frame). But i have the following problem. of all the links i want to change one link to a button. that is when i click the button a apge corresponding to that must be displayed in right frame. But its not displaying in the right frame rather its dispalying in the left frame itself. <button type="submit" ONCLICK="window.location.href='mypage.html'" target="showframe">ClickMe</button> Similar TutorialsHi! I have created a simple site that I uploaded on freespacia.com and then used co.cc to give it a shorter name. I have a form on my site, on the first page. When I load the site directly from freespacia the submit button works, but when I access the site on .co.cc, the submit button does not work. What could be the problem? 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 Could someone help me with this? When I click on "Log in" after entering Password (12345) it change only "Main Page 1" to "Main Page 2" , I want to change "Column 1" to "Column 2" at the same time too. What should I do? The following are just sample to take a look. Thanks so much. frames.htm HTML Code: <html> <head> <title>Frames</title> </head> <frameset rows="21%,*"> <frame src="top.htm" name="top.htm"> <frameset cols="10%,*"> <frame src="menu1.htm" name="menuarea"> <frame src="logininter.htm" name="pages"> </frameset> </frameset> </html> top.htm HTML Code: <html> <head> <title>Top Frame</title> </head> <body> <h1 align="center">Top Frame</h1> </body> </html> menu1.htm HTML Code: <html> <head> <title>Menu</title> <body> <h1>Column 1</h1> <table> <tr> <td> <a href="menu2.htm" onClick='parent.pages.location.href="logininter.htm"' target="menuarea">Log in</a></td> </tr> <tr> <td><a href="" >Guest</a></td> </tr> </table> </body> </head> </html> menu2.htm HTML Code: <html> <head> <title>Menu</title> <body> <h1>Column 2</h1> <table> <tr> <td><a href="">Message</a></td> </tr> <tr> <td><a href="" >Timetable</a></td> </tr> <tr> <td><a href="" >Appointment</a></td> </tr> <tr> <td><a href="" >Log out</a></td> </tr> </table> </body> </head> </html> logininter.htm HTML Code: <html> <head> <title>Main Page</title> <script type="text/javascript"> function validatePwd(theform){ if(theform.username.value==""){ alert("Please enter user ID") theform.username.focus() return false } else if(theform.passwd.value==""){ alert("Please enter a password") theform.passwd.focus() return false } else if(theform.passwd.value !=12345){ alert("Password incorrect") theform.passwd.focus() theform.passwd.select() return false } return true } </script> </head> <body> <h1>Main Page 1</h1> <form onsubmit="return validatePwd(this);" id="loginform" action="homepage.htm"> <fieldset> <legend>Log in</legend> <p>Please enter your User ID and Password to access</p> <label for="username">User ID:<input type="text" name="username" id="username" tabindex="1"></label> <label for="passwd">Password:<input type="password" name="passwd" id="passwd" tabindex="2"></label> <label for="submit"> <input type="submit" class="submit" value="Log in"/></label> <label for="reset"> <input type="reset" class="reset" value="Reset" /></label> </fieldset> </form> </body> </html> hompage.htm HTML Code: <html> <head> <title>Home Page</title> </head> <body> <h1>Main Page 2</h1> <div> <p>* Option 1</p> <p>* To Option 2</p> <p>* To Option 3</p> </div> </body> </html> I've heard many times "don't use frames, there is better ways to accomplish it", and I was wondering, is this just referring to "invisible" frames, or any frames? For example, look at Kingdom of Loathing. They use frames (or what appears to be frames) and I can't see how they could successfully make that site without. If I had to have all the screens scroll as one rather than separate, and couldn't resize when I needed to, it would be extremely annoying. So, frames are bad, or just the invisible ones? I am creating a website that has a search button with an image. I would like to know if there is some simple code that I can include that would display the same basic image with a different color when the user mouses over the button. Here is the code: <FORM name="searchform" onSubmit="return validateSearch();" METHOD="POST" ACTION="search_results_lt.asp"> <INPUT TYPE="text" NAME="Search" VALUE="" SIZE="20" > <INPUT TYPE=IMAGE SRC="images/search_button.gif" Name="SearchButton" Value="Submit"> </FORM> **** Thanks for your help, Robin I have three frames: -Header -Menu -Content On -Menu, I'm using drop down menu. This is were my problem occurs. All the options don't show up. So I was just wondering it is possible to overlay the -Menu frame over the -Content frame? Any other method to try and get around this problem? Thanks. I have a page that has a few images with links to differnet sites and I want them to link to another page with a frame at the top that shows the same inages that are smaller and the page of the website below it. I know how to do frames but I dont want to create a different page per link. (In short I want to have a link to a website open in another page with frames) Here is a basic idea for the front page http://www.techmatefl.com/pcp/ Here is the second page with the icons and the blank area is where I want the different sites that you choose to show http://www.techmatefl.com/pcp/site.html So it will be like a google image search in a way. Let me know if there is a way to do this with HTML, JS, or anything else. When designing websites in the past I have always used tables to organize content, but I've noticed that many professional templates don't use tables, but instead use Div Ids. Are Div ID's better and if they are can anyone tell me how to use them. Hey everybody! I have a website on a three row frameset (top,body,bottom). I've created a separate frameset for each page on my site. But is becoming a bit annoying. I want to know if it's possible to click on a link, from my main page and have that open one frameset with the same Top and Bottom but, depending on the button I click, is the page that appears as the body. I hope that's clear, I'm a newbie. I'll really appreciate if there are any ideas on the matter. Thanks!!! Cheers! Hello guys, im new here =) So.. I was trying to make a frame with a scrolling bar, like this site >> www.roxdownload.net take a look =) What should i do? Thank you very much =D hey last time i made a website was a few years ago, now a days, do people use frames? how is a website like hostmonster.com (my host) made? does that website have a frame? or did they something like css(which i have no clue what it is) Thanks guys, so far this forums has been helpful. Hey, so forgive me for being a bit of a newbie. Anyway, I started writing this website using frames without realizing they were deprecated. On the left side of my page I have a frame which has a menu of buttons where I've got javascript/jquery allowing the buttons to be hidden and shown in a collapse/expand sort of way. Clicking on the buttons also enables the page on the right frame to change. I like that this allows me to load a new page on the right but not reload the page on the left. Is there a way for me to not use frames but keep this left/right independence? Alright so I am using macromedia dreamweaver building a website and I have set up my page so that there is a menu on the left side using a frame. Now when I make links using the text in the frame, it opens the new page in that frame which is not what I want. Ideally I would like it to open in another frame and keep the menu bar frame on the left side. So i guess that makes my question two part. How do I link a page from a frame into either a whole new page or in another frame keeping the original menu frame there? if this doesnt make sense i can try to re-word it or try and show you my problem. thanks look i know that frames are bad but i have a good cause to use them XD all im wondering is - "For every one of the frames that i use, in the source file of the frame will i need to put the standard tags e.g. doctype, html, head, body, meta, title or can i just start with the code and it will work????" never used frames before so this is why im asking??? personally i think i will need to put in the standard tags because frames work differently to the PHP include function which practically copy and pastes the code into the file where you put your include function if im not mistaken??? Anyways thanks in advance Marcus =] I'm wanting my website to not cover the entire screen. Like only be 85% of the width of screen so the a background would be visible around the edge of the actual content of the site. Can this be done with frames? I tried but couldn't get it to, but didn't know if there was some other way. I know it could be done with tables, I just thought it would be easier with frames...if possible. Thanks, Justin hi i was wondering with my site using frames if one of the pages is loaded in to a internet exploer is there any way i can make it redirect to the index page so it is back in the frame and the user has navagtion thanks hi, i need help with frames, what i want is first a search box where a user puts in a search term then this is made into a string and added to 8 urls all of which are displayed in frames, could you help me write this thanks I've been struggling with this for a while now. I am trying to use framests to make a navbar and the mainpage. The frame for the navbar appears on the page, but the navbar doesn't. And the navbar says page cannot be diplayed. I am still in the early stages of learning html so I may not understand everything the first time around. This is what I have done so far. Code: <html> <head> <title>My Frameset</title> </head> <frameset cols="150,*"> <frame src= "navbar.html"> <frame src= "mainpage.html"> </frameset> </html> I have a page saved as navbar.html saved in the same folder also. Any suggestins. Thanx Hi there I recieved a template from a friend for my website. I have finished most of the site i now i have a problem. I would like to offer advertising space on eaither side of the page but i cant seem to do it. Please can somebody help me out. Thank you. The website is http://www.sapokershop.co.za you will see what i mean when i say space on the sides. |