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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to be able to draw a line on top of an image 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I created a program that allows someone to find items in a warehouse

Here is a screen capture of a VB program I wrote.

I would like to do the same thing only using Internet Explorer. So I need to be able to draw a line on an image from X1,Y1 to X2,Y2.
And then be able to do this over and over.
I want to use VBScript

Any Ideas??

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Do you have a form on a diffrent page that lets the person choose what they are looking for? If so then you could use pre-built graphical lines and place them with vbscript.

<% response.write(&quot;<img src='line.gif' style='position:absolute;left:&quot;&var1&&quot;;top:&quot;&var2&&quot;'>&quot;)%>

Otherwise you could create all the line pics that you need and use javascript to show or hide them as needed.

I hope this helps some.
Roj
 
I have a slight twist on the idea now
Here is the New Page I'm working on

If you move the mouse on the Map and off again it shows a Star at 511
I would like to be able to put the star on any X-Y coordinate.

If they click the combo box to find a Vendor
then the Result could be the X-Y coordiante and show the star there.
Say the clicked &quot;American CompuSystems&quot; which is booth #511
The return info would be 101-43 which could be the X-Y coords for the star to be shown at.
Does that make sense???

using the Response.write example you had above.
Can you help me with this???
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
OK here goes, I will warn you that this is off the cuff so it may not work exactly as planned.

<%
dim xy
xy = Request.Form(&quot;xy&quot;)
if (request.form(&quot;xy&quot;)<> &quot;&quot;) then
dim x,y,first
first = instr(1,xy,&quot;-&quot;)'finding the -
x = mid(xy,1,first-1)'setting first coordinatd
y = mid(xy,first+1) 'setting second %>
end if %>
Then in the body of your code

<% if (request.form(&quot;xy&quot;)<> &quot;&quot;) then 'check for value
response.write(&quot;<img src='line.gif' style='position:absolute;left:&quot;&x&&quot;;top:&quot;&y&&quot;'>&quot;)
end if %>

The limitation here is that you will have to figure out what the top and left values are. Sorry but I do not know how to do this with x and y coordinates. So there could be a problem with diffrent resolutions and screen sizes?
 
Ok I'll check out the code
What do you recommend instead of X and Y values?? DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
I think that the only options that you have with the code I gave you is either a percentage or pixels.
 
Its still not working

here is what I have so far
I want to click on the Drop down select a vendor then show a star where their booth is

If you move the mouse over the image it shows a Star. But this is a built in thing in Front Page which just replaces an image with a mouse over.

Can anyone help DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
I checked out your code and this is one thing I noticed. Nothing is going to happen when a person clicks on the find booth button because it is not a submit button.
 
Ok thanks,
MY problem right now is getting the Value 100-200 from the Drop down box which are the pixels of the stars location to go in the response.write.....

So the star will show up there.
then pick a second vendor whose value is 300-400 and have the star show up there.

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
can you send me your email address and I will mail you a simple example of what I mean.
 
Looks good, are you going to be using a transparent background on your star though? Just curious
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top