Popup window not working properly in IE6

Discussion in 'ASP General' started by Terren, Sep 26, 2005.

  1. Terren

    Terren Guest

    The following code is not working properly in IE6 but it does work for
    mozilla firefox.

    I am trying to open a new popup window without affecting the frame from
    "where" it came. But what happens when I click on the link is that the
    popup window is displayed correctly but the frame then changes to my
    default.htm. It is supposed to stay the same

    here is my code

    Response.Write "<td><a href=" & """" & """" & " onclick=" & """" &
    "javascript:window.open('desc.asp?msg=" & tempdesc & "','" & rownum &
    "','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=600,left=300,top=300')"
    & """" & ">" & left(tempdesc,50) & "....</a></td>"
     
    Terren, Sep 26, 2005
    #1
    1. Advertising

  2. Terren

    Patrice Guest

    What if you try # instead of an empty string for the href attribute ?
    Or if you cancel the event ?

    I believe that IE6 goes to / because of the empty string for href...

    --
    Patrice

    "Terren" <> a écrit dans le message de
    news:...
    > The following code is not working properly in IE6 but it does work for
    > mozilla firefox.
    >
    > I am trying to open a new popup window without affecting the frame from
    > "where" it came. But what happens when I click on the link is that the
    > popup window is displayed correctly but the frame then changes to my
    > default.htm. It is supposed to stay the same
    >
    > here is my code
    >
    > Response.Write "<td><a href=" & """" & """" & " onclick=" & """" &
    > "javascript:window.open('desc.asp?msg=" & tempdesc & "','" & rownum &
    >

    "','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=ye
    s,resizable=no,width=600,height=600,left=300,top=300')"
    > & """" & ">" & left(tempdesc,50) & "....</a></td>"
    >
     
    Patrice, Sep 26, 2005
    #2
    1. Advertising

  3. Paul DU PLESSIS, Sep 26, 2005
    #3
  4. Patrice wrote:
    > What if you try # instead of an empty string for the href
    > attribute ? Or if you cancel the event ?


    Just an aside, but this is one of my pet peeves. If the user has scrolled
    the page at all, clicking on such a link will not merely fire the onclick
    handler, it will also return him to the top of the page.

    The proper solution here is to either *stop* using <a href>...

    <input type="button" onclick="dosomething()" ...>
    <span onclick="doSomething"> ... </span>

    ....or at least cancel the click event:

    <a href="" onclick="doSomething();return false"> ... </a>




    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Sep 26, 2005
    #4
  5. Terren

    Terren Guest

    Yes, you are right but I had to use href because I have a table full of
    these. Basically it is a table with abbreviated descriptions that
    "link" to the full description in the popup window. So it wouldn't look
    to good if I had 100's of buttons and I don't know how readable it
    would be as well because the abbreviation is 50 characters long

    I think I will cancel the event though.

    Thanks for all your guys help, I am well on my way to becoming a
    mediocore web programmer
     
    Terren, Sep 27, 2005
    #5
  6. Terren

    Terren Guest

    I can see you are very wise, you forsore some problems that I did
    experience, i.e with quotes,breaks. I setup another asp page with some
    general functions that would replace the breaks with <br> and the quote
    and other characters with alternatives but then I thought that this is
    crazy because I can't cater for
    every possible problem character. So what I am going to do now is pass
    the primary key for the relavant record and then I will get the
    description straight from the database in the popup window.
     
    Terren, Sep 28, 2005
    #6
  7. Terren wrote:
    > ...this is crazy because I can't cater for every possible
    > problem character. So what I am going to do now is pass the
    > primary key for the relavant record and then I will get the
    > description straight from the database in the popup window.


    That was the solution I was hoping you would see.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Sep 28, 2005
    #7
    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. Grey
    Replies:
    0
    Views:
    402
  2. Drew Berkemeyer
    Replies:
    7
    Views:
    5,886
    Steven Cheng[MSFT]
    Oct 24, 2004
  3. Jens Peter Hansen
    Replies:
    7
    Views:
    552
    Randy Webb
    Jun 19, 2004
  4. Raffi
    Replies:
    4
    Views:
    232
    Dr John Stockton
    Aug 12, 2004
  5. Detect popup window in IE6

    , Jun 13, 2007, in forum: Javascript
    Replies:
    3
    Views:
    126
    Roger
    Jun 13, 2007
Loading...

Share This Page