ASP.NET Popups

J

jack

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
 
M

Mark Rae

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.

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.
 
E

Eliyahu Goldin

Jack,

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

Eliyahu
 
J

jack

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
 
D

Dale

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
 
L

Lau Lei Cheong

Look at window.prompt() method of javascript.

jack said:
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
 
K

Ken Dopierala Jr.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Popups not working, even if Popups are allowed in IE 1
Help with IE6 popups needed 0
POPUPS 2
Nested modal popups 0
handling java script popups(onclick) 4
Popups in Watir 0
popups IE7 9
Java Popups 1

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top