Solved

Call overLIB url from XML as external function?

Posted on 2010-08-20
3
430 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

830 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