JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old July 19th, 2006, 12:16 AM
ravs ravs is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Location: gurgaon, haryana, india
Posts: 60 ravs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 44 m 29 sec
Reputation Power: 3
Send a message via Yahoo to ravs
Problem with forefox

hello friends i have a problem with firefox.
i am using AJAX and i want script to wait untill the we get the response from server, but it is not happning in firefox.
i am sending a script which i am using from last 6 minths in IE but it is not working in firefox




/*Javascript API for Server Call Back Using AJAX*/
var request001;
var local;
var return_data
function Init()
{
if(window.ActiveXObject)
{
//alert();
try
{
request001=new ActiveXObject("Msxml2.XMLHTTP"); // CREATE OBJECT

}
catch(e) //IF FAILED
{
try
{
request001=new ActiveXObject("Microsoft.XMLHTTP");// THEN TRY ANOTHER

}
catch(oc)// AGAIN FAILED
{
request001=null;// RETURN NULL

}
}
}
else if(window.XMLHttpRequest)
{

//if(!request001&&typeof XMLHttpRequest!="undefined")// IF OBJECT CREATED
//{
request001= new XMLHttpRequest(); //THEN GET THE FUNCTION
alert(request001)
//request001.overrideMimeType('text/xml');

//}
}

}
function SendRequest(URL)// GET THE REQUEST URL
{
return_data=null// SET OUTPUT TO BE NULL IN START

Init(); // INITIALIZED THE COMPONENT

if(request001!=null)
{


request001.onreadystatechange = Process; // PROCESS THE onreadystatechange
request001.open("GET",url+"/" +URL ,false);// SET THE METHOD [GET/POST] AND THE MODE
request001.send("");

}
return return_data
//return return_data+"---wer --";
}

function Process()
{
//onreadystatechange IS A EVENT WHICH ITERATES ITSELF TILL IT NOT GETS THE PERFECT CONDITION. I.E. THE FULL REENDER OF THE PAGE


if (request001.readyState == 4)// CHECK FOR THE STAT 4
{
alert("-");

if (request001.status == 200)// CHECK FOR THE STATUS 200
{

alert(request001.responseText);
if(request001.responseText=="")
{


}
else
{

var result=request001.responseText;
alert(result+"---")
result=result.substring(0,result.indexOf("@"));// EXTRACT DATA BEFORE @ TO AVOIDE GARBAGE

return_data=result; //SET THE OUTPUT TO THE RESULT

}
}
else
{


}

}
}

Reply With Quote
  #2  
Old September 25th, 2006, 04:54 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 9 m 44 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
please put your code surronded by [ CODE ] tags, otherwise you lost me from the word go...

colton22

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Problem with forefox


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway