473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax page not getting refreshed in IE

134 New Member
hi

i have a php page in which i have included few tabs links like

games, news,entertainm ent etc.,

when i click the tablink an ajax page is loaded below.
In that ajax page several pages(iframes) are loaded inside the tables, such that it contains three tables in a row.
each table contains different pages loaded through iframes,
and an close button is available so that we can close the unwanted tables(containi ng frames).

"i hav done similar to igoogle drag and drop portion without drag option"

so if we close an table the page name is stored in the database and it is not diaplayed.,

The problem is when i close the tables(page containing iframes) its getting closed and the values are stored correctly in the database., but after that if i click the same tablink the ajaxpage gets loaded along with the closed tables(which i have closed).
i,e the page gets loaded with the old datas without getting the refreshed values from the database.,

it works well in firefox.,

Can anyone help me.,

regards
vijay
May 16 '08 #1
18 2703
acoder
16,027 Recognized Expert Moderator MVP
The page is probably getting cached.

You'll need to get a unique page, so add something like
Expand|Select|Wrap|Line Numbers
  1. "&cache="+(new Date()).getTime()
to the end of the URL.
May 16 '08 #2
vjayis
134 New Member
The page is probably getting cached.

You'll need to get a unique page, so add something like
Expand|Select|Wrap|Line Numbers
  1. "&cache="+(new Date()).getTime()
to the end of the URL.

Hi

i cant understand., i m new to to ajax., where i want to add the code., and with the code do i want to do something.,?

help me to get rid of this.,
May 16 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Post your current code.
May 16 '08 #4
vjayis
134 New Member
Post your current code.
Here is my code:


Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3. function ajaxFunction1(action,id,uname,tablename)
  4. {
  5. var xmlHttp;
  6. try
  7.   {
  8.   // Firefox, Opera 8.0+, Safari
  9.   xmlHttp=new XMLHttpRequest();
  10.   }
  11. catch (e)
  12.   {
  13.   // Internet Explorer
  14.   try
  15.     {
  16.     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  17.     }
  18.   catch (e)
  19.     {
  20.     try
  21.       {
  22.       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  23.       }
  24.     catch (e)
  25.       {
  26.       alert("Your browser does not support AJAX!");
  27.       return false;
  28.       }
  29.     }
  30.   }
  31. xmlHttp.onreadystatechange=function()
  32.  if(xmlHttp.readyState==1)
  33.  {
  34.  
  35.  }
  36.  if(xmlHttp.readyState==4)
  37.  { 
  38.     document.getElementById("ajax1").innerHTML=xmlHttp.responseText;
  39.  }
  40. }
  41.  
  42. xmlHttp.open("GET","includes/ajaxpage.php?action="+action+"&id="+id+"&uname="+uname+"&table="+tablename,true);
  43. xmlHttp.send(null);
  44.  
  45. }
  46. </script>
  47.  
so when i close an table (containing iframe)., four variables are passed to the ajax page and the same page gets loaded without the closed table. the closed table name is stored in the database such that it is not diaplayed.,

very urgent ., help me in this.,

thanks
May 17 '08 #5
vjayis
134 New Member
Post your current code.
Here is my code:


Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3. function ajaxFunction1(action,id,uname,tablename)
  4. {
  5. var xmlHttp;
  6. try
  7.   {
  8.   // Firefox, Opera 8.0+, Safari
  9.   xmlHttp=new XMLHttpRequest();
  10.   }
  11. catch (e)
  12.   {
  13.   // Internet Explorer
  14.   try
  15.     {
  16.     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  17.     }
  18.   catch (e)
  19.     {
  20.     try
  21.       {
  22.       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  23.       }
  24.     catch (e)
  25.       {
  26.       alert("Your browser does not support AJAX!");
  27.       return false;
  28.       }
  29.     }
  30.   }
  31. xmlHttp.onreadystatechange=function()
  32.  if(xmlHttp.readyState==1)
  33.  {
  34.  
  35.  }
  36.  if(xmlHttp.readyState==4)
  37.  { 
  38.     document.getElementById("ajax1").innerHTML=xmlHttp.responseText;
  39.  }
  40. }
  41.  
  42. xmlHttp.open("GET","includes/ajaxpage.php?action="+action+"&id="+id+"&uname="+uname+"&table="+tablename,true);
  43. xmlHttp.send(null);
  44.  
  45. }
  46. </script>
  47.  
