How Often Does An External Script Reload
Nov 11, 2010If multiple pages reference the same external JS sheet, does the sheet reload every time you go to a new page or does it stay in memory?
View 7 RepliesIf multiple pages reference the same external JS sheet, does the sheet reload every time you go to a new page or does it stay in memory?
View 7 RepliesI've a small external .JS library that allows a non code-savvy user to
occasionally update a list of values that are read as a JS array and
used to populate the <option>s of a <select> in the calling page's form.
Anyway, is there a way by which I can ensure, regardless of the user's
browser settings, that the JS library is not used from cache but re-read
each time, to ensure the up to date list is used?
If not, I might as well put the JS array code back in the calling page,
especially as the split is for ease of use by the page's owner, albeit
with increased change of editing errors. A database solution, etc., is
inappropriate here.
Is there a difference between right clicking an iframe and reloading post reponse vs. using javascript to reload the frame? So far, the javascript route hasn't worked for me. [some context] I am writing a little bookmarklet to help me with the online registrations at my school. Here is the setup.
Load up a page on the domain. Remove all body elements. Insert an iframe. Set iframe to page for class roster search. (in iframe on school search page) Select class search options, POST the form data, and view results in frame. *This works perfectly, but I need to have it refresh results every minute or so. When I use frame.contentDocument.location.reload(true); the frame loses the post data or something and the page is broken. BUT when I just right click on the frame and select "reload frame" it works perfectly. What is the difference between rightclicking the frame and refreshing it like that vs. using javascript to reload the frame?
I have a simple product display with an product image. The product image changes with ajax when i click in a dropdown menu on another color.
Now i added the (beautiful) zoom script cloud zoom. It just works fine but after i click on another color and the product image reloads the script does not work anymore. instead my <a> is just a normal <a>.
This is the part that reloads at all:
How can i reload the function when this part reloads? Or what else could i do?
//-----10% Off Coupon-----
if (coupon=="N110"){
form.PRICE.value=-(moneyFormat(fTotal * .10)-1);
form.ID_NUM.value="N110";
form.NAME.value=" Craft Month Promo 10% Off";
location.href=location.href;
return true;
}
I want to replace the .10 with an external peice of data, so users can change the amount with having to open the script. Sorta like those early marquees' where the marquee text was inserted from a text file.
I hav linked external js (ext1.js) to my app.html page. Now in the ext1.js, I have a function like
[CODE] function onwindowload(){
//Access HTML element and append external js 2 (ext2.js) here
}[CODE]
//Access HTML element and append external js 2 (ext2.js) here--->I donno how to add external JS here.
Even if i add the external JS here, the JS uses document.write fn. which replaces entire page.
I'm writing a script that opens the current page into a new window
with a different style sheet for printing, don't ask me why it needs
to open into a new window, it's a request from powers that be! Anyway
when I reload the page in IE it's fine but in FF it seems to render
the html without a style sheet!!?? I think it may be to do a caching
problem in FF with new windows but I'm not sure. Heres the code I've
written: Code:
I want to be able to reload a frame only when an address specific is called using Netscape 4.x.
I thus introduced into the page the following script (which does not work...):
< script >
/ / Netscape 4.x
bw.ns4?reload.();
< / script >
I would like in fact that the frame is reloaded in the same way that when one uses the function " reload frame" of the contextual menu of Netscape 4.x.
Is it possible to trigger a page reload with JS?
View 2 Replies View RelatedI have a index page on which there are several iframes which point to pages from a tomcat server. Sometimes when the index page loads, most of the iframes display session expired error. When I refresh the page, all iframes load properly. I want to reload the page twice whenever I come to that page initially. I also want to reload that page twice when I come to it from another page. Any ideas are welcome.
[Code]...
SUMMARY: User clicks on a link, link sends data to a script, that script tells the page to output different data.
(I have a separate script that makes xmlhttp the ajax variable to use) AJAX
function Item(id, action) {
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
[Code]....
I am try to force a previous page to reload ...
problem: I cannot use a meta tag nor any script in the onload of the page ...
I was trying to add a parameter in the link but how can I retrieve previous page link from history ?
reloading an XML file that I'm reading with AJAX. I'm looking for a way to refresh this XML when the page is refreshed so I know that the data is up to date. It only needs to happen when the page is reloaded. one solution suggested something like this
Code:
var xmlhttp;
function loadNewsContent(url)
{
[code]....
But that doesn't work at all and I don't know why.
I have a php script that dynamically creates images, reusing image files on
the server to save space and clutter.
The problem is described in the steps below:
1. User clicks on a button.
2. Same page loads, but the php script creates a new image in an old file.
3. It displays the image file, but the old image shows, even though the file
contains the new image.
My options are:
1. Use javascript to force a reload when the user clicks the button (not
desirable, because the user is forced to confirm the reload by the browser).
2. Put a cheesy blurb on the page telling the user to reload or refresh
(along with ideotic explanations of how to do it).
3. Some really great way someone here is going to describe to me (my
preference).
After my web page has been loaded I'm doing some tests with a JavaScript. If
I figure out that something is wrong I'd like to reload the whole frameset.
With Internet Explorer and Mozilla Firefox I can reload the whole frameset
with
parent.location.href = "index.html";
However, this doesn't work with Opera.
Does someone know how to do that with Opera?
I'm a j-script (and html) newbie with what I thought was a simple
requirement:
1) From a link in a primary window open a secondary window
2) Want to specify size of secondary window
3) Want primary window NOT to reload when secondary opens
Don't want to prejudge the approach; I'm guessing Javascript can help,
and in fact have accomplished 1) and 2) above with the following,
embedded in the body of the primary window html:
<a href="javascript:location='primary_window.html'
window.open('secondary_window.html', 'secondary_window_label',
'height=345,width=550')">link_text</a>
But when the secondary window opens, the primary window reloads. I've
seen earlier posts addressing this problem (or similar ones), but I
haven't been able to make any of the suggestions work.
How can I reload content in an <object>?
View 3 Replies View RelatedI'm using window.location.reload(true) to refresh the current page. It
works fine in IE but in FF it doesn't seem to work correctly. If I
view the page source, I see that it has been updated, but the display
isn't updated. What's going on?
I have a perl/cgi script that includes dynamically created
checkboxes and file names. When a given checkbox is checked I move the
related file. how do I redisplay the page without the checkbox and
file name. In other words, I want to reload the page just as if the
user has entered for the 1st time.
i've tried variations of:
<form action="/cgi-bin/page.cgi" method="post" onsubmit="doRefresh()">
function doRefresh(){
location.replace("/cgi-bin/page.cgi");
//location.reload("/cgi-bin/page.cgi");
//location.reload("");
}
Our application has a main window (call it window_1) which opens a
popup to display application data (call it window_2). This popup in
turn opens a 3rd popup with additional application data (call it
window_3). This 3rd popup window should reload window_1 when it loads
without reloading window_2.
I have a navigation page, very long list of urls and when you click a link it is opened in a new window.
THE PROBLEM:
When i scrolldown the navaigator and click on a link, it refreshes itself, even when i have target specified.
By pressing a button I am directed from one page to another. At the second
page some things displayed on the first page are changed and now I want to
go back to the first page again. The pages are written in php.
If I use javascript:history.back() I get back to the first page but I have
to manually reload it to see the changes I have made.
The solution could be:
echo "<meta http-equiv="refresh"
content="0;url=firstpage.php?op=view&id=$id&...&...&....">";
But I have to do a lot of work to get all the options (e.g. op=view&...).
Is there anyway I can use javascript to go back to the first page and force
it to reload, so that I don't have to reload it my self?
Or is there some way I can read out what is in javascript:history.back() so
that I could place it in the above mentioned solution? It doesn't seem to
work if I just do the following:
echo "<meta http-equiv="refresh"
content="0;url=javascript:history.back()">";
Is it possible to avoid Netcape to reload the frameset if the size of the
frameset is altered or if one of the frames is changed using i.e.
javascript? The issue is that one the frame contain a meny loaded from a
database that I want to avoid being reloaded when the "menu-frame" is
resized to "zero-width".
Suppose I have a frame like 123bottom.html and within it, I want to promt
the user for a response (in the <HEAD>) like
var ans = prompt("What is your name?");
and then reload the page (via, say window.location.reload() ?)
using the argument of the value of ans appended onto the url so that, in
effect, say, I am calling the new frame as
123bottom.html?ans=Ike
Can someone show me how I need to call the page again, itself, like this
once I have the value for ans? Thanks, Ike (himself)
Is there any way to reload jQuery in runtime?
View 3 Replies View RelatedI need to create a script, that sets cookie ,named "something" with a random $value - something(1-500) every time the user refreshes his browser.
Something like this :
Y.Node.get("#Button1").on("click", function(){
var newValue = "something" + Math.round(Math.random() * Math.PI * 500);
Y.Cookie.set("$something", newValue);
[Code]....
P.S. i'm trying to make it work for a few days .