473,395 Members | 1,504 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,395 software developers and data experts.

Checkbox - show <div> when checked, or perform <meta refresh> if not checked

I have a web page that uses the following JavaScript to hide a <div> unless the checkbox is checked:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function showMe (it, box) {
  3. var vis = (box.checked) ? "block" : "none\
  4. document.getElementById(it).style.display = vis;
  5. }
  6.  
I need to have it where if the box is not checked with 10 seconds, then a <meta refresh> is initiated, and the user is redirected to another page.

[HTML]<meta http-equiv="refresh" content="10;url=http://www.chevyoffers.com">[/HTML]

Any help is appreciated.

Thanks - Tony
Oct 18 '07 #1
1 2304
acoder
16,027 Expert Mod 8TB
Use a setTimeout which calls a function after 10 seconds. If the checkbox is unchecked, use window.location.href to redirect the user.
Oct 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Herbman | last post by:
Hi, I'm trying to position a <tr> ("row") element with CSS. The table itself is positioned with <div> tags. The problem is when I use <div> tags to position the rows within the table nothing...
4
by: nick | last post by:
The structure is very simple: <div style="WIDTH: 500px; HEIGHT: 50px; BACKGROUND-COLOR: aqua"> <div id="nav"> <a href="#">menu1</a> </div> </div> I want to let the "nav" div sink at the...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
8
by: localhost | last post by:
I would like to wrap all of the HTML inside of my <body> tag inside a <div> with in my code-behind. I do not want to touch the .aspx page template at all. I know how to make the body tag...
3
by: Chantal | last post by:
Hello everybody, I'm relatively new to javascript + DOM so I've a question : I'm removing <div> elements in DOM with javascript. It works perfectly in Firefox and Opera : I mean the DOM is...
5
by: Stan R. | last post by:
Greetings. I have a couple of questions concerning CSS layouts, as apposed to the old <tablemethod for creating layouts . Even after spending the last few days searching all over Google Groups, I...
7
by: howa | last post by:
hi all, consider the example below: ////////////////////// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
2
by: Richard Maher | last post by:
Hi, I'm trying to use the Visibility Style attribute for a Div to effectively PopUp a lightweight window with some additional context-sensitive information, when a user mouses over a given...
2
nirmalsingh
by: nirmalsingh | last post by:
hai all, i am using asp.net, on first time loading of a page the style is correctly applied for the div but on postback only font style is not applied. i dont know y? <div...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.