want to create floating pop up

Started on the old forum in February 2014 · view the original in the archive · old links redirect here

2 replies · 285 views · started 12 years ago · 1 min read

3 participants
zong11 Developer · 98 posts #1

I have added this between <head> and </head>

<script>
// CREDITS:
// Flying popup-window: very simple configuration 
// by Peter Gehrig 
// Copyright (c) 2010 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.fabulant.com/fast/index.html

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a link to http://www.fabulant.com on the webpage 
// where this script Script will be running.

var popwindow
var tisurl
var tiswidth
var tisheight
var tistopposition
var tisleftposition
var pause=20
var step=10
var marginright
var endposition
var timer

function openpopup(thisurl,thiswidth,thisheight,thistopposition) {
	tisurl=thisurl
	tiswidth=thiswidth
	tisheight=thisheight
	tistopposition=thistopposition
	tisleftposition=-tiswidth

	popwindow=window.open(tisurl, "newwindow", "toolbar=no,width="+tiswidth+",height="+tisheight+",top="+tistopposition+",left="+(tisleftposition)+"");

	marginright=screen.width
	endposition=marginright-thiswidth-10
	movewindow()
}

function movewindow() {
	if (tisleftposition<=endposition) {
		popwindow.moveTo(tisleftposition,tistopposition)
		tisleftposition+=step
		timer= setTimeout("movewindow()",pause)
	}
	else {
		clearTimeout(timer)
	}
}
</script>

and in footer

 <A HREF="javascript:openpopup('popupwindow.html','200','200','150')">Open Pop-up</A> 

but now i have to create link for Google so whre should i have to add this url in above link. means i onclick it should show google.com in pop up

Always Help Needy Peoples !!!!!

Ghost Senior · 366 posts #2
<A HREF="javascript:openpopup('http://google.com','200','200','150')">google</A>

looks like it should do it.

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
something else Fellow · 2,296 posts #3

hmmmmmmm moving window to the left o.O

a lot easier code and less code would be:

Click here

note: left and top dont work on all browsers.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close