return false not working in IE

Discussion in 'Javascript' started by iswariak@gmail.com, May 31, 2007.

  1. Guest

    Hi

    I am displaying the thumbnails using DOM. I want to display the
    enlarged image when we click the thumbnail. The "return false"
    statement is not working in IE. When we click the thumbnail in IE both
    the parent window and popup show the enlarged picture.

    Thanks
    Iswaria

    ------------------------
    Code
    ------------------------

    var createanchor = document.createElement("a");
    createanchor.href = "../collection/" + pname;
    createanchor.className = "imginfo";
    var svalue = "displayDetails('" + filename + "', '" + pname + "', '" +
    i + "'); return false;";
    alert (svalue);
    createanchor.onclick = new Function( "displayDetails('" + filename +
    "', '" + pname + "', '" + i + "'); return false;" );

    displayDetails is a function to display a popup

    function displayDetails(filename, photopos, rowid) {

    width = 800;
    height = 600;

    var options = "scrollbars=no, toolbar=no, menubar=no, location=no,
    resizable=yes, status=no, width=" + width + ", height=" + height + ",
    left=0, top=0";
    pop = window.open(url, 1, options);
    pop.document.write("<html>");
    pop.document.write("<head><title>Image</title></head>");
    pop.document.write("<body style='margin:0;padding:0'>" );
    pop.document.write("<img src='" + url + "' border='0' alt=''>");
    pop.document.write("</body></html>");
    pop.document.close();
    pop.focus();
    }
     
    , May 31, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. André
    Replies:
    3
    Views:
    1,603
  2. =?Utf-8?B?c3Jpbml2YXM=?=

    Return false is not working in JavaScript

    =?Utf-8?B?c3Jpbml2YXM=?=, Feb 7, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    663
    =?Utf-8?B?c3Jpbml2YXM=?=
    Feb 8, 2007
  3. w i l l
    Replies:
    4
    Views:
    244
    Dan Brussee
    Jul 4, 2003
  4. Replies:
    1
    Views:
    441
    Randy Webb
    Oct 6, 2005
  5. Replies:
    10
    Views:
    314
    Thomas 'PointedEars' Lahn
    Feb 16, 2006
Loading...

Share This Page