so when i close an table (containing iframe)., four variables are passed to the ajax page and the same page gets loaded without the closed table. The closed table name is stored in the database such that it is not diaplayed.,

very urgent ., help me in this.,

thanks
May 17 '08 #6
vjayis
134 New Member
Hi

got the solution.,.

applied the code given by u correctly in the url.,

it gets working well in IE now.,

thanks
May 17 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
Glad you managed to work it out yourself :)
May 17 '08 #8
vjayis
134 New Member
Hi

i m with the same problem once again.,

i had added the given code by u to all the ajax url's that are contained in my page.,
but still i m having problem.,

when i select an tab(example:gam es) the tables which comes under the games category are displayed under the tabnames.
Note:each table contains frame in which the particular game is loaded.

if i click on another tab(example:new s) before the tab(containing games) gets loaded-> mismatch occurs.,
the titles of the tables gets changed but the contents(frames ) didnt get changed.,

and i had added the the code given by u to my page redirecting.,

here is my code.,

Expand|Select|Wrap|Line Numbers
  1.  
  2. var dd=(new Date()).getTime();
  3. tabs.open("GET","tabselection.php?tabname="+tab+"&data1="+data1+"&data2="+data2+"&data3="+data3+"&cache="+dd,true);
  4. tabs.send(null);
  5.  
  6.  

any other solution to get rid of this.,

regards
vijay
Jun 5 '08 #9
acoder
16,027 Recognized Expert Moderator MVP
That's a slightly different problem. You're reusing the same object which is still in use, so when you make another request whilst one is still ongoing, you need to abort the previous request. You can do that by checking that the ajax request object has not completed. If it hasn't, abort using the abort() method.
Jun 5 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1824
by: arunprabu | last post by:
Hi, I have a problecm with the AJAX request in my webpage. I have some filters on top of the page. I have a submit button and an empty div below the filters. Some of the filters have ajax requests to update the content within the filters. For example, I have 2 drop downs, one for state and another for country. When I select a country in...
9
1860
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I followed first walk through sample from http://ajax.asp.net/docs/tutorials/IntroductionUpdatePanel.aspx to create my first testing page, The problem is after I clicked that botton, it still trigged a postback. Do I miss something? Following is my code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"...
3
2333
by: msinghal | last post by:
hi, I am facing one problem which is related to AJAX. I have a html page which has some links. When the page is refreshed using AJAX then if some new new link is added to the page on this refresh, then the onClick function of this particular link is not working. Plz help
8
1696
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm about to finally make the jump and start a new site using AJAX. THe question i have for all of you AJAX developers out there is which one? 1. The Standard AJAX frame work 2. The Tool kit. 3. Or are there others out there. 4. Should i not do AJAX at all because it still posts back the entire page even though only the section is...
2
8826
by: kpg | last post by:
I have an AJAX enabled web service consumed by an AJAX enabled web app, given a zip code it returns the city and state. Tested the web service, it works fine. I created a services collection in the script manager and pointed to my web service. I call the web service from an html input button click,
2
1707
by: JimL | last post by:
Hi, I've been given the job of "Ajaxifying" an existing application. If I create a new test page in the application, Ajax works fine. However when I add a scriptmanager and updatepanel to an existing page, it doesn't work - the page just gets completely refreshed. In each case, the Ajaxy parts of the .aspx file look identical, but when I...
10
2112
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the Master pages as their master...) the entire page is refreshed - also the menu which belongs to the master, how can I fix it - so only the inside...
1
3375
by: =?Utf-8?B?TW9oc2luIEtoYW4=?= | last post by:
Hi, I am working on a website where i am creating Horizontal Menus Dynamically from database as per rights available to the user. I have several UserControls. And the Menu control also brings UserControl's URL stored in Database while Page load. There is a TabContainer control below the Menu Control. Now i want to add corresponding...
8
2497
by: knkk | last post by:
Instead of an id getting its innerHTML changed, the entire page is getting refreshed with this function of mine (you may want to look just at the end of the function where there's an alert): function morerating(ratingform, checkflag, loc) { var f = document.forms; var rating_done_flag = 0; var params = ""; if (checkflag == true)...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.