I've been working on a project (jQuery/PHP/XML) for a few months now, and from day 1 there's been a bug i have not been able to figure out. The project contains some private information, so giving a link is a bit hard. In case it's absolutely required, i'll try to see how. I'd like to try and explain the situation with the hopes that someone recognizes what i'm doing wrong - i don't think it's very hard, but i just can't seem to find it!
I have content which is loaded through an iframe. I built an editor using my own creativity and Jeditable. Through this editor i can enter values for the content in the iframe. This is done through an XML: The editor saves it into the XML and the iframe content (which refreshes) takes the information from the XML. So far so good.
However, whenever i launch the page, edit something and refresh the iframe (see below), i see no differences. If i open the XML (through FTP), i do see the information changed and saved correctly, but it won't load onto the webpage. If i then do a full-page refresh (ctrl + r) it does show properly. Even weirder, once i have done the full-page refresh, and i continue to edit through the editor, it does update correctly through the iframe-refresh. This is how i do the iframe refresh:
$(iframe).parent().html('<iframe src="etc"></iframe>');
with var iframe being the <iframe> tag
If i then wait a while (let's say half an hour) and i try it again, it needs the single page-refresh again. This leads me to believe it's something to do with my session or cache, but i do not have that much knowledge about these subjects.
Summary:
THE PROCESS: I enter information into a handmade jQuery-based editor then press save. It saves to an XML, the iframe refreshes. Whenever it loads, it takes it's information from the XML.
EDIT -> IN-PAGE REFRESH -> Doesn't work
EDIT -> FULL-PAGE REFRESH -> Does work -> EDIT -> IN-PAGE REFRESH -> Does work
I hope this makes the situation clear. Does anyone have any idea where the problem could be? I'm really at a brick wall here, while the problem seems so simple. Thanks a lot in advance.
No comments:
Post a Comment