|
-
Mar 19th, 2008, 11:42 AM
#1
Thread Starter
Giants World Champs!!!!
[RESOLVED] Drawing on an Image
I have an image that I will be displaying on a page. I want to be able to first allow the user to click on parts of the image where they want a dot to appear, then I want to take the location of where they placed the dot and store it in a database. Can any one point me in the right direction?
I currently have a VB6 app where I am able to do this but the powers to be want me to develop a web app that will allow the user to do the same thing.
Any ideas?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Mar 19th, 2008, 12:02 PM
#2
Re: Drawing on an Image
Won't be easy... You'd likely have to use JavaScript to retrieve the location of the mouse when it's clicked, then do a postback and redraw the image... it'd be slow at best, even with AJAX.
-
Mar 19th, 2008, 12:13 PM
#3
Thread Starter
Giants World Champs!!!!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Mar 19th, 2008, 12:32 PM
#4
Re: Drawing on an Image
If you make the image an image that submits (<input type="image">) then when the form is submitted, you should get an x and y coordinate along with the other parameters. You could use that.
-
Mar 19th, 2008, 01:04 PM
#5
Thread Starter
Giants World Champs!!!!
Re: Drawing on an Image
Could you show me a brief example and would I be able to display multiple dots?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Mar 19th, 2008, 01:53 PM
#6
Hyperactive Member
Re: Drawing on an Image
Could you use javascript to drag and drop actual "dots" on the image?
At the end of the operation you could capture and add the end coordinates of the dropped image to a hidden control.
You could have more control over the op
This works in IE, FF,Safari
Drag N Drop
-
Mar 20th, 2008, 02:25 AM
#7
Re: Drawing on an Image
Put this in a sample .html page, then click on the image
Code:
<form method="get" action="receive.aspx">
<input type="image" src="http://www.vbforums.com/image.php?u=45441&dateline=1201007640" value="test" />
</form>
Then look at the URL.
-
Mar 20th, 2008, 07:26 AM
#8
Thread Starter
Giants World Champs!!!!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Mar 20th, 2008, 11:24 AM
#9
Re: Drawing on an Image
No prob, if that solved things, resolve the thread, else, ask more questions!
-
Mar 20th, 2008, 11:38 AM
#10
Thread Starter
Giants World Champs!!!!
Re: Drawing on an Image
Ok, I am testing the code now. Thanks again!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|