DHTML Forum  

Go Back   DHTML Forum > dhtmlcentral.com > Crossbrowser DHTML
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27.10.2003, 12:43
thor thor is offline
Neuer Benutzer
 
Join Date: 27.10.2003
Location: United Kingdom
Posts: 1
Default

I am trying to convert a NS4 compatible website to IE5.5 and I can't get it to work. I know that I have to change the layers tag to div and use getElementById(), but I still can't get it to work?

The getElementById() is supposed to display a PHP file which will hold information when the onmouseover event is initiated. I am using iframe to get get the file and innerhtml to pass it to the div...why oh why does this not work, as it is driving me crazy!

<html>
<head>
<body bgcolor="FFFFFF" text="000000">
</head>
<script>

function getpos(evt)
{
current=this;
current.mouseX=evt.pageX;
current.mouseY=evt.pageY;
}

var DHTML = (document.getElementById || document.all || document.layers);

function getObj(id)
{
if (document.getElementById)
{
this.obj = document.getElementById('id');
this.style = document.getElementById('id').style;
}
else if (document.all)
{
this.obj = document.all['id'];
this.style = document.all['id'].style;
}
else if (document.layers)
{
this.obj = document.layers['id'];
this.style = document.layers['id'];
}
}


function GetInfo()
{
if (!DHTML) return;
var x = new getObj('id');
x.innerhtml = document.frames['frameid'].document.body.innerhtml;
x.style.moveTo(this.mouseX+10,this.mouseY+10);
x.style.visibility = 'visible';
}



function HideInfo()
{
if (!DHTML) return;
var x = new getObj('id');
x.style.visibility = 'hidden';
}

window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=getpos

</script>
<body link= black >

<div id="layerA" left:0px; top:0px;>
<layer id=layerA left=0px top=0px>

<script language="php">
print "<center> <H1> $HTTP_POST_VARS[VERSION] </h1></center>" ;


//...section of some PHP

echo " <tr>";echo "<th align=left><input type=checkbox name=OKS[] value=$curDid><a href = \"#\" onm
ouseover=GetInfo('$TabFullPKS[$curDid]') onmouseout=HideInfo('$TabFullPKS[$curDid]' target=\"myframe\")>$curDid</a></th>\n";


//...end of PHP

?>

</layer>
</div>

<div id="id">
<layer id=id left=0px top=0px visibility=hidden bgcolor=lightyellow>
<iframe id="frameid" name="framename" src="GetInfo.html" style="visibility:hidden;"></iframe>
</layer>
</div>

</body>
</html>


please does anyone have any ideas??

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 28.10.2003, 01:55
weblogic weblogic is offline
Erfahrener Benutzer
 
Join Date: 18.04.2002
Location: USA
Posts: 907
Default

What is this??
[code:64wlaptgo0]
<script language="php">
print "<center> <H1> $HTTP_POST_VARS[VERSION] </h1></center>" ;


//...section of some PHP

echo " <tr>";echo "<th align=left><input type=checkbox name=OKS[] value=$curDid><a href = \"#\" onm
ouseover=GetInfo('$TabFullPKS[$curDid]') onmouseout=HideInfo('$TabFullPKS[$curDid]' target=\"myframe\")>$curDid</a></th>\n";


//...end of PHP

?>
[/code:64wlaptgo0]
maybe it should be more like this.
[code:64wlaptgo0]
<?php
rcho "<center> <H1> $HTTP_POST_VARS[VERSION] </h1></center>" ;
echo " <tr>";
echo "<th align=left><input type=checkbox name=OKS[] value=$curDid><a href = \"#\" onmouseover=GetInfo('$TabFullPKS[$curDid]') onmouseout=HideInfo('$TabFullPKS[$curDid]' target=\"myframe\")>$curDid</a></th>\n";
?>

[/code:64wlaptgo0]

and this??

[code:64wlaptgo0]
<div id="id">
<layer id=id left=0px top=0px visibility=hidden bgcolor=lightyellow>
[/code:64wlaptgo0]

Id is to be unique.

Thought you said you were getting rid of layers, I still see them.


[url="http://www.amazon.com/exec/obidos/tg/detail/-/067232525X/qid=1067308758/sr=1-1/ref=sr_1_1/103-8463122-0214255?v=glance&s=books"]Try this to[/url:64wlaptgo0]



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

All times are GMT +2. The time now is 13:01.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.