Groups | Blog | Home
all groups > asp.net > july 2004 >

asp.net : ASP.NET Popups


jack
7/31/2004 9:31:12 PM
Hello,

I am tring to use a Popup to open a texteditor and then press a save button
on the popup window and have the text go back to parent windows in a
textbox. I have seen calender popups that do this, but can't find how to
convert them.

Thanks for any help,

Jack

Mark Rae
8/1/2004 8:56:11 AM
[quoted text, click to view]

There was a discussion here about this recently. When you say "popup" are
you referring to a new browser window opened by the JavaScript
showModalDialog method, or merely something which "appears" in the browser
window at the click of a button?

If you mean a modal dialog, that's going to need a bit of thinking about
first, because it only works with IE, AFAIK. Also, if you're hoping to
submit the dialog back to itself in order to do some server-side processing,
you're going to need to "wrap" it in an iframe otherwise it will submit to a
new non-modal window.

Another option might be to include a real text editor on your page e.g.
http://www.freetextbox.com. and forget about a popup.

jack
8/1/2004 10:19:17 AM
Hello,

Thanks for the replies. I want a seprate window to pop up and be able to
type text into a textbox on that new windows. Then Press submit and the new
window close and put the what has in the textbox into the textbox on the
parent window. The popup text box will have editing features that don't
what to clutter up the main window with.

Thanks,

Jack

[quoted text, click to view]

Eliyahu Goldin
8/1/2004 10:43:43 AM
Jack,

You have to do it on client side with a bit of javascript programming. Look
at function showModalDialog.

Eliyahu

[quoted text, click to view]

Dale
8/1/2004 11:26:41 AM
There are a couple of ways to do what you're looking for but I agree the
best is going to be the showModalDialog method. Though the answer to your
question seems to be agreed on, I wanted to give you some of the reasoning
and considerations in coming up with that solution.

The modal dialog box is different from what you see in most calendar
controls. Most calendar controls are created using DHTML and DIV objects.
That is the problem with most calendar controls...Because they're DIVs they
are children of the main window. When the div pops up over an object that
is its own window, such as a <SELECT> element, then the <SELECT> element
shows through the calendar.

The advantage of the DHTML method is that, to varying degrees of success and
difficulty, it can be made to work in Mozilla and IE based browsers. The
other two methods are IE only solutions.

The modal dialog is, in my opinion, ugly. It has to have the "chrome"
around it.. ie. buttons, borders, and title bar and that "Web Page Dialog"
phrase in the title, no matter what you do.

The createPopup won't implement most user interaction in HTML. It won't
respond to HTML Anchors, won't accept input typed into input text boxes,
etc. You can do a lot of interactive work as long as it is all done by
mouse clicks by creating hyperlinks as spans with mouse click events and
setting the cursor to a hand onmouseover and back to pointer onmouseout.
You can simulate buttons by images with click events handled in the code of
the popup.

Dale Preston
MCAD, MCSE, MCDBA





[quoted text, click to view]

Ken Dopierala Jr.
8/2/2004 10:23:03 AM
If you go with the showModalDialog then you just need to put this line in
your <Head> tag to make it post back to itself. <BASE target="_self"> Good
luck! Ken.


[quoted text, click to view]

Lau Lei Cheong
8/2/2004 2:35:39 PM
Look at window.prompt() method of javascript.

"jack" <jack@mrolinux.com> ¦b¶l¥ó
news:%23rJ7Yr9dEHA.3616@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
[quoted text, click to view]

AddThis Social Bookmark Button