function spawn(ev){
var oSelect = '';
var oFlag = false;
if (ns4 || ns6)
oSelect = document.getSel ection();
else if (ie4 || ie5){
if (!ev)
ev = window.event;
oFlag = true;
oSelect = document.select ion;
}
alert(oSelect.t ype);
}
if (oSelect == '')
return;
else{
//stuff
}
In Netscape 4.8 if text is not selected nothing happens which is what I want. Please
disregard the fact that oSelect.type is not Netscape compatible you are really
seeing only a partial of what I am doing.
The issue here comes from this page:
where it says, "Therefore, comparing the value of document.select ion.type with "None" on Internet Explorer 4.0x,
is equivalent to comparing the value returned by the document.getSel ection() method with "" on Navigator 4.0x."
This seems not to be true in IE 5.5. For if I just click on the page which has the above funcion in it
I get "Text" not "None"
So I cannot do this:
if (oSelect == '' || oSelect.type = "None")
return;
else{
//stuff
}
Any suggestions how to fix this? Thanks.
--
George Hester
_______________ _______________ ____
var oSelect = '';
var oFlag = false;
if (ns4 || ns6)
oSelect = document.getSel ection();
else if (ie4 || ie5){
if (!ev)
ev = window.event;
oFlag = true;
oSelect = document.select ion;
}
alert(oSelect.t ype);
}
if (oSelect == '')
return;
else{
//stuff
}
In Netscape 4.8 if text is not selected nothing happens which is what I want. Please
disregard the fact that oSelect.type is not Netscape compatible you are really
seeing only a partial of what I am doing.
The issue here comes from this page:
where it says, "Therefore, comparing the value of document.select ion.type with "None" on Internet Explorer 4.0x,
is equivalent to comparing the value returned by the document.getSel ection() method with "" on Navigator 4.0x."
This seems not to be true in IE 5.5. For if I just click on the page which has the above funcion in it
I get "Text" not "None"
So I cannot do this:
if (oSelect == '' || oSelect.type = "None")
return;
else{
//stuff
}
Any suggestions how to fix this? Thanks.
--
George Hester
_______________ _______________ ____
Comment