Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-02-27 07:10:05

rylan76
Xinha Community Member
Registered: 2009-02-26
Posts: 12

Ignoring onclick clicks until Xinha is loaded?

Hi Guys

I'm using an onclick in the same page that uses Xinha:

 echo "<a onclick=\"window.open('display_large_cms_photo.php?pending_photo_id=" . $photo_row[pending_photo_id] . "', 'photo', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=800,height=600'); return(false)\" href=\"display_large_cms_photo.php?pending_photo_id=" . $photo_row[pending_photo_id] . "\">";

    if ($_SESSION['gallery_photo_area_id'] == PHOTO_AREA_ID_COMPOUND_TEXT_CONTENT)
      {
    echo "<img src=\"../" . $photo_row[pending_photo_thumb_url] . "\" width=\"" . $photo_row[pending_photo_width_px] . "\" height=\"" . $photo_row[pending_photo_height_px] . "\" border=\"0\">";
      }

    else

      {
    echo "<img src=\"../" . $photo_row[pending_photo_thumb_url] . "\" width=\"" . STANDARD_THUMBNAIL_WIDTH . "\" height=\"" . STANDARD_THUMBNAIL_HEIGHT . "\" border=\"0\">";
      }

echo "</a>";

I've noticed, however, that clicking on the above element with the "onclick" that calls window.open, WHILE Xinha is still loading on that page, WILL lock up FF2,  apparently sending it into an infinite loop from which the only way to recover is to forcibly kill the FF process.

How can I change the above onclick code to only start working once Xinha has FINISHED loading? Because once Xinha IS loaded on the page, the above onclick code works correctly.

Thanks!

Last edited by rylan76 (2009-02-27 07:10:54)

Offline

Board footer

Powered by FluxBB