![]() | ![]() |
| The code for a basic console: (note - you can highlight the code and press ctrl+c to copy it) |
|
<script language="JavaScript"> window.open("nameofpopup.html", "window_name", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=300, height=300, top=100, left=100"); </script> |
| Breaking down the various parts of the code: |
|
The first part, "nameofpopup.html", is where you define the URL of the file that will appear in the popup window. You can enter the full URL of the filename here if you like. For example, this element can look like this: "http://www.whateverdomain.com/nameofpopup.html". The second part "window_name", names the window. This is important only if you plan on popping multiple windows. By using different names here, you keep all of your pop-ups from popping in the same new window by using different names for each one popped. The 3rd part "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=300, height=300, top=100, left=100" defines various attributes of your console window.
toolbar includes or omits a toolbar in the new window.
|
| Where to place the code: |
|
You can place this piece of script anywhere between your <head> </head> tags or anywhere between your <body> </body> tags. Either location will work fine.
|
| A working demonstration of a basic console: |
|
Example of a basic console.
|