Loading ...
Sorry, an error occurred while loading the content.

Onload event call to overlib and another function causing conflict?

Expand Messages
  • docdudeus
    Ellinika, Fote, I ve got a page where I m using javascript to essentially save form data before it is submitted in a cookie array. The call to the save data
    Message 1 of 1 , Feb 19, 2006
    • 0 Attachment
      Ellinika,

      Fote, I've got a page where I'm using javascript to essentially save form data before it is submitted in a cookie array. The call to the save data function is via an onunload event in the <body> tag.  The call to the  recall data is in the onload event also in the <body> tag.  The problem occurs when the body tag containing the onload event that invokes both the overlib function and the recall data function are fired at the same time.  Only overlib will fire, since it is listed first in the event call. Vice versa if the recall function is listed first.

      See below the <body> tags.  BTW the <body> is embedded in a php conditional that determines if a message has been generated or not, one contains overlib the other does not:

      <? if(!empty($_REQUEST['msg'])) $eg_error['msg']=$_REQUEST['msg']; ?>
      <? if(!empty($eg_error)) { ?>
      <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="return overlib('<?if(!empty($eg_error)){?>&lt;ul&gt;<?foreach($eg_error as $eg_message){?>&lt;li&gt;<?= @$eg_message ?>&lt;/li&gt;<?}?>&lt;/ul&gt;<?} ?>', BUBBLE,  BUBBLETYPE, 'oval', STICKY, STATUS, '<?if(!empty($eg_error)){?><?foreach($eg_error as $eg_message){?>  <?= @$eg_message ?><?}?><?} ?>',TEXTCOLOR, '#FF0000', TEXTSIZE, 2, FILTER, FILTERSHADOW,1,FILTERSHADOWCOLOR,'purple', REF,'newfox', REFC, 'LL', REFY, -20, REFX, 40); recoverInputs(document.forms.Form1,retrieveCookie('iki'),true); " onunload="setCookie('iki',getFormString(document.forms.Form1,true));">
      <? }
       else {?>
       <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="recoverInputs(document.forms.Form1,retrieveCookie('iki'),true);"  onunload="setCookie('iki',getFormString(document.forms.Form1,true));">
      <? } ?>

      <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>  

      Any ideas?

      Also, will the overlibmws bubble superimpose over a .swf movie.  It works fine in Internet Explorer but not in Firefox, imagine that!  I've played with the zlib parameter but no go with Firefox.

      To see the difference:

      With FF: http://www.jeffexes.com/newtemplate/index.php?errmsg=Any query!!!

      With IE: http://www.jeffexes.com/newtemplate/index.php?errmsg=Another query!!!

      Thanks,

      John.



    Your message has been successfully submitted and would be delivered to recipients shortly.