/    Sign up×
Community /Pin to ProfileBookmark

Please help!!!

I have made a layer based popup. The problem with that is when i refresh the page..the popup goes away…i want to refresh the popup window with the main window…

This is the script used:
<script>
function setVisible(obj)
{
obj = document.getElementById(obj);
obj.style.visibility = (obj.style.visibility == ‘visible’) ? ‘hidden’ : ‘visible’; } function placeIt(obj) {
obj = document.getElementById(obj);
if (document.documentElement)
{
theLeft = document.documentElement.scrollLeft;
theTop = document.documentElement.scrollTop;
}
else if (document.body)
{
theLeft = document.body.scrollLeft;
theTop = document.body.scrollTop;
}
theLeft += x;
theTop += y;
obj.style.left = theLeft + ‘px’ ;
obj.style.top = theTop + ‘px’ ;
setTimeout(“placeIt(‘layer1’)”,500);
}
window.onscroll = setTimeout(“placeIt(‘layer1’)”,500);
</script>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JoeNovaOct 01.2009 — You can't refresh the page and have only a specific part of the page refresh. Once you hit the refresh button the browser it sends a whole new request to the page you are at. The only way to do this is to create your own refresh button on your page and use Javascript to have it refresh the popup layer.
×

Success!

Help @simran009 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...