Return Values for onclick-Invoked popups
via the
overlibmws DHTML Popup Library
 
maintained by Foteos Macrides at Macrides Web Services
Discuss these examples, seek help, and offer suggestions
for onclick support via the
overlibmws Support Group.

Click Me!!!
For invoking overlib popups one normally specifies "return overlib(...);" in the values of event attributes (e.g., onmouseover), so that overlib's internal code determines the return value.  However, when an overlib popup is invoked via the onclick event attribute and that popup will contain an image, or an imported document for an iframe or object, or the parent document has an active process such as an embedded audio or video, one should force a return value of false:

onclick="overlib(...); event.returnValue=false; return false;"

to ensure that loading of the image or imported document or the playing of the embedded audio or video will not be interrupted.  If your href is not "javascript:void(0);" but instead a URL for another document, and the image for your onclick popup content is some kind of "Wait while loading ..." graphic, then use simply

onclick="overlib(...);"

with no return value at all.  One similarly need not use a return value when an overlib popup is invoked via an onload attribute in the body start tag.

Note that you also can use onclick="overlib(...); event.returnValue=false; return false;" as a way to present an informational popup for downloading a file while blocking a direct display of that file, as illustrated via this link with an href for an MS Word document:
Click Me Too!!!

Use your browser's View Source option to see the markup for these examples.


These examples use overlibmws and its commands.


Copyright Foteos Macrides
  2002-2010.
  All rights reserved.
Click to Donate