TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 30, 2024, 07:42:20 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 147
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 123
  • Total: 123

JavaScript Pop-Under Window

Started by tim antley, January 01, 2007, 10:57:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ianedres

To display a 'pop-under' window and load any HTML file:

In TP, add a new block, using the 'scriptbox' option and inserting this code:

<script type="text/javascript">
var win=window.open("http://www.yourserver.com/correct_path_to/filename.htm",null,"height=275,left=330,location=no,status=no,resizeable=yes")
win.blur()
window.focus()
</script>


Replace the path to the file you wish to load.

I opt not to display any frame/title info in TP's settings, but I do use the title field for reference.

Make sure to turn the block on in TP.

Using different permissions in multiple blocks, you could display various HTML files to each different level; i.e. guests receive a prompt to register, regular users and above get a jukebox in the background... and so forth.

I strongly encourage you to limit your use of the code, as not to annoy your visitors.