...

View Full Version : Please help with closing window.



jdblewitt
01-08-2010, 12:26 AM
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...



<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...



/* 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...



$(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!

jdblewitt
01-08-2010, 02:46 PM
Here's a link to the page if it helps. http://www.babysittersregistry.com/cl.php

Excavator
01-08-2010, 05:09 PM
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>

jdblewitt
01-08-2010, 06:20 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum