Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get X-Y pixel values of a On_Mouse_Down

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I have an image and would like to get the Pixel Values when a user click on it. So when they click on the screen or image it would read say 134-349 Then be able to save those values in an Access database. I can probably do the database part.

I just need to get the X-Y values out somehow.
I know how to do this in VB/VBA but Vbscript Helps is #!@#!$$~
Here is my code so far
-------------------------------------------
<html>
<%@ Language=VBScript %>
<head>
<title>Tampa Convention Center</title>
</head>

<%
XYValue=request.querystring(&quot;Vendor&quot;)
Dim x, y, dash
Dash = instr(1, XYValue, &quot;-&quot;)
x = Left(XYValue, 3)
y = Right(XYValue, 3)
response.write(&quot;<img src='Star1.gif' style='position:absolute;left:&quot;& x & &quot;;top:&quot; & y &&quot;'>&quot;)
%>
<script Language=&quot;VBScript&quot;><!--
Sub Grid_OnMouseDown
Set theForm = document.FrontPage_Form2
'theForm.ImageXY.value = theForm.Grid.XValue
msgbox &quot;Go it &quot; & X & &quot; - &quot; & Y
End Sub
--></script>

<form method=&quot;GET&quot; action=&quot;TradeShow2003.asp&quot; name=&quot;FrontPage_Form2&quot;>
<input type=&quot;hidden&quot; name=&quot;XY&quot; size=&quot;9&quot; Value=<%=XYValue%>>

<select size=&quot;1&quot; name=&quot;Vendor&quot;>
<option selected>Choose a Vendor</option>

<option value=&quot;280-285&quot;>American CompuSystems 511</option>
<option value=&quot;320-470&quot;>The Academy 503</option>
<option value=&quot;105-410&quot;>AIIM-Gulf Coast Chapter 202</option>
<option value=&quot;280-285&quot;>American CompuSystems 511</option>

</select>
<input type=&quot;submit&quot; value=&quot;Find booth&quot; name=&quot;Find&quot;>
<input type=&quot;text&quot; name=&quot;ImageXY&quot; size=&quot;20&quot;>

<p><img border=&quot;0&quot; src=&quot;images/TpaConCtr.jpg&quot; name=&quot;Grid&quot;></p>
<p>Copyright 2001, BarcodeONE Corporation </p>
</html>
-----------
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
got this from another forum
--------------------------------
<html>
<%@ Language=VBScript %>
<head>
<title>Tampa Convention Center</title>
</head>
<body>
<%
Dim mouseClickX, mouseClickY, XYNum
mouseClickX = CLng(Request.Form(&quot;x&quot;))
mouseClickY = CLng(Request.Form(&quot;y&quot;))
XYNum = mouseClickX & &quot;-&quot; & mouseClickY
%>
<form action=&quot;TradeShow2003.asp&quot; method=&quot;post&quot;>
<input type=&quot;image&quot; src=&quot;images/TpaConCtr.jpg&quot;>
<p><input type=&quot;text&quot; name=&quot;XYvalue&quot; Value=&quot;<%=XYNum%>&quot; size=&quot;15&quot;></p>
</form>

<p>Copyright 2001, BarcodeONE Corporation </p>
</body>
</html>
------------------------------------------ DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top