Solved

Call overLIB url from XML as external function?

Posted on 2010-08-20
3
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
This article discusses how to create an extensible mechanism for linked drop downs.
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…

726 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