473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Javascript Popups - Can anyone help me fancify them?

Hello!

I've been headhunting for a javascript popup that i saw once, that when
it's called, pops open and grows from the center to its desired h and
w. Does anyone have any idea where i could start on this one? Haven't
found through googling or list searching.

Thanks!
-Brendan

Jul 23 '05 #1
8 1631
On 27 Jun 2005 15:36:16 -0700, "Donius" <ra**************@gmail.com>
wrote:
pops open and grows from the center


Are you trying to build the world's tackiest web site?
--
Nigel M
Jul 23 '05 #2
Ha ha ha ha ha...yes! Exactly!

No, but our client is stuck in the late nineties. She wants everything
moving, everything blinking and noise coming up through her speakers.
So instead of folding to *all* of her ridiculous whims, maybe if we do
some small things, we could make her happy, and if we do things like
this sparingly enough, then it could add to our site.

Jul 23 '05 #3
On 28 Jun 2005 05:17:16 -0700, "Donius" <ra**************@gmail.com>
wrote:
She wants everything
moving, everything blinking and noise coming up through her speakers.


<fx: shudder>

I'd be inclined to tell her to get someone else to do it. Are you
going to put your name on this site?

If there's one thing that makes me leave a site, it's bloody noise!
--
Nigel M
Jul 23 '05 #4
alu

"Donius" <ra**************@gmail.com> wrote
No, but our client is stuck in the late nineties. She wants everything
moving, everything blinking and noise coming up through her speakers.
So instead of folding to *all* of her ridiculous whims, maybe if we do
some small things, we could make her happy, and if we do things like
this sparingly enough, then it could add to our site.

I recall I have just such a tacky old script archived, um, somewhere -
except the window starts in the top right & grows to the bottom left to
accommodate content.
If you're serious, I'll have a look for it.
-alu
Jul 23 '05 #5
That'd be wonderful! Yes, i am serious. :)

Jul 23 '05 #6
alu

"Donius" <ra**************@gmail.com> wrote
That'd be wonderful! Yes, i am serious. :)



OK, for what it's worth, here ya go. Apologies for the long post.

option #1, goes within popup:
__________________________________________________ ____________

var doneResize= 'false'

function popupResize() {
if (doneResize== 'false') {
doneResize = 'true'
imageWidth = (document.images[0].width + 100)
imageHeight = (document.images[0].height + 100)
var popupWidth = 320; var popupHeight = 360

while ((popupWidth < imageWidth) || (popupHeight < imageHeight)) {
self.resizeTo(popupWidth , popupHeight); self.moveTo(screen.availWidth -
popupWidth - 5,5)
if (popupWidth < imageWidth) {popupWidth = popupWidth + 10}
if (popupHeight < imageHeight) {popupHeight = popupHeight + 10}
}
}
}

__________________________________________________ ____________

option #2
I found this in the same archive (doesn't look like mine, some IE-only
filter references in there),
might be more what you're after...... see form at the end for image
attributes.

__________________________________________________ ____________
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title></title>
</head>
<body bgcolor="white">
<center>

<script language="JavaScript1.2" type="text/javascript">
var winheight=100
var winwidth=100
var cat=null

// pixels to resize by per step
step=3;

function catswindows(name,width,height,title)
{

if (!document.all)
{
if (!document.layers)
{
paramstp="height="+height+",width="+width+",top=10 "+
",left=10,scrollbars=no,location=no"+
",directories=no,status=no,menubar=no,toolbar=no,r esizable=no"
cat=window.open("","cat",paramstp);
oldstr="<html><title>"+title+"</title><body
background="+name+">"+"</b"+"ody></h"+"tml>";
cat.document.write(oldstr);
if (cat.focus){cat.focus();}
return;
}
else
{
LeftPosition=(screen.width)?(screen.width-width)/2:100;
TopPosition=(screen.height)?(screen.height-height)/2:100;
paramstp="height="+height+",width="+width+",top="+ TopPosition+
",left="+LeftPosition+",scrollbars=no,location=no" +
",directories=no,status=no,menubar=no,toolbar=no,r esizable=no"
cat=window.open("","cat",paramstp);
loadpos=height/2-40
string="<html><title>"+title+"</title><body bgcolor=black><div
id=loadintxt style='position:absolute;top:"+loadpos+"px'></div>"
string1='<s'+'cript>var
animColorIndex=0;colorArray=["#FFFFFF","#CCCCCC","#999999","#666666","#3333 3
3","#000000","#333333","#666666","#999999","#CCCCC C"];'
string2='function
textLooping(){if(animColorIndex==10)animColorIndex =0;document.loadintxt.docu
ment.open();'
string3='document.loadintxt.document.write("<cente r><font size=4
face=Comic Sans MS
color="+colorArray[animColorIndex]+"><b>Loading...</b></font></center>");doc
ument.loadintxt.document.close();'

string4='animColorIndex++;};animInterval=setInterv al("textLooping()",200);</
s'+'cript>'
string5='<s'+'cript language="jav'+'ascript1.2">'
string6="function
init(){document.catpic.visibility='show';clearInte rval(animInterval);documen
t.loadintxt.visibility='hide';};"
string7="</s"+"cript>"
string8="<div id=catpic
style='position:absolute;left:0px;top:0px;visibili ty:hidden'>"
string9="<img src='"+name+"' width="+width+" height="+height+" border=0
onload='init()'></div></b"+"ody></h"+"tml>";
cat.document.writeln(string);
cat.document.writeln(string1);
cat.document.writeln(string2);
cat.document.writeln(string3);
cat.document.writeln(string4);
cat.document.writeln(string5);
cat.document.writeln(string6);
cat.document.writeln(string7);
cat.document.writeln(string8);
cat.document.writeln(string9);
if(cat.focus){cat.focus();}
return;
}
}
LeftPosition=(screen.width)?(screen.width-width)/2:100;
TopPosition=(screen.height)?(screen.height-height)/2:100;
paramstp="height="+winheight+",width="+winwidth+", top="+TopPosition+
",left="+LeftPosition+",scrollbars=no,location=no" +
",directories=no,status=no,menubar=no,toolbar=no,r esizable=no"
cat=window.open("","cat",paramstp);
string="<html><title>"+title+"</title><body topmargin=0 leftmargin=0
bgcolor=black>"
string1="<div id=loadintxt
style='position:absolute;width:100%;top:45%;text-align:center;visibility:vis
ible;font-family:Comic Sans
MS;font-size:16px;font-weight:bold'>Loading...</div>"
string2="<div id=errtxt
style='position:absolute;width:100%;top:45%;text-align:center;visibility:vis
ible;font-family:Comic Sans
MS;font-size:16px;color:red;font-weight:bold;visibility:hidden'>ERROR!!!
Please try again</div>"
string3='<s'+'cript>'+'var animColorIndex=0;'+

'colorArray=["#FFFFFF","#CCCCCC","#999999","#666666","#333333", "#000000","#3
33333","#666666","#999999","#CCCCCC"];'+
'function textLooping(){if(animColorIndex==10)animColorIndex =0;'+
'loadintxt.style.color=colorArray[animColorIndex];'+
'animColorIndex++;}animInterval=setInterval("textL ooping()",200);'
string4='function erroccur(){clearInterval(animInterval);'+
"loadintxt.style.visibility='hidden';"+
"errtxt.style.visibility='visible';}"+'</s'+'cript>'
string5='<s'+'cript language="jav'+'ascript1.2">'+
'function init(){clearInterval(animInterval);'+
"loadintxt.style.visibility='hidden';"+
'fltr.filters.item(0).Apply();fltr.filters.item(0) .Play();'+
'fltr.style.visibility="visible";}'+'</s'+'cript>';
string6='<img id="fltr"
style="filter:BlendTrans(Duration=5);visibility:hi dden" src="'+name+'"
border=0'+
' width='+width+' height='+height+' onload="init()"
onerror="erroccur()">'+
'</b'+'ody></h'+'tml>';
cat.document.writeln(string);
cat.document.writeln(string1);
cat.document.writeln(string2);
cat.document.writeln(string3);
cat.document.writeln(string4);
cat.document.writeln(string5);
cat.document.writeln(string6);

x = y = step
while (x | y)
{
cat.resizeBy (x, y)
if (cat.document.body.clientWidth >= width) x = 0
if (cat.document.body.clientHeight >= height) y = 0
}
if(cat.focus){cat.focus();}
}

function CloseCatWin()
{if(cat!=null && cat.open)cat.close()}

window.onfocus=CloseCatWin;
</script>

<p>
<center>
<form>
<input type="button" tabindex="2" value="View Image"
onclick="catswindows('image.jpg','400','450','titl e goes here'); return
false" onfocus="this.blur()">
</form>
</center>
</center>
</body>
</html>
Jul 23 '05 #7
ASM
Donius wrote:
Ha ha ha ha ha...yes! Exactly!

No, but our client is stuck in the late nineties. She wants everything
moving, everything blinking and noise coming up through her speakers.
give hers url we can try to do not come
So instead of folding to *all* of her ridiculous whims, maybe if we do
some small things, we could make her happy, and if we do things like
this sparingly enough, then it could add to our site.


http://perso.wanadoo.fr/stephane.mor...pop_zoom.shtml
it is in french
clic one of 3 1st yellow links (choice of an image)
then
clic one of 2 in 2nd line of yellow links (center or left-top origines)
--
Stephane Moriaux et son [moins] vieux Mac
Jul 23 '05 #8
Well, thanks to both of you! Those are fabulous for that, i was
looking for something simpler which i gave up and wrote on my own,
eventually. This is what i was more looking for...i can't get it to
open up in quite the right spot yet, for IE, FF, & Saf, but i'll work
on it.

Thanks so much! Sorry i didn't explain myself well enough!

function popWinGrow(new_height,new_width) {
width = 100;
height= 100;

popWin= window.open('popup.html','test',
'width='+width+
',height='+height+
',left='+((screen.width/2)-(width/2))+
',top='+((screen.height/2)-(height/2)));
while(new_width > width || new_height > height){
if(new_width > width){
width = width+(width/7); }
if(new_height > height){
height = height+(height/7); }

popWin.resizeTo(width, height);
popWin.moveTo((screen.width/2)-(width/2),
(screen.height/2)-(height/2));
}
}

Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TeknoCat | last post by:
Hey everyone, I may be repeating myself here, but if someone sent a reply then I missed it, and I can't get Outlook Express to download any messages more than 2 days old. Anyway, I'm having a...
52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
7
by: Bob Wightman | last post by:
I've had a look through the archives but cannot find anything that really answers this so... I have a menu system composed of a series of "buttons" (actually span elements) that react to the...
3
by: Marcus Otmarsen | last post by:
During the last months I obeserved a growing number of web pages with popups inside a web page. I don't know the technique by which these in-page-windows are implemented (either Javascript or...
22
by: Mason A. Clark | last post by:
I am making a page that will depend on JavaScript. Is this a problem: the viewers' browser not running JavaScript? I did a quick survey of the top of one list of Top 500 web sites in popularity...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
6
by: szabelin | last post by:
Hello, I am trying to call a function inside the javascript block from asp.net during the postback (NOT button's OnClick event handler though). The javascript function creates new popup window. I...
16
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript...
2
by: spiralof5 | last post by:
Hi. I must first say I'm not an experienced scripter. Here's my problem and how far I am so far. I struggled for awhile to get the browser to fill most of it with my flash movie and keep it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.