Hi,
Can anyone suggest a way of displaying an X and Y co-ordinate of an image.
What I want to do is to offer an image and as a user runs the mousepointer over that image, each point is displayed as an X and Y co-ordinate.
Based on this co-ordinate, I can then pass this on as variables to an action page to poistion text or images related the the X and Y co-ordinate that the user chose?
I can do the latter part i.e. assuming I have the X and Y co-ordinate, I can position anywhere on the action page:
The code snippet for ths is as follows:
(Assuming that I have the desired and Y co-ordinate of the page)
<FORM ACTION= "previewXYpage.cfm" METHOD="POST">
Enter your X Co-ordinate <INPUT TYPE ="Text" NAME="X"><BR>
Enter your Y Co-ordinate <INPUT TYPE ="Text" NAME="Y"><BR>
<INPUT TYPE = "Submit" VALUE ="Enter">
<INPUT TYPE = "Reset" VALUE ="Clear">
Displaying "whatever" based upon the X and Y co-ordinate defined by the previous input page:
<STYLE TYPE="text/css">
#companyname
{
position:absolute;
top: <CFOUTPUT>#X#</cfoutput>px;
left: <cfoutput>#Y#</cfoutput>px;
}
</style>
</head>
<body>
<DIV ID="CompanyName">
"The stuff that I want to be positioned according the co-ordinates specified"
</div>
</body>
</html>
Any ideas or suggestions would be greatly appreciated
Thanks in advance
Sam
Can anyone suggest a way of displaying an X and Y co-ordinate of an image.
What I want to do is to offer an image and as a user runs the mousepointer over that image, each point is displayed as an X and Y co-ordinate.
Based on this co-ordinate, I can then pass this on as variables to an action page to poistion text or images related the the X and Y co-ordinate that the user chose?
I can do the latter part i.e. assuming I have the X and Y co-ordinate, I can position anywhere on the action page:
The code snippet for ths is as follows:
(Assuming that I have the desired and Y co-ordinate of the page)
<FORM ACTION= "previewXYpage.cfm" METHOD="POST">
Enter your X Co-ordinate <INPUT TYPE ="Text" NAME="X"><BR>
Enter your Y Co-ordinate <INPUT TYPE ="Text" NAME="Y"><BR>
<INPUT TYPE = "Submit" VALUE ="Enter">
<INPUT TYPE = "Reset" VALUE ="Clear">
Displaying "whatever" based upon the X and Y co-ordinate defined by the previous input page:
<STYLE TYPE="text/css">
#companyname
{
position:absolute;
top: <CFOUTPUT>#X#</cfoutput>px;
left: <cfoutput>#Y#</cfoutput>px;
}
</style>
</head>
<body>
<DIV ID="CompanyName">
"The stuff that I want to be positioned according the co-ordinates specified"
</div>
</body>
</html>
Any ideas or suggestions would be greatly appreciated
Thanks in advance
Sam