This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > April 2004 > Any Suggested Pop-up Replacements?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Any Suggested Pop-up Replacements?
|
|
| David B 2004-04-04, 10:30 pm |
| I'm using this script in the head section to open a pop-up window:
<SCRIPT LANGUAGE = "JavaScript">
<!--
if (navigator.userAgent.indexOf("MSIE") != -1)
{myWindow=window.open('window1.htm','thesecondwindow','height=200,width=250,status,resizable,scrollbars');
myWindow.location.href="<?php echo $periods ?>freedom/pop.php"}
//-->
</SCRIPT>
But it isn't going to be very effective with visitors who are using
pop-up killers. So, can this script be adapted to an element on the main
page itself?
Suppose I put a message inside a layer named "notice" -
<div id="notice">Please read this notice.</div>
I know how to render a layer invisible - div#notice { display: none; }
But is there some way I could make it display for visitors who are using
IE? Something like...
<SCRIPT LANGUAGE = "JavaScript">
<!--
if (navigator.userAgent.indexOf("MSIE") != -1)
{div#notice=div.open}
//-->
</SCRIPT>
If I can't do that, then maybe I could somehow rig a style sheet with
the code div#notice { display: block; } to be triggered by the visitor's
browser.
It would also be nice if I could rig something that would make it
display just once per session.
Thanks.
| |
| jjooee 2004-04-04, 10:30 pm |
|
try something like this:
http://jjooee.media3.net/popup.html
change it a bit and it'll work for all browsers..(now it will give you =
error on NN 4)
so , just check for document.layers and in that case change:
findObj('showmealways').style.visibility =3D 'visible';
into=20
findObj('showmealways').visibility =3D 'visible';
use cookies, or session variable to see if you've showed it or not...
hth
-j
> I'm using this script in the head section to open a pop-up window:
>=20
> <SCRIPT LANGUAGE =3D "JavaScript">
> <!--
> if (navigator.userAgent.indexOf("MSIE") !=3D -1)
> =
{myWindow=3Dwindow.open('window1.htm','thesecondwindow','height=3D200,wid=
th=3D250,status,resizable,scrollbars');
> myWindow.location.href=3D"<?php echo $periods ?>freedom/pop.php"}
> //-->
> </SCRIPT>
>=20
> But it isn't going to be very effective with visitors who are using=20
> pop-up killers. So, can this script be adapted to an element on the =
main=20
> page itself?
>=20
> Suppose I put a message inside a layer named "notice" -
>=20
> <div id=3D"notice">Please read this notice.</div>
>=20
> I know how to render a layer invisible - div#notice { display: none; }
>=20
> But is there some way I could make it display for visitors who are =
using=20
> IE? Something like...
>=20
> <SCRIPT LANGUAGE =3D "JavaScript">
> <!--
> if (navigator.userAgent.indexOf("MSIE") !=3D -1)
> {div#notice=3Ddiv.open}
> //-->
> </SCRIPT>
>=20
> If I can't do that, then maybe I could somehow rig a style sheet with=20
> the code div#notice { display: block; } to be triggered by the =
visitor's=20
> browser.
>=20
> It would also be nice if I could rig something that would make it=20
> display just once per session.
>=20
> Thanks.
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|