Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Locating clicked object on web page (Read 1844 times)
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Locating clicked object on web page
Jan 3rd, 2007 at 11:21pm
Print Post  
Hi,

I have a WinForms application that our data modellers are using to generate database diagrams.

These diagrams are being exported through Xml Serialization to a web server where they are being DeSerialized into a WebChart.FlowChart and a graphic is being displayed on a webpage.

My intention is to build this webpage as a data dictionary, with all elements on the chart (arrows, tables, possibly columns) all having drill through functionality, however am having a hell of a time locating the exact point or even creating an image map.

I have tried the ClientToDoc method as well as using HtmlBuilder to generate an image map.

I know (through debug) that the FlowChart I send to the constructor of HtmlBuilder has Tables and Arrows in it, however I always end up with an empty <MAP id="map1"></MAP> tag. Is there something I am not understanding correctly?

Basically, what is the best way to locate either an object or a point on a generated flowchart image when clicked on a webpage (we can assume that the flowchart object is in the Session memory).

Thanks
JC
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: Locating clicked object on web page
Reply #1 - Jan 4th, 2007 at 2:29am
Print Post  
Hi,

Realised I had to set hyperlink on FlowChart Objects before the HtmlBuilder Map worked properly. Embarrassed Makes sense.

However, is it possible to get an accurate flowchart click point on a clicked image?

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Locating clicked object on web page
Reply #2 - Jan 4th, 2007 at 6:02am
Print Post  
Hi,

You could use server side image maps. Add an "ismap" attribute to the IMG tag, and put the IMG inside an A tag. Then the browser should append the mouse coordinates as a query string to the HREF URL when a user clicks on the image, and you can process the coordinates on the server. E.g.

<a href="imagemap.aspx"><img ... ismap="ismap">

will result in URL with query strings such as

http://yourserver/imagemap.aspx?33,44

On the server side call ClientToDoc to get the flowchart coordinates of the passed point, and call GetBoxAt to see if any box has been clicked.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: Locating clicked object on web page
Reply #3 - Jan 5th, 2007 at 12:30am
Print Post  
As usual you have, of course, helped.

Thanks, yet again. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint