![]() |
Need some javascript help
I have a popup window which uses an animated DIV that a customer want's to only show on certain day's, I've got the day of the week (number) from using
Code:
<SCRIPT LANGUAGE="JavaScript">Code:
<script language="JavaScript">thanks. |
Re: Need some javascript help
Basic syntax is as below:
Code:
<SCRIPT LANGUAGE="JavaScript"> |
Re: Need some javascript help
Ok my revised code:
index.htm //File that loads the script Code:
<SCRIPT LANGUAGE="JavaScript">newwindow.htm //contents of the popup Code:
<SCRIPT LANGUAGE="JavaScript"> |
Re: Need some javascript help
Quote:
The popup isn't actually a new window as such, it's a div and it's part of the page so it can't appear in a new window. |
Re: Need some javascript help
Yeah, i decided not to encapsulate your code into doc.writes aswell!!!
so I opted for a new window angle, see above ;) |
Re: Need some javascript help
Also, if you want to do 2 or 5 or 7, you can do it like this:
if ((var ==2) || (var == 5) || (var == 7)) { //display window } Just for reference, if you want two vars to be certain values, you can use && for and |
Re: Need some javascript help
It's ok, now he's decided he wants the DIV to show based on a cookie ... so this can be closed I guess, sorry for wasting your time :(
|
Re: Need some javascript help
np :)
|
Re: Need some javascript help
If it's one of those blasted DIV pseudo popups, tell him it won't win any friends!
http://www.kephyr.com/popupkillertest/index.html - Test your browser and blocker against many popups and variants here - if you can get a clean slate against some of the obscure variants, you're probably running Mozilla! |
Re: Need some javascript help
Quote:
|
Re: Need some javascript help
Quote:
Just like those annoying adverts that popup over the text of the page you're reading on some sites. |
| All times are GMT. The time now is 00:51. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum