There are tons of examples how to break out of frames with Javascript and I thought you couldn't do it without Javascript.
But YAHOO! does it! If you place www.yahoo.com inside an iframe and click on an item in the Navigation (say Autos) it breaks out of the frame even if Javascript is disabled in the browser. Works for both IE and Firefox.
The page redirects with a Location header a couple of times, but I tested that and it's not what is causing it to break out. To test simply create an html file on your desktop with the following contents: Code:
i have a frame on my website that displays some information. I want to have a button/link that when users click, it will make that frame 100% width and height.
How can i do this?
I think this is done with javascript.
Also another question i have is:
I am including a webpage in the frame, how can i make it so it cuts off say the top 300 pixels of the target webpage?
I am pretty new to Javascript and have only created a few pretty basic scripts, mainly dealing with site navigation and mouseovers. I would like now to redo my private home page using a rather complex configuration of frames. It is my intention to use JavaScript (variables) to control the rather intricate page navigation.
My question is this. I know how to define a variable, increment or otherwise alter it's value and how to change a process path based on the value of a variable. I have done all of this within the SAME page. What I would like to know more about is the referencing and modification of variables in "pages" in other windows within a frameset.
I try to print out five hidden frames throug a printing-form. I use the frame.focus() and the frame.print() functions. Everything is fine except the following little disadvantage:
When I print out the five frames, the print window dialog appears five time (for each frame once). The user has to confirm his standard printer several times.
I have a DHTML Folder Tree, also known as a TreeView. That is, an expandable/collapsible tree of links. In a frame-less layout everything works great. In a frame-based layout, it doesn't work on Safari/Konqueror.
There are two frames: the left frame contains the tree control; when you click on a link in the tree, the right frame is the target for the links in the tree.
The tree mechanism itself works fine. But there is a problem with the links. What happens on Safari/Konqueror with the frame-based layout is the first link works fine, but all links after that do not. That is, the first click loads a picture on the right frame, but when I click on any other links after that, the target frame is not updated.
I have a page with two frames, 'header' and 'main'. The following code works in Netscape, but in Internet Explorer. The second bgColor line produces an error:
function test(){ top.frames.header.document.bgColor='white' //works fine top.frames.main.document.bgColor='white' //fails }
I am designing a website for disabled football supporters and because of this, I obviously must consider accessibility to blind users whilst I am producing it - as they are one of the disability groups that I am targeting the page at.
The page basically consists of two frames; one being a vertical list of links positioned on the left hand side of the screen and the other being the main content pane, positioned in the remaining area of the screen on the right of the first frame. The first frame is used to drive the content of the second frame.
Now, I'm not sure if this is possible in JavaScript, or indeed in another scripting language, but what I want to do is to be able to alter the current focus or caret? on a web page when a link is clicked. That is, when the user selects a link from the left hand frame, then the new content is loaded into the right and the current focus jumps straight to this new information, as opposed to having to tab through all the same links again in order to put the focus there.
I know this is only a fiddly little thing but it is something that would really improve the usability of the site, especially with screen readers in mind.
I'm using <DIV> tags to display some content with absolute positioning. The content sometimes goes more than 1 page. So i would like to have page break after 1 set of content is printed on a page. Its like this
<DIV id=A style="position:absolute; top:0px; left:0px; width:100px; height:100px"> Item One </DIV --do the page break <DIV id=A style="position:absolute; top:0px; left:0px; width:100px; height:100px"> Item Two </DIV
This should ensure that always the content is printed on the same position but in new page. The problem is how to do the page-break.
On a page I'm offering file download links which are each targeted to an tiny 1-pixel X 1-pixel iframe on the same page. (If you care why, see below.) Under certain conditions, I want to popup a window which is NOT constrained within the iframe to which its creator page is targeted. But since the download page is being targeted to the tiny iframe on the application page, any popups or alerts I've tried creating from the download page's code do not appear, presumably because they're being created inside the "invisible" iframe.
Is there any method for asserting on a page that a window or alert should NOT appear in the iframe to which the page was supposed to send its output? I'm developing in ASP.NET, so can modify page HTML and Javascript just before the page is sent to the browser.
The reason I'm targeting links to the tiny iframe is that when users select a file for download, the standard Windows open / save / cancel dialog pops up over the page they clicked rather than first opening a new "file download" page. When download is complete and the dialog disappears the original page remains ready for another user selection. The giant download site tucows.com uses this technique. However if there's another way to get this functionality I'm all ears!
1. User selects file for download on application page.
2. If no errors, standard Windows dialog pops up over application & download proceeds without changing application page. When download completes, dialog disappears and application page remains unchanged ready for further use.
3. If error, window or alert pops up over application. When closed, application page remains unchanged ready for further use.
Is it possible, when you have a loop in a loop, that when the inner loop reaches a certain point, it breaks out of both loops? For example:
[Code]....
The code above will break out of the (b=0;b<=10;b++) loop when b==5, but it will continue to do the a loop. not putting the first loop at all or making the first loop stop at 1): Is there a way to break out of both loops when the if condition is met? (I only ask that you not give a work-around because what I have in mind is much more complicated than this)
IE7/8 break effect when using a .png for the shadow under each colored block. The rest, including IE6 are fine with them. Note, IE6 has it's own problems, that I already fixed in my real page. Here is the test page >> Hover over the blocks in FX and now in IE7/8 >> Anyone see why IE is doing that to the shadow (i.e. blowing it up to ten times it's original size)?
If you take the comments out of the JS in the head section and use the full url .jpg one instead, then you will see that IE works just fine. It's only when using a .png that IE goes wrong. I guess if I have to I can try and make a jpg do in it's place, but it wont look as good, and I prefer not to.
I have the following code. When the user clicks on one of the links (Bookies Quick Search, Bingo Quick Search or Casino Quick Search), the submenus will appear underneath. This code works fine, however the only problem im having with this is that i cannot seem to get rid of the break inbetween each one. Code:
i have a nested loop in Javascript and i have a break statement in inner loop. As break statement takes control come out of inner loop. I want to come out of both loops if break statement reaches in inner loop. is there any way to do that ??
For the first time, I'm attempting to write a small Javascript program using one on the online reference sites. I need some confirmation as to the behaviour of the break statement.
In the following code:
for ( row = 0 ; row <= 7 ; row++ ) A <---- { for ( col = 0 ; col <=7 ; col++ ) B <---- { if ( check ( row, col ) == "pass" ) break ; } } }
Where will control pass to once the break statement is executed? Will it continue with the first 'for' statement (A) or the second (B)?
Also my 'check' function needs to pass an indication as to it's success or failure. It does it by:
return ( "pass" ) ;
Am I doing it correctly?
Any links to useful reference sites would be welcomed.
My code runs great in every browser but IE6 IE7 and IE8. it breaks and causes all scripts to fail. i setup Visual Web Developer in my VM like a blog post told me, and when i load the page i get Microsoft JScript runtime error: Object doesn't support this property or method that seem to break on this line
i am unable to break the line in javascript. Actually i am using a javascript to open Microsoft Outlook Express, And in the body text i am sending some value like "Name and Address(Shown in code)". I want after task it should break the line and the value of Address will start from new line. But i am unable to do that. The code i have used is given below.
// JScript File function EmailIt(emailTO,strAddress,strName) {
I'm using simple form validation, found online, to check certain fields before submitting. The problem is that, although the script detects the error/missing field/wrong syntax and pops up the corresponding alert, after the user presses OK in the alert box the script continues and sends the form - which of course is not valid.
I am using tinybox2 to make a modal window, which now I have loading correctly. the modal window loads as an iframe, but I have two image links inside the modal window. One I'd like to open in a new window (i got that one!), the other image I'd like to be treated the same as the X button and have it close the modal window.
this is the body onload in the main document <body onload="TINY.box.show({iframe:'modal.html',boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluema sk',maskopacity:70,closejs:function(){closeJS()}})"> <script language="JavaScript1.2">mmLoadMenus();</script>
I have a lot of javascript for my google map api and I have all the information stored away in an xml file which the javascrupt reads. I have many map markers but I cannot get a line break between th esets of markers, only each and every marker. I tried this in the xml and in the javascript but I am stuck
I had to do a break function and scripts in this portion. I am wondering if my format is correct here is what i made
Code: function createBar(partyType,percent){ // script element to create blank cells switch(partyType) { case "D": document.write("<td class='dem'></td>"); break; case "E": document.write("<td class='rep'></td>"); [Code]...
var currentTxtBx = 0; function addTxtBx(){ if (currentTxtBx<10){
[code]....
This just creates up to 10 text boxes when the user presses the button. However, the text boxes are placed side by side until they have to go on to a new line.How would I go about creating and inserting a line break so that after each text box a line break would occur so that they're all place one below another?