I have a working alternative to those who want to give it a go. I'll call it "info panel".
make sure your PTViewer applet looks like this (minimum) note: name must be "ptviewer" and mayscript="true".
<applet name="ptviewer" archive="ptviewer.jar" code="ptviewer.class" width="320" height="240" mayscript="true">
<param name="file" value="yourimage.jpg">
<param name="mousehs" value="mousehs">
<param name="getview" value="getview">
<param name="hotspot0" value=" X93 Y56 n'Click the white spot to enter the home' c'ffffff' u'javascript:hotspotInfo(hotspot0)' q ">
now in the <head> of the page place the following javascript:
<script language="JavaScript" type="text/javascript"><!--
// the actual text for the infoPanel
var hotspot0 = "Click the white spot to enter the home"
function hotspotInfo(str){
document.getElementById('info').innerText = str;
}
function clearInfo(){
if (document.getElementById('info').innerText!=""){
document.getElementById('info').innerText="";
}
}
function mousehs(n) {
if( n== -1 ){
clearInfo();
}else{
var str = "hotspot"+n;
hotspotInfo(eval(str));
}
}
function getview(p,t,f) {
clearInfo();
}
//--> </script>
Now where you want the info to show up on the page place the following tag:
<div id="info" style="width:150px"></div>
Thats it. Works on all IE4+, Netscape does not cooperate with this method.
Happy coding!
------------- XId! ou = ?? Can you guess ??
|