The JavaScript underneath makes _one_ tab bold while the others receive
the 'none' CSS property. This works in a frameless page, and has
always worked. However, my current project _requires_ me to use frames
:-( (leftFrame, topFrame and mainFrame) and when I tested this script in
frames, it gave me a "invalid property" error. What can I do? Code:
It's possible to style document.body not to start at 0,0 for example: body {width: 1000px; margin-left: auto; margin-right: auto;} This means that X/Y of the body is not 0,0 but how can I find out what the position is using javascript? document.body.offsetLeft; is 0 and offsetParent is null yet if I position something absolutely at 0,0 it goes to 0,0 of the window, not the body!
I am trying to get the body tag style values. Code: <body style='width: 100%; position: relative; min-height: 100%; top: 0px;'> I would like to get the text 'width: 100%; position: relative; min-height: 100%; top: 0px'
Through an onClick() event, I have an inline function to change the font size of the page (actually, I need to do this for the entire website). I have this defined in the header.cfm file as:
onclick="document.body.style.fontSize=཮%'"
This does not work at all for some reason. Whereas,
I would like to ask for your help (I am using only IE5.5).
I have a very big table that I would like to sort. During the sort I would like the cursor changed to 'wait' state and back to default state when the sort is over.
The first row of table displays the columns titles when each cell (TD) contain link to a sort function (sortTable)....
where you can change all of the page's background attributes..I was wondering if there was a similar one for font so that I can change the face, size, and color of all font on the page at once (when the page loads)I want this code in javascript because I want the font style and the background color in my page generated instead of fixed
Is there a way to get the style element text ("body { background-color...") in internet explorer?The following example works in FF but in IE it gives the following error:Unexpected call to method or property.
I'm trying to make my body content scroll at the same time as an iframe located within the body. This has to do with the age old problem of mouse focus on iframes. When my mouse reaches the iframe and it takes over focus, I would like the body to keep scrolling until the iframe is right at the top of the screen. After that I want to relinquish focus to the iframe. I don't mind if the iframe starts scrolling as soon as the mouse reaches it, so long as the main body keeps scrolling for a while.
My understanding had been that $.css("width") would return the original user selected style, eg "100%" or "10em", and $.width() returned the computed width, always in "px". Not so, following the code through for .css(), it calls something called getComputedStyle and the only difference between the two functions turns out to be a post-fix of "px" on the .css() result - not very useful. I need to know whether my user has called me with a proportional dimension, or a fixed one. How to tell with jQuery?
This is probably quite a simple problem but I can't figure out the answer. I'm working on a site that has news stories and events coming in. What I would like is to have the news stories to be styled with squares and events with discs for instance. I might be able to change the actual plug-in so the CSS affects this change, but I just wondered how I could change the list-style-type with jQuery.
if I have an html page that uses the <style> or a <link> to call a style sheet these properties aren't available to JavaScript is there a good way to access them? eg
<html> <head> <title>expandable text area</title> <style type="text/css">
I need to execute a JavaScript function "onload". The only problem is I don not have access to the <body> tag as it is a part of the standard page-header include (a separate file). How could I have certain pages execute my function() onLoad?
The function basically just sets the original values of fields so that I can determine if a field has been changed or not, which aleviates unnec. sql update on the backend..
How do you make a small change to the body of an html page from an event handler? If you have a string var, a function that displays it in the body, and a function that changes it, can you change the var on an event and then reparse the body of the page but not the head? And if not, then what?
Can someone tell me if there is a universal way to check the available screen with and screen height for IE, Netscape, and Opera? Is there a universal syntax?
</html> It didn't work. I also tried both of these: document.getElementsByTagName('body').setAttribute('bgcolor', '#000'); document.getElementByTagName('body').item(0).setAttribute('bgcolor', '#000');
now on the page demo.htm, the text will show on index.htm, or a picture (if I call it via img src), but if I have any javascript scripts it will show nothing--not even text. I know 'body' will give me the items/text in the body, but I assume body needs to be replaced with something else to get the srcipt to run. I just have no idea? Any options. I would like to keep the way the page is being calle dinto the frame, I just would like to add some functionality.
Is there a small javascript snippet or something that can dynamically set the body ID on page load? I am using the Inverted Sliding Doors tabs from 456 Berea Street Code: but am trying to do so in a frameset [insert angry comments here] (I know I know, please don't harp!)... anyway, the tabs css sets the active tab using the body ID, but I can't seem to get it to recognize the body ID inside the frameset. Is there a javascript or some other code I could use to dynamically set the body ID? Or perhaps a better approach?
A lot of beginner JavaScript tutorials warn that we need to wait for the page to load (or at least the DOM) before we can interact with it. But that's exactly what we do when we put the script at the end of the body tag, as opposed to the head, correct?
I'm trying to get a popup working on my site. I use headers and was wondering if there is a way to put the onload outside of the BODY tag? My header has the BODY tag in it. I only want the popup to come up on one page and not all the pages that use my header.
I have created a page that takes a person to another page automatically:
<body
However, the script waits for the entire page to load before actually taking the person to the other page. What I need to do is to have a script that takes the visitor to the target page as soon as the page appears (without waiting for ads to load completely). How can this be done?
Just wondering if anyone knows if it's bad practice to put multiple body tags within one document? I'm using a template system (php) that loads template files into a main template (already containing a body onLoad()), and the content files also have a body onLoad() preloading functions intact. It seems to be working but wanted to know if there is anything wrong with this? What about broswer specific issues?