473,698 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help! I dont have IE6 and apparently it aint working

Hi Folk

Can you please have a look at http://www.friars.co.nz/map.php and let
me know if the map is working on IE6 (just do a simple search).
Unfortunately, I do not have IE6 anymore and so I can not test it.

I think there maybe some trouble with retrieving the AJAX xml. Below
is the code for this:

var i = new Array();
var j = 0;
var jmax = 4;
var http_request = false;
Thanks a million

Nicolaas

//------------------------------------ Main functions
//main function to chang the map
function changemap() {
var variables = getformparamete rs(document.get ElementById('ma pform'),
'')+ "&h=1&k=1&l=1&m =1";
var onready = "updatemap" ;
UpdateHtml('_GS map.php', 'GSmaptype=8' + variables, onready);
//initMapGSmap();
createGSlayer(' GSmaptype=1' + variables);
//reset
j = 0;
i = new Array();

return true;
}

// run a search (prior to updating the map)
function getsearchdata() {
var variables = getformparamete rs(document.get ElementById('se a'), '');
variables = variables + "&map=1";
var el = document.getEle mentById('c2');
el.checked = true;
var el = document.getEle mentById('syes' );
el.checked = true;
var onready = "updatesearchre sults";
var url = "searcher.p hp";
UpdateHtml(url, variables, onready);
return true;
}

//------------------------------------ FORM interaction

//gets all variables from a form
function getformparamete rs(obj, getstr) {
j++;
for (i[j]=0; i[j] < obj.childNodes. length; i[j]++) {
var newobj = obj.childNodes[i[j]];
tgname = newobj.tagName
if(tgname) {
tgname.toLowerC ase;
if (tgname == "INPUT") {
var tvalue = newobj.value;
if(tvalue != 0 && tvalue != "") {
var ttype = newobj.type;
var tname = newobj.name;
if (ttype == "text") {
getstr += "&" + tname + "=" + tvalue ;
}
if (ttype == "checkbox") {
if (newobj.checked ) {
getstr += "&" + tname + "=" + tvalue;
}
else {
getstr += "&" + tname + "=0";
}
}
if (ttype == "radio") {
if (newobj.checked ) {
getstr += "&" + tname + "=" + tvalue;
}
}
}
}
if (tgname == "SELECT") {
var sel = newobj;
var tvalue = sel.options[sel.selectedInd ex].value;
if(tvalue != 0 && tvalue != "") {
getstr += "&" + sel.name + "=" + tvalue;
}
}
}
if(newobj.child Nodes.length 0 && j < jmax) {
getstr = getformparamete rs(newobj, getstr);
}
}

j--;
return getstr;
}

//------------------------------------ AJAX STARTER
//open xml sheet on the server and specify the function to run when the
xml is loaded
function UpdateHtml(url, parameters, onready) {
http_request = false;
if (window.XMLHttp Request) { // Mozilla, Safari,...
http_request = new XMLHttpRequest( );
if (http_request.o verrideMimeType ) {
// set type accordingly to anticipated content type
http_request.ov errideMimeType( 'text/xml');
//http_request.ov errideMimeType( 'text/html');
}
}
else if (window.ActiveX Object) { // IE
try {
http_request = new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e) {
try {
http_request = new ActiveXObject(" Microsoft.XMLHT TP");
}
catch (e) {
alert('could not load data');
}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
if(onready == "updatemap" ) {
http_request.on readystatechang e = updatemap;
}
else {
http_request.on readystatechang e = updatesearchres ults;
}
var geturl = url + '?' + parameters;
document.getEle mentById(idname + 'title').innerH TML = "loading new map
.... "; //+ geturl;
http_request.op en('GET', geturl, true);
http_request.as ync = false;
http_request.se nd(null);
}

// -------------- process XML ----------------------------
//process map data
function updatemap() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
//alert(http_requ est.responseTex t);
var xmlDoc = http_request.re sponseXML;
var titlearray = xmlDoc.getEleme ntsByTagName('t itle');
var infoarray = xmlDoc.getEleme ntsByTagName('i nfo');
var zoomarray = xmlDoc.getEleme ntsByTagName('z oom');
var longitudearray = xmlDoc.getEleme ntsByTagName('l ongitude');
var lattitudearray = xmlDoc.getEleme ntsByTagName('l attitude');
var info = serializeNode(i nfoarray[0]);
var a = lattitudearray[0].firstChild.nod eValue;
var o = longitudearray[0].firstChild.nod eValue;
var z = zoomarray[0].firstChild.nod eValue;
if(document.get ElementById(idn ame + 'title')) {
document.getEle mentById(idname + 'title').innerH TML =
titlearray[0].firstChild.nod eValue;
}
if (document.getEl ementById(idnam e + 'info') && 1 == 2) {
document.getEle mentById(idname + 'info').innerHT ML = info;
}
if(document.get ElementById('ou terinfo')) {
document.getEle mentById('outer info').innerHTM L = '' + info + '';
}
GSrezoom(o,a,z) ;
}
else {
alert('There was a problem with the request.');
}
}
else {

}
}

