![]() |
|
#1
|
|||
|
|||
|
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?? |
|
#2
|
|||
|
|||
|
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] |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|