But this doesn't work on a div. I am using a div because the text I am displaying contains HTML. Surely it is possible to simply set a scroll bar to the bottom in a div?
I have a div with a scroll bar. It contains various child divs, and when the user sees them, they are in vertical order. So he can scroll to whatever child div he wants to. Then he can click on an arrow, and the entire child div expands to reveal a lot of text. This all works. But I'd also like to make the child div scroll up to the top of the parent div. Otherwise, it could happen that the user clicks on a child div that is near the bottom of the screen, and it expands, but most of the content is below the screen, which means he has to use the browser's own scrollbar to see the rest. I know that javascript has a 'scrollby' function, butI wouldn't know how much to scroll it, and I also want to use a jquery selector to identify the child div.
i have 1 div with scrollbars and another div with a table inside. when user scroll horizontal bar in div1 i want application to scroll the table header from the same amount of pixels and in the same direction. i did not find anything under jQuery about that.. :-(
1. how can i detect in which direction the scroll is done (to the right, or to the left) ? 2. how can i determine how many pixels this scrolling is about ? 3. how to scroll the table header (table tag or th tag) from the same amount of point ?
i found just scrollLeft for now and i'm not successful to use it
how to make an image/text to scroll as the user scroll the page also? for example if the user scrolls down image/text also scrolls down and when the user scrolls up image/text also scrolls up..
is there anyway to force an event, like mouseover? I have a page that loads, and due to some complex js code (not mine) it fails to write labels to tabs until the user does a mouseover on the tabs. the page load event happens beforre the tabs are loaded. Once the user mouseovers the tabs, the labels of the tabs appear, and stay there. it is irritating. i would like to force a mouseover so the tab names appear.
I have a page where I set document.location.href but the previous copy of that page is in the cache, so Firefox is not refreshing its contents, which is what I want it to do. Is there a way to get this result?
I have been writing a practice sliding div navigation script. I am finding myself in the position where I need to force a div into showing the hover behavior defined in css.
So my question is this. If I have two divs, is there a way to make the second div display its onmouseover behavior when the mouse is over div 1?
I have a script that parses window.location.hash to figure out which xml file to load. The xml files populate a page on a framed site. The code works correctly to a point.
If I have a seperate html page to support each xml it works. I would like to eliminate the individual html pages becuase only one should be needed.
When I use one page the first link works, then the second one does nothing (doesn't refresh the frame). If I click to a static image for the frame then click the next xml link it works.
What can I do to force the frame to update? I am clicking on a HREF link that should re-load the html page, but with the new xml data.
I am a complete JS newbie. I am trying to make one radio button assume a certain value when another one in a different group is clicked. This is a conference registration form for which most applicants will pay, but some do not. It is passing form data to a ColdFusion backend, and I simply wish to havethe non-paying applicants have the no-pay "payment type" automatically selected when they select the no-pay registration type. I have tried the following with no success (in IE 6.0; I want to test it here first)
<script language="JavaScript" TYPE="text/javascript"> function forceCompPay() { if (document.forms[1].groupType == "speaker") { document.forms[1].groupPayment[comp].checked = true } } </script> </head>
At my job we have computers that are set up with restricted rights. Firefox 2 is the default browser (good call), but for some reason a site that the user has to visit is IE only (yeah, wtf).
We have a webpage open with a link to that IE only site, now is there a way to open that link in IE from FF? We have full control over these machines, so we could install batch software or whatever it would take.
I have a simple iFrame which I use to open other websites. However, some websites force themselves to be opened in "parent" windows when links are clicked, or even always. How do I go about avoiding this? I believe there is a way to set my iFrame as "self" or something like this in order for all sites to still only load in iFrames, but I'm not sure how.
i discovered that if i just enter "test test test" into a basic tinymce textarea, it doesnt store any html in the db. only when i hit enter at the end of a line does it wrap <p> around both sentences. and, if i just paste a block of text in to tinymce (no linebreaks), it doesnt add html markup either
so i have to tell client to hit enter at the end of any sentence, or the db just returns text with no html markup. i cant use the code below either cause what if they enter two lines? in that case there will be two <p>'s wrapped around the text?
<p><? echo row['text'];?></p> anyone know how to get around this?
I have a page A which contains an iframe B which gets loaded with content as the page loads Page A has a link. When the link is clicked, I invoke some JavaScript function which performs some tests, and then I would like to have my iframe reload some other URL
The problem is that I change the iframe's src attribute to the new URL but nothing happens. The iframe isn't reloading.
How can I force it to reload? I heard that it was a problem in IE but that could be a mistake on my part It is vital to note that if I clean my browser cache (on IE), then the code works fine once (the iframe gets reloaded). But once it is in the cache, successive attempts fail
Here is a sample of my code
Code: <head> function test() { // perform some tests here
when a popup window appear, can I force users to focus on the popup window "ONLY" that mean, if users don't close the popup window, they can't do anything to other ie window (include close the opener window...etc)
I would like to know if it's possible to force a dialog box to "expire" after so many seconds? The scenario is that I'm holding various objects in my session. Before it times out, I want to notify the user to click Okay to save the work now OR click cancel to refresh the page. What if the user doesn't respond to the dialog box for a long time and then hits save? Well the session has already timed out!
So, can I have the dialog box appear until the session times out and then force a refresh without user interaction? I've seen a similar thing done before on bankOfamerica website, but I'm not sure if it's with Javascript.
Is there a way to force the client to open a particular file type. Currenlty text files that are opened by the web site are opened inside the browser, I would like to stop this and have them prompted to open or save the file.
If I try to put a site into an iframe that has "escape frame" code in its source (posted below), it will reload the requested page into the parent instead of the iframe. Is there a way to prevent this from happening?
One could use onunload to stop the redirection, but I would like to find a way to load a page into an iframe, even if it has this type of code.
I have considered server code loading the content and re-displaying it but I would like to find a pre javascript solution.
//this is not my code if (self != top) { if (document.images) { top.location.replace(window.location.href); } else { top.location.href = window.location.href; } }
I've got a document that I want to ensure always get loaded into the top level document and not into a frame or iframe. I've got it figured out how to detect if the document is loaded into a frame. But what I want to happen is the HTML content in the iframe to be displayed in the top level document w/o a return trip to the server.
Here's what I'm thinking:
function forceTopLevelDocument() { if (top != self) { //load the HTML from child document into parent document //without a return trip back to the server } }
What I can't figure out is how to take the document loaded into a child frame and push it's contents up into a parent frame.