Forum Moderators: open

Message Too Old, No Replies

Non-Java Pop-ups

Is there any other way to make a costomized user-triggered pop-up window

         

Jay_R

4:25 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



Forgive my ignorance but,
I was wondering if there are other ways to make a tailored pop-up browser window. I'm used to using JavaScript, but I want something that will work in browsers without JS enabled.

Of course there's always target="_blank", but I want to control the size of the little bugger..

Thanks,
-Jay_R

korkus2000

5:02 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not something crossbrowser. You can use modal boxes in IE. You could also look at a layer inside the window using CSS, but I think to flip it on and off you would need js.

Jay_R

6:29 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



Much appreciated, I was afraid that was the case. I guess I'll have to figure something else out or alienate some folks...
Thanks,
-Jay_R

PatrickDeese

6:40 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



there are a couple scripts for pop-ups that use target=_blank, and only use JS for resizing - that seems to work pretty well if the user has JS deactivated.

john_k

6:54 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can write the link in the HTML as if the user doesn't have javascript. Then use javascript called from the onLoad event to change the link attributes.

Jay_R

6:56 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



That's clever, wonder what's the best way to set that up.

Thanks,
-Jay

Jay_R

7:09 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



Mmmm tasty... I appreciate the help. I don't know enough about JS yet to pull it off myself, but I have Goodman's cookbook here so I can probably pull it all together... Thanks for the direction..

-Jay_R

john_k

7:09 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




<html>
<head>
<script language="javascript">
<!--
function setLinks()
{
var oLink=document.getElementById('helpLink');
oLink.target='_self';
oLink.href='#';
oLink.onclick=new Function('showHelp(100,100,250,300);return false;');
return;
}
function showHelp(left,top,width,height)
{
var w=window.open('help.html', 'winHelp', 'dependent=no, directories=no, fullscreen=no, width='+width+',height='+height+', left='+left+', top='+top+', resizeable=no, location=no, menubar=no, scrollbars=no, status=no, titlebar=no, toolbar=no, menubar=no');
return;
}
//-->
</script>
</head>
<body onLoad="setLinks();">
<a href="help.html" id="helpLink" target="_blank">Help</a>
</body>

[edited by: korkus2000 at 8:01 pm (utc) on June 29, 2004]
[edit reason] fixed sidescroll [/edit]

Jay_R

7:41 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



That was unnecessary but extremely nice...
Thanks John_K!
-Jay

PatrickDeese

9:23 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This code is a little shorter (not saying its better...)


<a href="file-url" target="uniquename"
onClick="window.open('','uniquename','width=size,height=size,scrollbars=no')"
target="uniquename"><IMG SRC="thumbnail.jpg" border=0 width="size" height="size" alt=""></a>

I think I "adapted" it from the NYT site about 4 years ago...