Solved

Call overLIB url from XML as external function?

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make New Browser Window Fully Functional 7 35
Horizontal Full Calendar using php 5 42
Error Handler 8 40
Not picking up custom HTML-5 elements on page? 9 22
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
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…

732 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