I would like to automatically resize a window to its content. I was thinking of using an outer table to detect the size of my content, then use window.resizeTo( ).
The problem is I'm not sure how I can determine the size of what I think is referred to as the 'chrome' - the window borders, toolbars, etc.
Is there a way to determine the height and width of the chrome so that I can supply the correct parameters to the resizeTo method?
Been trying on and off for days to find a happy cross-browser way to open up a new window and append some content to it. Obviously not a javascript pro here, and my Google-fu has failed me...
I'm currently paying for a web service on a hosted platform. Basically, I'm unable to edit any raw content, however I am able to do things like add JS/HTML to the header or footer of a page, which will in turn be displayed on every page of this platform. My dilemma is, I only want content being showed on a single page of the platform. Specifically, I want a window.alert being displayed on the "/signup" page, but all I have to work with is JS in a global footer.Is there some way I can use window.location to achieve this?
I have popup window and I want when I press on "Clear" table content clear. I used document.writeln to write into the popup window. See the pic: [URL].
I'm currently paying for a web service on a hosted platform. Basically, I'm unable to edit any raw content, however I am able to do things like add JS/HTML to the header or footer of a page, which will in turn be displayed on every page of this platform. My dilemma is, I only want content being showed on a single page of the platform. Specifically, I want a window.alert being displayed on the "/signup" page, but all I have to work with is JS in a global footer.
Is there some way I can use window.location to achieve this?
I thought this would be an easy window.open script but I'm having problems with IE7 (surprise surprise...). I'm working with some YouTube videos, and what I'm basically doing is grabbing their embed code from their YouTube page and using just the URL to make the video pop up in a new window. Here is my function I wrote to open the new window:
I've got a link that launches a little AJAX application in a window.
Like this:
function launchListener() { var newWindow = window.open("listener.php", "newWindow", "width=300,height=150"); }
Ideally, once this window is loaded, it will sit in the background and wait for stuff to happen. I would like to then change the title bar to denote changes. Simple enough, right?
Anyway, problem is: When the new window launches, its title is not exactly what I assign it in "listener.php" (for instance, "Listener"), but rather "http://155.55.55.55 - Listener" (or whatever). This means that while sitting the taskbar, generally all the user is going to see is a domain name and some dots, rather than what I want them to see.
I have 4 images on a page and when someone clicks on one of them I open a secondary window and write a few lines to it describing the image.
If they don't close that secondary window however, and click on another of these 4 images, my write commands print further down on that secondary window.
I was reading through an old javascript book that talks about the win1.document.clear(); method, but information on the Internet tells me that this is now obsolete, or was just working on Netscape.
So then I decided to close the secondary window before re-opening it. But if the user _did_ close the secondary window, I get an error saying that the window I'm trying to close is already closed (or doesn't exist to be exact)!
Is there a way to clear the document in a window that I opened and wrote to? Or is there a way to detect if win1 exists or not? If it exists, I would close it. If it didn't exist, I would just re-open a new one.
I am currently using a popup window to establish the dimensions of a window, specifically based on the the width/height of the content area.
I would prefer to simply resize it and avoid the need for a popup altogether, but this is made difficult due to inconsistancies as to how resizeTo() accounts for whatever toolbars are 'on' which varies from browser to browser and platform to platform.
The site is coded to W3C (X/HTML, CSS) and the DOM/DHTML content is gradually being rewritten in accordance with the W3C DOM.).
The W3C DOM property to get/set the window content area dimensions are:
I am writing a script that opens a popup, tries to access the document object in order to access the body object, and then find a DOM element in the child window.Seems simple enough, except that the window opens, and the document and body objects are NOT what they should be.The code for opening the child window (popup) is:
Code: childWin = open("http://localhost/childDocument.html", ...); childWinDocObj = childWin.document; Here are just some of the properties of childWin.document relevant to this discussion:[code].....
And THAT is just how it is supposed to look.Which means that, by putting on the brakes of the execution of the script, the open() function works as expected: it opens the window and is supposed to load the document content specified by the URL in the first parameter!But not really: when the brakes are NOT put on the action of open() , it opens the window, and then delivers document and body objects that are NOT the content of the URL.
Basically I created a nice Jquery function to resize a window to the content on an Iframe. Because the Iframe has PHP in it which pulls a list of stockists and Iframes dont Auto resize to fit its contents if it pulls extra info.
[Code]...
So this bit of code is embedded into my Iframe, all its suppose to do is get the documents (the Iframe's) current height then it selects the parent document ( the one containing the Iframe ) then it basically adds the height to the attributes.
THE PROBLEM: It works great, the first time you use it. BOOYAKASHAA. However when you click a another stockist on the list. A smaller list for example... it keeps the height of the document really big. So it initially makes the space bigger to accomadate the list. But does not go smaller afterwards?
I need to to open a survey page to users who has not anwseredthe survey yet.The survey is in the same domain / path than the main page.If users has allredy anwsered the survey, the page opens with title "Error" and there is error message in the body.I can open the new window from the main page, but I do not know if it is possible to read the title or document content of the new window.I can not edit the survey page to put code there.f I could determine with an if question, did the survey page open to the survey or the error page,then I could close the page or close the main page to bring the survey on top.Is this possible to do?
I have this code that displays all vertical buttons for sharing my content however I want to display horizontal buttons if the user is using a smaller window size. It will have a different div and some of the code wil be changed i.e. "data-count="horizontal".
It would be awesome to also do this via my external JS file so it is not inline.
But that is not essential.
Also using fluid width CSS is not an option due to my having a sidebar with ads that can't be changed in size.
I'm working on hiding all of a page's content immediately via Javascript. I want to avoid using CSS to display none just incase I run into users who don't have JS enabled.
I wanted to get advice from others and see what the difference is between using jQuery actions within $(window) or $(document).ready. From what I understand, $(window).bind("load, function(){ etc. will only use the script once all contents on the page are loaded, including images?
And $(document).ready(function(), etc just requires the DOM to be ready but will still execute code even if images, etc. aren't loaded.
jQuery - Scrolling browser Window. I have two demos of scrolling page content with jQuery.
This one - [url] is scrolling the contents inside a container and it works as I wanted on Mac/PC
Code:
I need the same effect as above but I need to scroll the whole browser window.
I have a demo here - [url]
Code:
Problem here is on the Mac the transition are jumpy and it seems to flash the first yellow div before sliding up or down. Testing on a PC it will slide down but won't slide up. How can I get the whole browser window to slide up and down with a smooth transition.
I have a site that is very jQuery and image heavy. The main sections of the site link to sections that are built with several Tabs, and as it loads, you briefly see all the content load and then it is hidden by the Tabs code.
The plan is to have a full window DIV that sits above all the content with a loading icon that plays until the entire page loads, and then it fades down.
After some hair pulling and research I have code in place that does exactly as I ask, however it does not seem to work in IE6+7. It works in all other browsers.
I am new to Jquery mobile framework.I have an asp.net web application and I want to convert it into Jquery mobile framework.I have a datalist on an aspx page.The size of the datalist decreases according to the window size to certain extent after which the size of the datalist becomes constant and doesn't decrease with the window size.