Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

You know the Hotmail popup dialogs....

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Anyone know how to do them.

If you don't know what I mean, login to your Hotmail and empty your trash and a confirmation dialog pops up - it only has an "X" button to close, you can't refresh, resize, maximize, right click, view source etc. I would like to do something like this...
 
It's a Javascript alert or a javascript confirm, look at this code:

<form name=myform>
<input type=button value="Format Hard Drive"
onClick="if(confirm('Format the hard disk?'))
alert('You are very brave!');
else alert('A wise decision!')">
</form>

You can set the actions of each outcome to do pretty much anything you want from set a variable to show an output or re-direct to another page or even post to another page.

Hope this helps!

NATE


mainframe.gif


Got a question? Search G O O G L E first.
 
it's a simple javascript function that first opens the window in fullscreen then resizes it to the dimensions you need.

however, if you install SP2 for xp, you won't get windows without the statusbar and margin! - this is no longer permitted

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
DaZZleD,

What are you talking about? He's wanting the javascript confirmation when you empty your trash, that's just a JS confirm script.

NATE


mainframe.gif


Got a question? Search G O O G L E first.
 
you probably don't use hotmail.

it's a window without borders, status bar, menubar, address bar... etc

it's in NO WAY a confirmation dialog.

make an account there just for test and you'll see. it's a window opened using window.open in fullscreen mode, then it has its dimensions reduced to that of a small window. this way you won't get the window title bar either.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I use hotmail, it's my primary email. And you are not correct it is not a popup window that resizes and I can prove it's not:

1 - look at the actual hotmail code and you will see
2 - if it were a popup then my popup blocker would have shut it down
3 - if my popup blocker is turned off then it would open in a new tab in mozilla b/c I have it set to open all windows and popups in a new tab
4 - if you re-construct the above code I posted minus the alerts you will get the EXACT same window with the same icon for the confirm, 2 buttons for Ok and Cancel, a choice to X the window and the titlebar in the dialog saying [Javascript Application]

NATE


mainframe.gif


Got a question? Search G O O G L E first.
 
I concur with Nate.
It is absolutely, definitely and unequivica... (can't spell that) a Javascript alert confirmation dialog box... in Firefox anyway.

In IE the box looks different to a "normal" Javascript dialog.
This may be down to my having recently installed SP2 or it may be that the page behaves differently for MS browsers than it does for Firefox.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
ok, that sounds interesting, so they've skinned a confirm box to look like a normal window (for IE users anyway)... anyone done something like this before?
 
No, I didn't mean that.

I meant that they may serve up different code depending on what browser visits the site.
So for non IE browsers they do a standard Javascript dialog.

For IE though, it's something else.
I just tested it and made my own javascript dialog box. It looks different to the one served by Hotmail.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
Thanks Foamcow,

Yes after looking at the source again I realise that they do show different things based on the browser. I use Firefox and it's absolutely a JS confirmation. However, I took a look at IE and it's absolutely NOT a confirmation. So my appologies to you Dazzled, but, we were both right ;-)

Anyway, DeepBlerg,

Seeing as how you are new to this just stick to a basic JS confirmation it is very easy to do then if you want to get fancy and do a popup like in IE then feel free to after you get the hand of the basics.



NATE


mainframe.gif


Got a question? Search G O O G L E first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top