Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    84
    Thanks
    47
    Thanked 0 Times in 0 Posts

    Please help with closing window.

    I have a site that uses a pop up when you first get to the page. It appears OK and looks fine, but for some reason, when I hit the "close window" link. It doesn't go away. It used to at one time but I don't know what I did. Here is the code. On my page...

    Code:
    <div id="splash" class="splash">
    		<div class="bg"></div>
    		<div class="overlay">
    		<div id="window_yesno" class="window">
    		<div id="bar"><img src="images/logo.png" alt="" /></div>
    <!--There was a submit form here I cut out for sake of space-->
    				<div class="clearboth"></div>
    			</form>
    		</div>
    		<div class="closesplash"><a href="#" class="closesplashlink">Close Window</a></div>
    	</div>
    </div>
    Here is the css for the code...

    Code:
    /* Splash Screen */
    
    .splash {
    
    }
    .splash .bg {
    	display: block;
    	position: absolute;
    	top: 0;
    	left: 0;
    	height: 100%;
    	width: 100%;
    	text-align: center;
    	background-color: #222;
    	z-index:1001;
    	-moz-opacity: 0.85;
    	opacity:.85;
    	filter: alpha(opacity=85);
    	min-height: 2000px;
    	_height: 2000px;
    }
    .splash .overlay {
    	display: block;
    	position: absolute;
    	top: 0;
    	left: 0;
    	height: 100%;
    	width: 100%;
    	text-align: center;
    	z-index:1002;
    }
    .splash #bar {
    	background: #3FA9F5;
    }
    .splash .window {
    	display: block;
    	width: 500px;
    	margin: 100px auto 0px auto;
    	text-align: center;
    	background: #FFF url(/images/bg.html) no-repeat scroll -420px -450px;
    	z-index:1003;
    	border: 2px solid #CCC;
    }
    .splash .window h6 {
    	margin: 40px auto 40px auto;
    	font-size: 28px;
    	line-height: 28px;
    	text-align: center;
    	width: 380px;
    	color: #FFA039;
    }
    .splash .window p {
    	width: 380px;
    	padding: 5px;
    	margin: 0px auto;
    	font-size: 18px;
    	line-height: 18px;
    	color: #222;
    }
    .splash form {
    	text-align: center;
    	margin: 0px auto 40px;
    	border: 2px solid #EFEFEF;
    	width: 400px;
    	padding: 20px 0;
    }
    .splash label {
    	font-size: 24px;
    	margin-right: 10px;
    	width: 150px;
    	float: left;
    }
    .splash .bigsearch {
    	width: 160px;
    	line-height: 20px;
    	border: 2px solid #666;
    	background: #FF9;
    	margin: 10px auto 0px;
    	color: #3E3E3E;
    	font-size: 22px;
    	text-align: center;
    	padding: 10px;
    }
    .splash .bigsearchsubmit {
    	background: transparent url(/images/start-free-search.png) no-repeat 0 0;
    	height: 60px;
    	width: 280px;
    	margin: 0px auto;
    	border: 0px none;
    	text-indent: -9999px;
    	overflow: hidden;
    	font-size: 0px;
    	line-height: 0px;
    }
    .splash .bigsearchsubmit:hover {
    	background: transparent url(/images/start-free-search.png) no-repeat 0 -60px;
    }
    
    .splash .closesplash {
    	width: 500px;
    	margin: 5px auto;
    	text-align: right;
    }
    .splash .closesplash a {
    	color: #FFF;
    }
    .splash .closesplash a:hover {
    	color: #3FA9F5;
    	text-decoration: none;
    }
    And here is a script that I think it uses that I call on in the head of the page...

    Code:
    $(document).ready(function() {
    	
    	$(".clickclear").focus(function(){
    		if(!($(this).hasClass("cleared"))) {
    			$(this).val('');
    		}
    		$(this).addClass("cleared");
    		$(this).removeClass("clickclear");
    	});
    
    	$(".closesplashlink").click(function(){
    		$("#splash").addClass("hide");
    	});
    Please let me know if you see why this won't close when the "close window" link is clicked. Thanks!

  • #2
    New Coder
    Join Date
    Sep 2006
    Posts
    84
    Thanks
    47
    Thanked 0 Times in 0 Posts
    Here's a link to the page if it helps. http://www.babysittersregistry.com/cl.php

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,678
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Thank you for the link jdblewitt!
    That was way too much to re-assemble here. I lost interest about 5 minutes into it lastnight.

    The close window link directs you to the same page it's on with the #. Maybe it works better with a real path?
    Try this -<a href="http://www.babysittersregistry.com/" class="closesplashlink">Close Window</a>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    jdblewitt (01-08-2010)

  • #4
    New Coder
    Join Date
    Sep 2006
    Posts
    84
    Thanks
    47
    Thanked 0 Times in 0 Posts
    Thanks for your help but I found the prob. I call on a google api script in the page and had an extra / on the end. Working now. Thanks so much for your time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •