Forum Moderators: open

Message Too Old, No Replies

Pop up box

Size a pop up box and close when something is selected

         

Sandi_W

9:46 pm on Apr 18, 2002 (gmt 0)



I want to create a pop-up box for an application that I am working on. It will give the user several options. Upon choosing one of the options, I want the pop-up to close. Can anyone help?

engine

9:52 pm on Apr 18, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi Sandi_W,

Does this help?

<INPUT TYPE="BUTTON" VALUE="select here" NAME ONCLICK="closeIt()"

tedster

9:54 pm on Apr 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



self.close() or window.close() are the methods. Call one of them when the user's choice is made - add it to whatever method you are using to record the selection.

jatar_k

9:54 pm on Apr 18, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it depends on what else is going on, if you are putting a url in the window that called it you could do something like this (i think)

put the function call in the onClick of the link

function changeParent (newUrl)
{
parent.location = 'newUrl';
self.close;
}

<added>nice little flurry of posts

Sandi_W

9:56 pm on Apr 18, 2002 (gmt 0)



Thanks so much for the fast response.