Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Access diagram from Javascript (Read 2197 times)
mandz
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Access diagram from Javascript
May 8th, 2013 at 4:37am
Print Post  
Hi there,

I declared a DiagramView using server code:

Code (HTML)
Select All
@Html.DiagramView((DiagramView)ViewBag.DiagramView) 



and in my controller:

Code (C++)
Select All
DiagramView view = new DiagramView("view");
..........
return view; 



How can I access the diagram linked to this DiagramView from within javascript? This is what I have:

Code (Javascript)
Select All
$("#view").???? 



I would like to dynamically set the behaviour of the diagram as suggested in this post: http://mindfusion.eu/Forum/YaBB.pl?num=1327502312, but need a handle to the diagram to start of with. How do I do that?
  
Back to top
 
IP Logged
 
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Re: Access diagram from Javascript
Reply #1 - May 8th, 2013 at 6:12am
Print Post  
Try this

var diagram=$find("view");

Avoid the #.

Thanks
Kiran B

  
Back to top
 
IP Logged
 
mandz
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Re: Access diagram from Javascript
Reply #2 - May 8th, 2013 at 7:57am
Print Post  
Thanks Kiran.  It's exactly what I was looking for.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint