Solved

Call overLIB url from XML as external function?

Posted on 2010-08-20
3
408 Views
Last Modified: 2012-05-10
I'm working on an AnyGantt application and am trying to find a way to call overLIB as an external function that is launched when an object is clicked on the Gantt chart. AnyGantt is xml based and supports two click event actions: NavigateToURL and Call. NavigateToURL cannot be used because the overLIB URL would have to be entered in CDATA notation, and that notation cannot be used for attributes in XML, which leaves the Call function.

Can anybody suggest, with a simple example if possible, a way to embed an overLIB call in an external js function so that the AnyGantt xml could use something like

<action type="call" event="click" function="[name of overlib JavaScript function]" />

?

If it is possible in principle to do this, I'm not sure what the js function containing the overLIB call would look like.
0
Comment
Question by:dgmoore1
  • 3
3 Comments
 

Accepted Solution

by:
dgmoore1 earned 0 total points
ID: 33523870
After some experimentation and consultation with overLIB expert Robert Boughner I have found that it is indeed possible to execute an overLIB call in a JavaScript function. Just put the overLIB call, minus the html, in the function, using the required overLIB syntax/punctuation:

<script type="text/javascript" language="javascript">
function ol()
{
return overlib('<a href=\'http://www.bosrup.com/web/overlib/\'>Popups by overLIB</a>', RELX, 200, RELY, 400, STICKY, CAPTION,'Sticky!');
}
</script>

The ol() function executes when called by the external event and returns a popup as specified in the overLIB call. The only difference is that in this scenario overLIB does not know where the cursor is, so the popup will not be automatically displayed next to the cursor. This can be handled by using RELX, RELY in the overLIB call to specify a display location for the popup.
0
 

Author Comment

by:dgmoore1
ID: 33523883
After some experimentation and consultation with overLIB expert Robert Boughner I have found that it is indeed possible to execute an overLIB call in a JavaScript function. Just put the overLIB call, minus the html, in the function, using the required overLIB syntax/punctuation:

<script type="text/javascript" language="javascript">
function ol()
{
return overlib('<a href=\'http://www.bosrup.com/web/overlib/\'>Popups by overLIB</a>', RELX, 200, RELY, 400, STICKY, CAPTION,'Sticky!');
}
</script>

The ol() function executes when called by the external event and returns a popup as specified in the overLIB call. The only difference is that in this scenario overLIB does not know where the cursor is, so the popup will not be automatically displayed next to the cursor. This can be handled by using RELX, RELY in the overLIB call to specify a display location for the popup.
0
 

Author Closing Comment

by:dgmoore1
ID: 33523910
This solves the problme
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now