//process search results
function updatesearchres ults() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
var xmlDoc = http_request.re sponseXML;
var humansqlarray = xmlDoc.getEleme ntsByTagName('h umansql');
var humansql = serializeNode(h umansqlarray[0]);
document.getEle mentById('human sql').innerHTML = humansql;
changemap();
}
else {
alert('There was a problem with the request.');
}
}
}

// -------------- XML details ----------------------------
//retrieve data from XML sheet
function serializeNode(n ode) {
if(node != undefined) {
var xml = "";
if(_browser.isS afari) {
xml = xmlText(node);
}
else if(_browser.isI E) {
xml = node.xml;
}
else {
var serializer = new XMLSerializer() ;
xml = serializer.seri alizeToString(n ode);
}
return xml;
}
else {
return undefined;
}
}

var DOM_ELEMENT_NOD E = 1;
var DOM_TEXT_NODE = 3;
/**
* Returns the representation of a node as XML text.
*/
function xmlText(node) {
var ret = '';
if (node.nodeType == DOM_TEXT_NODE) {
ret += node.nodeValue;
}
else if (node.nodeType == DOM_ELEMENT_NOD E) {
ret += '<' + node.nodeName;
for (var i = 0; i < node.attributes .length; ++i) {
var a = node.attributes[i];
if (a && a.nodeName && a.nodeValue) {
ret += ' ' + a.nodeName;
ret += '="' + a.nodeValue + '"';
}
}
if (node.childNode s.length == 0) {
ret += '/>';
}
else {
ret += '>';
for (var i = 0; i < node.childNodes .length; ++i) {
ret += arguments.calle e(node.childNod es[i]);
}
ret += '</' + node.nodeName + '>';
}
}
return ret;
}

Dec 10 '06 #1
4 1427
Daz

windandwaves wrote:
Hi Folk

Can you please have a look at http://www.friars.co.nz/map.php and let
me know if the map is working on IE6 (just do a simple search).
Unfortunately, I do not have IE6 anymore and so I can not test it.

I think there maybe some trouble with retrieving the AJAX xml. Below
is the code for this:

var i = new Array();
var j = 0;
var jmax = 4;
var http_request = false;
Thanks a million

Nicolaas

//------------------------------------ Main functions
//main function to chang the map
function changemap() {
var variables = getformparamete rs(document.get ElementById('ma pform'),
'')+ "&h=1&k=1&l=1&m =1";
var onready = "updatemap" ;
UpdateHtml('_GS map.php', 'GSmaptype=8' + variables, onready);
//initMapGSmap();
createGSlayer(' GSmaptype=1' + variables);
//reset
j = 0;
i = new Array();

return true;
}

// run a search (prior to updating the map)
function getsearchdata() {
var variables = getformparamete rs(document.get ElementById('se a'), '');
variables = variables + "&map=1";
var el = document.getEle mentById('c2');
el.checked = true;
var el = document.getEle mentById('syes' );
el.checked = true;
var onready = "updatesearchre sults";
var url = "searcher.p hp";
UpdateHtml(url, variables, onready);
return true;
}

//------------------------------------ FORM interaction

