...

View Full Version : Javascript Execute Link Event?



phpinfo()
08-13-2008, 05:17 AM
I am trying to get an ibox (http://www.ibegin.com/labs/ibox/) popup to execute on a certain event. As opposed to a window.open regular popop.

I need help with the JS code after echo execJS(

Any thoughts on how to get an AJAX ibox popup to execute?




<?php

function execJS($jscode) {
$result = '<script type="text/javascript">';
$result.=$jscode;
$result.= '</script>';
return $result;
}
if($something[0]['event']=='1'&&($pi['event2']=='3'||$pi['event3']=='4'))
echo execJS("javascript:document.open('<a href=' + 'page.php' + 'rel='ibox'' '>')");
?>

phpinfo()
08-13-2008, 09:57 PM
Before I was using an AJAX prototype.js pop, where after execJS( I would just put:
winAjaxReq('information.php','','500','400','winNewMsg','Title?') and I would get a popup. But this uses a lot of js files and resources, so that is why I want to switch to ibox.

Would it be a direct input from the ibox.js http://ibegin.com/labs/ibox/ibox/ibox.js

Like:
execJS(iBoxPlugin_Document(information.php);) Something like that??

I don't care how it is coded, I would just like to get the ibox AJAX pop to execute.
if($something[0]['event']=='1'&&($pi['event2']=='3'||$pi['event3']=='4'))
echo execJS(" JS CODE GOES HERE TO GET IBOX TO POPUP");
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum