• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX in IFrames

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a page with two IFrames and both of them load the same nested page. The nested page drills down a hierarchy using AJAX to load cascading selects. One IFrame is Side A of a relationship, the other is Side B.

All works fine in FF. In IE the following function executes the first line (which puts the word "Loading" in both selects) but never calls the server.


I think I made the XHR call good for concurrent requests ...

See me doing anything dumb here? Any issues working in IFrames? I was worried that document.getElementById() might be confused with the same page nested twice, but seeing both of them say "Loading" makes me think that's ok. I'm sure missing Firebug!
[ November 01, 2007: Message edited by: Stan James ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would look into the callback variable name/function name.

You should debug with either firebug lite or with classic alerts.

Eric
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tip on firebug lite. I didn't know about that.

Turns out this problem is cache related. Things worked if I cleared cache and refresh. I tested adding current time milliseconds to the URLs to defeat caching and things work fine. I'm reading up (Wikipedia) on manipulating date headers to avoid caching. Anybody have a simpler example of that?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

Eric
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! You've been so good to me I 'm going to start a new thread to reveal the further depths of my ignorance on browser script.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic