Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
The blogosphere saves my ass again

I'm writing a couple of asp.net pages. Nothing unusual there.

The problem is that one of these pages is shown via a 'window.showModalDialog()' in some javascript on the first.

In the dialog, when you submit a postback, it opens the result in a new window. This is annoying, nasy, incorrect, and wrong wrong wrong!!! (In this case, anyway). And i couldn't work out how to stop it from happening.

Then i found this post on this blog (I can't name the guy who writes it, because i can't find his name anywhere :)

It gives two answers to the proplem, and a third is given in the comments. For me, setting a <base target=”_self”> on the page did the trick nicely.

<Cheesy Voice>Thanks Blogosphere!</Cheesy Voice>

Listening to: bring me to life - evanescence - (3:57)
Posted: Friday, October 22, 2004 2:41 PM by Geoff Appleby

Comments

Angus Logan said:

Its funny how its such a simple thing and .NET dev's have been avoiding postbacks in dialog boxes for so long.

http://msmvps.com/anguslogan/archive/2004/10/03/14798.aspx
# October 22, 2004 2:54 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Geoff the big mouth
  • Happy Geoff
  • Sleepy Geoff
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS