I'm trying to make a GUI tool for my role playing group to use on our session.
It's writen in basic HTML and JavaScript.
Now the problem I'm having is when launching the site or "program" i want it to look lika a popup window with attributes as noresize and noscroll ect ect.
Only problems is i do not know how to do this. I'v succefully made the window resize with window.resize(x,y) on an onLoad event.
I don't want to make a popup window even if i know THAT way would be a LOT easier, i want to do this on my main window. As soon as it's loading i want it to adjust itself with the propeties of:
menubar=no;
scrollbars=no;
toolbar=no;
resizable=no;
status=no;
how would one do that? 
like self.window.menubar=no;?
			
			
									
						
							Changing Main Window Attribute like a Popup window
Changing Main Window Attribute like a Popup window
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
			
						"The best thing about UDP jokes is that I don’t care if you get them or not."
Re: Changing Main Window Attribute like a Popup window
So you want something that functions like a popup window but isn't really a popup window Or atleast better, because yaknow, pop-up blockers
Do you want it to restrict access to the content behind it or not?
If you do, then you are essentially looking for a Modal Window, if not a simple draggable div would work well. I recommend google searching for Dragable Modal Windows with Jquery (Like I said before, using jquery is far more to your benefit than trying all this with Javascript by yourself)
I like some of these: http://dev.iceburg.net/jquery/jqModal/
			
			
									
						
										
						Do you want it to restrict access to the content behind it or not?
If you do, then you are essentially looking for a Modal Window, if not a simple draggable div would work well. I recommend google searching for Dragable Modal Windows with Jquery (Like I said before, using jquery is far more to your benefit than trying all this with Javascript by yourself)
I like some of these: http://dev.iceburg.net/jquery/jqModal/
Re: Changing Main Window Attribute like a Popup window
Well popup blockers dont concern me since it will be a local program to use on our RPG sessions.
But yeah in short i want the mainwindow act lika a popup window.
I really don't feel like digging in to Jquery isn't their a way to do this with good ol' Javascript xD?
EDIT:
Modal window seams to be a child window, the problem is that i would like the main window look like a popup window/modal window.
			
			
									
						
							But yeah in short i want the mainwindow act lika a popup window.
I really don't feel like digging in to Jquery isn't their a way to do this with good ol' Javascript xD?
EDIT:
Modal window seams to be a child window, the problem is that i would like the main window look like a popup window/modal window.
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
			
						"The best thing about UDP jokes is that I don’t care if you get them or not."
Re: Changing Main Window Attribute like a Popup window
Jquery is a framework to make ajax stuff easier to use and let you complete your project faster. It gives you one highly reusable source file that significantly detracts from the amount of rewriting you have to do for common functions, and while its good to learn Javascript Jquery is NOT hard and I it is my general recommendation to newbies. And you don't have to dig into it, you simply link the script file and write out dramatically smaller code.
That said, if you want to do it the long and hard way, you can call:
to spawn a modal dialog, but this is a popup window. It will meet your display criteria though. 
If you want to make ones that are nice and actually a part of your main page using JS you would have to do something like....
http://www.hunlock.com/blogs/Javascript_Drag_and_Drop <- That.
Bringing me back to why we use libraries, reinventing the wheel is nice. But unless you have something to gain from it, its foolish.
EDIT: So you WANT an actual popup window. Not a window in the main window.....
Read this: http://www.pixel2life.com/publish/tutor ... up_window/
			
			
									
						
										
						That said, if you want to do it the long and hard way, you can call:
Code: Select all
 window.showModalDialog( - HTML FILE HERE - ); If you want to make ones that are nice and actually a part of your main page using JS you would have to do something like....
http://www.hunlock.com/blogs/Javascript_Drag_and_Drop <- That.
Bringing me back to why we use libraries, reinventing the wheel is nice. But unless you have something to gain from it, its foolish.
EDIT: So you WANT an actual popup window. Not a window in the main window.....
Read this: http://www.pixel2life.com/publish/tutor ... up_window/
Re: Changing Main Window Attribute like a Popup window
No i dont want a popup or a window in a window 
I guess it was harder to explain than i thought :O but i will try.
I want the main window to look lika a popup window. making it only one window that looks like(close) to a game window or any other application windows. Much like a popup window but the main window instead. I want to give the main window propeties on the onLoad.
 Much like a popup window but the main window instead. I want to give the main window propeties on the onLoad.
