Today after along period writing a post. I tried a new javascript library called modalbox js. Was working very good, but i had to run other javascript when the box was closed. Found some help at http://code.google.com/p/modalbox/wiki/MethodsReference but didn’t found the exact syntax.
After some trial and error finally succeeded, so thought to post on to the blog. Here is the syntax for javascript as well as for symfony (in case you are working with symfony)
Syntax for symfony:
<?php echo m_link_to(‘link_name’,
‘url’,
array(‘title’ => ‘title’),
array(‘width’ => 630, ‘height’ => 180, ‘afterHide’ => ‘afterhidealert‘)); ?>
here afterhidealert is the javascript function that will be called on the closing of the modalbox popup.
Syntax for javascript:
<a href=”url” onclick=”Modalbox.show(this.href, {afterHide:afterhidealert, height:180, title:this.title, width:630}); return false;” title=”title”>link_name</a>
here afterhidealert is the javascript function that will be called on the closing of the modalbox popup.
Thanks,
samsami2u
Hello, I found this blog article while searching for help with JavaScript. I’ve recently changed browsers from Google Chrome to Mozilla Firefox 3.1. Just recently I seem to have a issue with loading JavaScript. Everytime I browse website that needs Javascript, my computer does not load and I get a “runtime error javascript.JSException: Unknown name”. I cannot seem to find out how to fix the problem. Any aid is greatly appreciated! Thanks
As you are getting javascript issue not with some specific website, i guess the issue may be with your browser. I would suggest you to download the latest firefox mozilla browser (v 5.3.8 or more). You can try this link to download it : http://www.mozilla.com/en-US/products/download.html?product=firefox-3.6&os=win&lang=en-US