Skip to main content
SusanSherman
Inspiring
January 27, 2020
Question

No matter what link you take to leave, upon returning to home page, ALL links take you nowhere!

  • January 27, 2020
  • 2 replies
  • 772 views

I am thoroughly confused by my website. We have a pop-up alert on our home page that is supposed to show one time every four hours per unique user ID. You MUST click out of the alert box to continue using the website. No problems so far.

 

However, once a user clicks on ANY link on our home page (to an internal page or an external site), when they come back to our home page, none of our links will work. It's as though our home page is a .jpg image just sitting there! I use DW because I do not have an indepth knowledge of coding languages, so trying to locate the bit of code that may be causing this has turned into a nightmare for me. The problem exists across all browsers.

 

Any and all suggestions as to what is going awry are appreciated!

 

Using DW Cloud 2020 on a Win 7 platform (I know...updating to Win 10 as soon as IT gets the lead out!).

 

Thanks!

 

Susan

 

 

This topic has been closed for replies.

2 replies

Legend
January 27, 2020

Bit of a convoluted complex set-up for a pop up but try adding the else {} block below shown in bold to your jquery script. What it is saying is if the specified time HAS NOT elapsed when revisiting the website then remove the #mask and #boxes <divs>, which has already been pointed out are only hidden from view, but are still sitting ontop of your content, denying access to any user involvement. Usually you would always set those in the css as display: none; by default but in your case given the messy implemention it doesnt work, a lack of understanding by whoever produced the original code.

 

if (now - lastTime > 4*60*60*1000) {
//4 hours 4*60*60*1000
//Set heigth and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});

//transition effect
$('#mask').fadeIn(500);
$('#mask').fadeTo("slow",0.9);

//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();

//Set the popup window to center
$(id).css('top', winH/2-$(id).height()/2);
$(id).css('left', winW/2-$(id).width()/2);

//transition effect
$(id).fadeIn(2000);
}
else {
$('#mask').remove();
$('#boxes').remove();
}
localStorage['lastTime'] = ""+now;

Jon Fritz
Community Expert
Community Expert
January 27, 2020

Sounds to me like you may have two separate home pages in your site.

Verify that the links on your internal pages (the ones that are returning you to the home page) have the exact file path and name of the home page, right down to the case structure.

INDEX.html and index.html are the same page to your local OS, but on a server, they're two different files so a link to one won't go to the other. Also look at the file extension. Starting at index.php, clicking to a secondary page, then clicking a link to index.html can also cause the issue you're seeing.

A link to your site would take out the guesswork though.

SusanSherman
Inspiring
January 27, 2020

There should only be one link. My website is www.grr.org and the home page is index.php

Thanks!

Susan

Jon Fritz
Community Expert
Community Expert
January 27, 2020

Ah, your boxes div is eassentially "stealing" the clicks to the items behind it.

<div id="boxes"> needs to be set to display:none in the css after someone leaves and comes back to the page. Right now, it looks like everything else is being hidden, but it's still acting as an overlay to the site itself.

Sorry, I'm not entirely sure how to fix it. I never use that type of script.