//gets all variables from a form
function getformparamete rs(obj, getstr) {
j++;
for (i[j]=0; i[j] < obj.childNodes. length; i[j]++) {
var newobj = obj.childNodes[i[j]];
tgname = newobj.tagName
if(tgname) {
tgname.toLowerC ase;
if (tgname == "INPUT") {
var tvalue = newobj.value;
if(tvalue != 0 && tvalue != "") {
var ttype = newobj.type;
var tname = newobj.name;
if (ttype == "text") {
getstr += "&" + tname + "=" + tvalue ;
}
if (ttype == "checkbox") {
if (newobj.checked ) {
getstr += "&" + tname + "=" + tvalue;
}
else {
getstr += "&" + tname + "=0";
}
}
if (ttype == "radio") {
if (newobj.checked ) {
getstr += "&" + tname + "=" + tvalue;
}
}
}
}
if (tgname == "SELECT") {
var sel = newobj;
var tvalue = sel.options[sel.selectedInd ex].value;
if(tvalue != 0 && tvalue != "") {
getstr += "&" + sel.name + "=" + tvalue;
}
}
}
if(newobj.child Nodes.length 0 && j < jmax) {
getstr = getformparamete rs(newobj, getstr);
}
}

j--;
return getstr;
}

//------------------------------------ AJAX STARTER
//open xml sheet on the server and specify the function to run when the
xml is loaded
function UpdateHtml(url, parameters, onready) {
http_request = false;
if (window.XMLHttp Request) { // Mozilla, Safari,...
http_request = new XMLHttpRequest( );
if (http_request.o verrideMimeType ) {
// set type accordingly to anticipated content type
http_request.ov errideMimeType( 'text/xml');
//http_request.ov errideMimeType( 'text/html');
}
}
else if (window.ActiveX Object) { // IE
try {
http_request = new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e) {
try {
http_request = new ActiveXObject(" Microsoft.XMLHT TP");
}
catch (e) {
alert('could not load data');
}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
if(onready == "updatemap" ) {
http_request.on readystatechang e = updatemap;
}
else {
http_request.on readystatechang e = updatesearchres ults;
}
var geturl = url + '?' + parameters;
document.getEle mentById(idname + 'title').innerH TML = "loading new map
... "; //+ geturl;
http_request.op en('GET', geturl, true);
http_request.as ync = false;
http_request.se nd(null);
}

// -------------- process XML ----------------------------
//process map data
function updatemap() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
//alert(http_requ est.responseTex t);
var xmlDoc = http_request.re sponseXML;
var titlearray = xmlDoc.getEleme ntsByTagName('t itle');
var infoarray = xmlDoc.getEleme ntsByTagName('i nfo');
var zoomarray = xmlDoc.getEleme ntsByTagName('z oom');
var longitudearray = xmlDoc.getEleme ntsByTagName('l ongitude');
var lattitudearray = xmlDoc.getEleme ntsByTagName('l attitude');
var info = serializeNode(i nfoarray[0]);
var a = lattitudearray[0].firstChild.nod eValue;
var o = longitudearray[0].firstChild.nod eValue;
var z = zoomarray[0].firstChild.nod eValue;
if(document.get ElementById(idn ame + 'title')) {
document.getEle mentById(idname + 'title').innerH TML =
titlearray[0].firstChild.nod eValue;
}
if (document.getEl ementById(idnam e + 'info') && 1 == 2) {
document.getEle mentById(idname + 'info').innerHT ML = info;
}
if(document.get ElementById('ou terinfo')) {
document.getEle mentById('outer info').innerHTM L = '' + info + '';
}
GSrezoom(o,a,z) ;
}
else {
alert('There was a problem with the request.');
}
}
else {

}
}

//process search results
function updatesearchres ults() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
var xmlDoc = http_request.re sponseXML;
var humansqlarray = xmlDoc.getEleme ntsByTagName('h umansql');
var humansql = serializeNode(h umansqlarray[0]);
document.getEle mentById('human sql').innerHTML = humansql;
changemap();
}
else {
alert('There was a problem with the request.');
}
}
}

// -------------- XML details ----------------------------
//retrieve data from XML sheet
function serializeNode(n ode) {
if(node != undefined) {
var xml = "";
if(_browser.isS afari) {
xml = xmlText(node);
}
else if(_browser.isI E) {
xml = node.xml;
}
else {
var serializer = new XMLSerializer() ;
xml = serializer.seri alizeToString(n ode);
}
return xml;
}
else {
return undefined;
}
}

