Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Popup window not working properly in IE6

Reply
Thread Tools

Popup window not working properly in IE6

 
 
Terren
Guest
Posts: n/a
 
      09-26-2005
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=n o,menubar=no,scrollbars=yes,resizable=no,width=600 ,height=600,left=300,top=300')"
& """" & ">" & left(tempdesc,50) & "....</a></td>"

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      09-26-2005
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) ups.com...
> 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=n o,menubar=no,scrollbars=ye
s,resizable=no,width=600,height=600,left=300,top=3 00')"
> & """" & ">" & left(tempdesc,50) & "....</a></td>"
>



 
Reply With Quote
 
 
 
 
Paul DU PLESSIS
Guest
Posts: n/a
 
      09-26-2005
Thanks that worked. It is always the simple things

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-26-2005
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.


 
Reply With Quote
 
Terren
Guest
Posts: n/a
 
      09-27-2005
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

 
Reply With Quote
 
Terren
Guest
Posts: n/a
 
      09-28-2005
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.

 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-28-2005
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect popup window in IE6 lrlebron@gmail.com Javascript 3 06-13-2007 10:16 PM
Popup window will not close on IE6 XP_SP2 after postback Drew Berkemeyer ASP .Net 7 10-24-2004 11:20 AM
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Popup window properly when SmartNavigation = True Grey ASP .Net 0 06-29-2004 08:10 AM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments