473,651 Members | 2,937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1643
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.image s[0].width + 100)
imageHeight = (document.image s[0].height + 100)
var popupWidth = 320; var popupHeight = 360

while ((popupWidth < imageWidth) || (popupHeight < imageHeight)) {
self.resizeTo(p opupWidth , popupHeight); self.moveTo(scr een.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=is o-8859-1">
<title></title>
</head>
<body bgcolor="white" >
<center>

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

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

function catswindows(nam e,width,height, title)
{

if (!document.all)
{
if (!document.laye rs)
{
paramstp="heigh t="+height+",wi dth="+width+",t op=10"+
",left=10,scrol lbars=no,locati on=no"+
",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
cat=window.open ("","cat",param stp);
oldstr="<html>< title>"+title+" </title><body
background="+na me+">"+"</b"+"ody></h"+"tml>";
cat.document.wr ite(oldstr);
if (cat.focus){cat .focus();}
return;
}
else
{
LeftPosition=(s creen.width)?(s creen.width-width)/2:100;
TopPosition=(sc reen.height)?(s creen.height-height)/2:100;
paramstp="heigh t="+height+",wi dth="+width+",t op="+TopPositio n+
",left="+LeftPo sition+",scroll bars=no,locatio n=no"+
",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
cat=window.open ("","cat",param stp);
loadpos=height/2-40
string="<html>< title>"+title+" </title><body bgcolor=black>< div
id=loadintxt style='position :absolute;top:" +loadpos+"px'></div>"
string1='<s'+'c ript>var
animColorIndex= 0;colorArray=["#FFFFFF","#CCC CCC","#999999", "#666666","#333 33
3","#000000","# 333333","#66666 6","#999999","# CCCCCC"];'
string2='functi on
textLooping(){i f(animColorInde x==10)animColor Index=0;documen t.loadintxt.doc u
ment.open();'
string3='docume nt.loadintxt.do cument.write("< center><font size=4
face=Comic Sans MS
color="+colorAr ray[animColorIndex]+"><b>Loading.. .</b></font></center>");doc
ument.loadintxt .document.close ();'

string4='animCo lorIndex++;};an imInterval=setI nterval("textLo oping()",200);</
s'+'cript>'
string5='<s'+'c ript language="jav'+ 'ascript1.2">'
string6="functi on
init(){document .catpic.visibil ity='show';clea rInterval(animI nterval);docume n
t.loadintxt.vis ibility='hide'; };"
string7="</s"+"cript>"
string8="<div id=catpic
style='position :absolute;left: 0px;top:0px;vis ibility:hidden' >"
string9="<img src='"+name+"' width="+width+" height="+height +" border=0
onload='init()' ></div></b"+"ody></h"+"tml>";
cat.document.wr iteln(string);
cat.document.wr iteln(string1);
cat.document.wr iteln(string2);
cat.document.wr iteln(string3);
cat.document.wr iteln(string4);
cat.document.wr iteln(string5);
cat.document.wr iteln(string6);
cat.document.wr iteln(string7);
cat.document.wr iteln(string8);
cat.document.wr iteln(string9);
if(cat.focus){c at.focus();}
return;
}
}
LeftPosition=(s creen.width)?(s creen.width-width)/2:100;
TopPosition=(sc reen.height)?(s creen.height-height)/2:100;
paramstp="heigh t="+winheight+" ,width="+winwid th+",top="+TopP osition+
",left="+LeftPo sition+",scroll bars=no,locatio n=no"+
",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
cat=window.open ("","cat",param stp);
string="<html>< title>"+title+" </title><body topmargin=0 leftmargin=0
bgcolor=black>"
string1="<div id=loadintxt
style='position :absolute;width :100%;top:45%;t ext-align:center;vi sibility:vis
ible;font-family:Comic Sans
MS;font-size:16px;font-weight:bold'>Lo ading...</div>"
string2="<div id=errtxt
style='position :absolute;width :100%;top:45%;t ext-align:center;vi sibility:vis
ible;font-family:Comic Sans
MS;font-size:16px;color :red;font-weight:bold;vis ibility:hidden' >ERROR!!!
Please try again</div>"
string3='<s'+'c ript>'+'var animColorIndex= 0;'+

'colorArray=["#FFFFFF","#CCC CCC","#999999", "#666666","#333 333","#000000", "#3
33333","#666666 ","#999999","#C CCCCC"];'+
'function textLooping(){i f(animColorInde x==10)animColor Index=0;'+
'loadintxt.styl e.color=colorAr ray[animColorIndex];'+
'animColorIndex ++;}animInterva l=setInterval(" textLooping()", 200);'
string4='functi on erroccur(){clea rInterval(animI nterval);'+
"loadintxt.styl e.visibility='h idden';"+
"errtxt.style.v isibility='visi ble';}"+'</s'+'cript>'
string5='<s'+'c ript language="jav'+ 'ascript1.2">'+
'function init(){clearInt erval(animInter val);'+
"loadintxt.styl e.visibility='h idden';"+
'fltr.filters.i tem(0).Apply(); fltr.filters.it em(0).Play();'+
'fltr.style.vis ibility="visibl e";}'+'</s'+'cript>';
string6='<img id="fltr"
style="filter:B lendTrans(Durat ion=5);visibili ty:hidden" src="'+name+'"
border=0'+
' width='+width+' height='+height +' onload="init()"
onerror="errocc ur()">'+
'</b'+'ody></h'+'tml>';
cat.document.wr iteln(string);
cat.document.wr iteln(string1);
cat.document.wr iteln(string2);
cat.document.wr iteln(string3);
cat.document.wr iteln(string4);
cat.document.wr iteln(string5);
cat.document.wr iteln(string6);

x = y = step
while (x | y)
{
cat.resizeBy (x, y)
if (cat.document.b ody.clientWidth >= width) x = 0
if (cat.document.b ody.clientHeigh t >= height) y = 0
}
if(cat.focus){c at.focus();}
}

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

window.onfocus= CloseCatWin;
</script>

<p>
<center>
<form>
<input type="button" tabindex="2" value="View Image"
onclick="catswi ndows('image.jp g','400','450', 'title goes here'); return
false" onfocus="this.b lur()">
</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_widt h) {
width = 100;
height= 100;

popWin= window.open('po pup.html','test ',
'width='+width+
',height='+heig ht+
',left='+((scre en.width/2)-(width/2))+
',top='+((scree n.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
2195
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 problem with some new pages I am creating for the Web site at www.weaverdevore.ca and I am wondering if anyone here might be able to help. Here is a full description of the problem:
52
4406
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 locally-installed application interfaces. I understand some people object, on grounds having nothing to do with disabilities, to links that generate new browser windows. I don't know what the basis of their objection is, but I wonder whether the same...
7
2198
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 usual onMouseOver; onMouseClick & onMouseOut events. I wish to have descriptive popups associated with each button that are shown using the onMouseOver event. Now I can do this with one caveat: if I scroll the page down and hover the mouse over a...
3
6741
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 HTML?). They contain a "close" resp. "x" button/link to click them away. They are however not detectable by "normal" popup blockers. How can I otherwise turn these popup windows automatically (!) off otherwise? Marcus
22
2800
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 -- my javascript turned off. Almost no problem in simply viewing the pages but I did *not* test any dynamics. JavaScript was used for some purpose on almost
136
9301
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
6
751
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 register the javascript code with the RegisterClientScriptBlock. How how do I call the javascript function inside the block from within C# asp.net page. (yes I know popups are bad, please do not reply if you
16
2321
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 on the same page work correctly. It appears to be isolated to 1-2 machines in a particular network. I cannot verify whether these machines have had virus/spyware scans, but I do know the user is running Firefox 2.1 and IE 7 with the same...
2
1792
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 proportional if the user chooses to size up or size down. This pretty much takes care of the browser size complications. Here is original script and it works. But now I have few problems after this. CODE#1 <!-- masked --> <html> <head>...
0
8357
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7298
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.