var DOM_ELEMENT_NOD E = 1;
var DOM_TEXT_NODE = 3;
/**
* Returns the representation of a node as XML text.
*/
function xmlText(node) {
var ret = '';
if (node.nodeType == DOM_TEXT_NODE) {
ret += node.nodeValue;
}
else if (node.nodeType == DOM_ELEMENT_NOD E) {
ret += '<' + node.nodeName;
for (var i = 0; i < node.attributes .length; ++i) {
var a = node.attributes[i];
if (a && a.nodeName && a.nodeValue) {
ret += ' ' + a.nodeName;
ret += '="' + a.nodeValue + '"';
}
}
if (node.childNode s.length == 0) {
ret += '/>';
}
else {
ret += '>';
for (var i = 0; i < node.childNodes .length; ++i) {
ret += arguments.calle e(node.childNod es[i]);
}
ret += '</' + node.nodeName + '>';
}
}
return ret;
}

May I ask _why_ You don't have access to IE 6 anymore?

If it's because you have upgraded to IE7, please check out
http://labs.insert-title.com/labs/Mu...rticle795.aspx
which will guide you in installing multiple versions of IE on Windows
XP.

If it's because you are using Linux, you can install wine, and then
download ies4linux, found at
http://www.tatanka.com.br/ies4linux/page/Main_Page, which will give you
versions 5, 5.5 and 6 all running about as bug free as IE ever ran
before.

All the best.

Daz.

Dec 10 '06 #2

Daz wrote:
......
May I ask _why_ You don't have access to IE 6 anymore?
Installed 7, followed the link and found...

http://browsers.evolt.org/download.p...e6eolas_nt.zip

will install and work with that one.

Dec 10 '06 #3

windandwaves wrote:

I just found the problem... IE6 does not like the following line:

http_request.as ync = false;

So I took it out. The result, however, is that the script does not
seem to wait for one thing to finish before doing the next thing or
something like that. Well, it still works in FF, but not in IE6.
However, there are no errors in IE6.

Can someone tell me what
http_request.as ync = false;
means.... I think it means "do not process this out of sync with the
rest of the script"

and can someone tell me how to replace it with something more pallatble
for IE6?

Thank you

Nicolaas

Dec 11 '06 #4
Daz

windandwaves wrote:
windandwaves wrote:

I just found the problem... IE6 does not like the following line:

http_request.as ync = false;

So I took it out. The result, however, is that the script does not
seem to wait for one thing to finish before doing the next thing or
something like that. Well, it still works in FF, but not in IE6.
However, there are no errors in IE6.

Can someone tell me what
http_request.as ync = false;
means.... I think it means "do not process this out of sync with the
rest of the script"

and can someone tell me how to replace it with something more pallatble
for IE6?

Thank you

Nicolaas
Hi. Basically it tells the script to wait until it has received all of
the incoming data from the server, or in other words, to run
asynchronously with the server until the server stops sending data (or
in this case, tells the browser it's finished sending data). Otherwise
you are effectively processing data that might not be there, and in
fact, probably isn't.

I believe that for IE, you need to create a new ActiveXObject. As
Microsoft choose to be different, you will need to look into AJAX. This
article should get you on your way.
http://www.wwwcoder.com/main/parenti...8/default.aspx

Best of luck.

Daz.

Dec 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
6546
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
6
4338
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing result in any way. Who can help me, I thank you very very much. list.cpp(main program) //-------------------------------------------------------------------------- - #pragma hdrstop #pragma argsused
3
3357
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With numarray, help gives unhelpful responses:
7
5375
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available from clicking on many of the available topics (mostly methods but some properties are also unavailable). This same problem occurs with many, if not most, keywords. Is there any way I can activate these "missing" help topics? HELP!
5
3266
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time using "F1" help within the VB IDE. Is this expectation achievable In trying to test my help file in the IDE, I have a solution with 2 projects: the DLL and a tester. VB does not look for my help file; instead, it looks for path to my source code...
0
9169
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.