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.
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 web site that is frequently updated; yesterday several subscribers contacted me to say they couldn't see the update. I suspect this is a cache problem, so is there a way to force a page to be reloaded when it is changed. I realize it is too late for the current pages, but I'd like to include something later.
I'm buildning a permissions system. If the database check shows that the user doesn't have access to the PHP script she tries to access, I want to diplay an alert window telling her so. And when she presses the "OK"-button, I want the browser to send here back to the previous page that she came from.
Is this a javascript problem? Is there a quick and dirty solution?
I'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.
How do I force the Web page to reload when someone just changes the value in the dropped down list? To be clear there are many items in this form, one of which is a dropped down list, but if they choose to certain rows of this drop down list then new fields/data needs to be presented to the user.And of course change the Web page to re-load new values based on what row in the dropped down list they changed to.
I am currently programming Script Adds data to the database but if i want to Shown the data that have been added Requires refresh the page to show the Data that have been added . and I do not want this method.I want to when adding data to show updates as soon as the addition of data.This can be done by Ajax , and An example of this method used Google Gmail.
I am working on a website which has a large image slideshow on top, with the logo. The content articles are in separate HTML files, and are embedded in the main document with a simple PHP include function.
The problem is that clicking on a link causes a refresh of the whole site, the gallery resets to the first image, and there's a momentary flashing of the screen.
I would like to explore the options of having only the main section update (somehow) when the user browses the site, leaving the rest intact, on screen.
I am worried about these potential issues:
- Will it be Search Engine friendly? (i.e. finding and indexing the separate articles)
- The vertical size of the site expands depending on the length of the content. Will this partial refresh be compatible with this?
I followed the video tutorials on this site - pretty good. I'm now able to delete records and remove the tr on he fly. Im also able to insert a new record i my db, i the background. But how do i update my page so the post shows up? Code:
I am trying to send a javascript request from page_1.html to page_2.html, and have page_2.html rewrite the content on page_1.html,
the code I am using to request page_2.html from page_1.html (so the following code is on page_1.html, just to be clear) , this code works fine on other projects.[code]...
I am using this to update the page with new content every 60 seconds
Code:
$(document).ready(function() { var refreshId = setInterval(function() { $('#contents').load('src.php');
[code]...
What I am trying to do is, I want to load the page only if src.php has new contents, I tried this, but now luck
Code:
$(document).ready(function() { var refreshId = setInterval(function() { var current_html = $('#contents').html(); var new_html = $.load('src.php').html();
I am using the following code to show visitors when my page was updated last.
It seems really cumbersome for what it does, too.
Right now, it reads:
Last updated on Monday, December 19, 2011
I wanted to add code to it so that it reads the hours and is in this format:
Last updated on Monday, December 19, 2011 at 8:44am
How can I add the "at hh:mm am/pm" part? Or is there easier code that will do this?
function getLongDateString() {month = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
I came across this product page at nordstrom that allows users to filter products by certain criteria (size, fit, price, etc). [URL]..
They use ajax to update the page with any new criteria that users select, but with each page update the page url also changes and the browser history shows the new page. This is done without refreshing the page.
how this is done: creating a new page in browser history but without refreshing the page?
I'm trying to update a textarea's value with Javascript. The code is similar to:
console.warn("Before set, value is " + document.getElementById('myTextArea').value); document.getElementById('myTextArea').value = 'OMGWTFBBQ'; console.warn("After set, value is " + document.getElementById('myTextArea').value);
Although the Firefox and Chrome consoles show that the value property is updated, this is not reflected in the page itself.The specific function is invoked from an onfocus handler of another element. The textarea itself is lazily initialised from the same method, by using:
var messageText = document.createElement('textarea'); messageText.id = 'myTextArea'; someParent.appendChild(messageText);
Obviously if I use the console rather than let the script run it does work.
what I have is a code containing 2 iframes inside a div.what I'd like to do is refresh one of the iframes when it's page recieves an update from another user.
perhapse I could load the page on the document load, and store those contents in a var.then have a code that will compair the remote page to the var every second or so.if the page compairs differently, update the var info and refresh the iframe.
i am trying to put some code within my js such that, when the server "sends it a message" it refreshes the page. now i have the refresh part of things. the place where i am stuck is, how can my server (tomcat, am using a java web app) send a very small piece of info to the js which when it receives it, refreshes the page.
I am trying to update all Select boxes on a page dynamically using javascript, I simple want to change the selected item in each select box when a tick box is pressed on the page. Each Select box is named in the same convention ie. ddl_DeliveryStatus_ and then the recordID and contains the same options in the same order. The number of select boxes changes every time the page is loaded as this is all built using ASP linked to a database.
I am hoping there is an array or collection or something similar I can simply reference to do this, but an struggling to find the answer.
I am using the taconite plugin and am running into a strange issue. I use taconite to call several processes after each other (php) and update messages in the page, as such it is running fine. I have one big issue, if I open one database table too many in one of the calls, taconite receives the xml but does not update the page. With taconite debugging turned on I can see the following: WITHOUT the database I get to my last step in the database: [taconite] time to process response: 28ms [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has
In my jsp,Struts project i am using the javascript calendar control for selecting the date and by using function calcage() i am calculating the age of the user but problem occurs when the page refreshes OR when user updated the other values such as name ,contact no. Then the value of the age is set as 0 in the textfield as 0
i want to know if its possible to update a page based on some information we recieve from a device which a client will have.the simple issue is that a client device will be sending me some values by making a request along with some parameter values. i have to recieve the request, get the values and update the information on the web page.i don't know if the get() and post() function can be used in any way.. they are supposed to send request.if I don't find a solution using jquery, i will be forced to use a servlet, but then again, i have to somehow update the page directly, i can't save the data anywhere and read it. because, one thing is the data is critical and other thing is that i will get data every 5 seconds.