like onLoad=javascript:window.resizeTo(800, 600); // And more parameters but it seams it dosn't work with resize and other parameters so i'm turning to the comunity.
			
			
									
						
							
I guess it was harder to explain than i thought :O but i will try.
I want the main window to look lika a popup window. making it only one window that looks like(close) to a game window or any other application windows.
 Much like a popup window but the main window instead. I want to give the main window propeties on the onLoad.
 Much like a popup window but the main window instead. I want to give the main window propeties on the onLoad.like onLoad=javascript:window.resizeTo(800, 600); // And more parameters but it seams it dosn't work with resize and other parameters so i'm turning to the comunity.
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
			
						"The best thing about UDP jokes is that I don’t care if you get them or not."
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Changing Main Window Attribute like a Popup window
The best option for an easy, faux pop-up window is Graybox for jQuery. I have already made a post on how to make one in about 4 or 5 simple steps and about 6 lines of code in this thread. It actually is a popup-style "window in a window", but it looks just like a real new window pop-up. It doesn't get caught by any pop-up blockers.
			
			
									
						
							The indelible lord of tl;dr
			
						Re: Changing Main Window Attribute like a Popup window
But i don't want to make a "popup" window xD
It feels lika you are misunderstanding what i want (Maybe I'm not clear enough )
)
Ok ok this seams to be hard so i can go with an easier approach.
Forget my earlier attempts to explain and lets try a new thing then.
Is their any way i can open a popup window then close the main window? something like
onLoad = "javascript:window.open(parameters);javascript:self.window.close();"
On the load of the mainpage i wan't to open a popup then close the mainwindow so the only window left is the popup, is that possible?
			
			
									
						
							It feels lika you are misunderstanding what i want (Maybe I'm not clear enough
 )
)Ok ok this seams to be hard so i can go with an easier approach.
Forget my earlier attempts to explain and lets try a new thing then.
Is their any way i can open a popup window then close the main window? something like
onLoad = "javascript:window.open(parameters);javascript:self.window.close();"
On the load of the mainpage i wan't to open a popup then close the mainwindow so the only window left is the popup, is that possible?
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
			
						"The best thing about UDP jokes is that I don’t care if you get them or not."
Re: Changing Main Window Attribute like a Popup window
Before I help, why would you want that? and I think you can only close the tab, I for one hate sites that resize or do anything to my browser windows though.
			
			
									
						
										
						Re: Changing Main Window Attribute like a Popup window
As i tryed to say before it's not for being online. It's a local tool to use for my RPG group(Game Master).
Theirfore i wanted to make it look a bit more "programy" than browsery.
My first intention was to make the "browser" to one small "popup"-window by resizing it and fixing it with no scrolling ect ect. But i do not know if this works since i found it hard to explain since you didnt get it.
I then changed my approach by openening an actual popup window when loading the page then closing the main browser window, only leaving the popup window left. I know this works BUT i do not know how to close the browser/mainwindow without closing the popup. I can do it manually(open a popup then close the browser/mainwindow/tab) but i wan't it to be automatically.
			
			
									
						
							Theirfore i wanted to make it look a bit more "programy" than browsery.
My first intention was to make the "browser" to one small "popup"-window by resizing it and fixing it with no scrolling ect ect. But i do not know if this works since i found it hard to explain since you didnt get it.
I then changed my approach by openening an actual popup window when loading the page then closing the main browser window, only leaving the popup window left. I know this works BUT i do not know how to close the browser/mainwindow without closing the popup. I can do it manually(open a popup then close the browser/mainwindow/tab) but i wan't it to be automatically.
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
			
						"The best thing about UDP jokes is that I don’t care if you get them or not."
Re: Changing Main Window Attribute like a Popup window
How does something look programy?
You basically want a box that they can't move, can't resize or anything like that? You can't do that with just the browser anymore unless you use a veerry old browser.
http://www.456bereastreet.com/archive/2 ... p_windows/
You'd have to make an application.
			
			
									
						
										
						You basically want a box that they can't move, can't resize or anything like that? You can't do that with just the browser anymore unless you use a veerry old browser.
http://www.456bereastreet.com/archive/2 ... p_windows/
You'd have to make an application.


