Results 1 to 3 of 3

Thread: onClick closing issues in Opera

  1. #1
    Join Date
    Oct 2012
    Posts
    150
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default onClick closing issues in Opera

    I have this option where after previewing an image, you can close it by clicking on the large image ( see an example here: http://qwikad.com/0/posts/6-services/ ). It works in all browsers except Opera. After a click, the large image is still visible, but if you begin to scroll, it disappears. Is there a way to fix it?


    Code:
    <script type="text/javascript">
                function showImage(imgName) {
                    document.getElementById('largeImg').src = imgName;
                    showLargeImagePanel();
                    unselectAll();
                }
                function showLargeImagePanel() {
                    document.getElementById('largeImgPanel').style.visibility = 'visible';
                }
                function unselectAll() {
                    if(document.selection) document.selection.empty();
                    if(window.getSelection) window.getSelection().removeAllRanges();
                }
    
    
                function hideMe(obj) {
                    obj.style.visibility = 'hidden';
                }
    
            </script>
    The onClick code goes like this:

    Code:
    onClick="hideMe(this);"

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,957
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Looks like a bug. This appears to be a workaround:

    Code:
    function hideMe(obj) {
                    obj.style.visibility = 'hidden';
                    window.scrollBy(0, 1);
                    window.scrollBy(0, -1);
                }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    qwikad.com (03-23-2013)

  4. #3
    Join Date
    Oct 2012
    Posts
    150
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    Thank you John. It's working.

    I was online for 2 hours trying to solve this on my own, why didn't I come here right away????

    Again, thank you.

Similar Threads

  1. second OnClick issues with CMotion
    By nathanimate in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-26-2012, 12:35 PM
  2. Resolved Sticky Note - Closing another open layer "OnClick"
    By Luys in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 02-05-2011, 09:36 PM
  3. Replies: 0
    Last Post: 05-25-2009, 07:09 AM
  4. Facebox Issues on Mac/Opera
    By vikram.raste in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 03-27-2008, 05:15 AM
  5. Opera rendering/display issues at scroll
    By therapiekind in forum JavaScript
    Replies: 0
    Last Post: 07-26-2006, 12:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •