I wanted to have a fixed position (center of the viewport) popup div that’s 800x600. Obviously now that seems waaay too big for a fixed position popup. Here’s me on my 1920x1080 screen again forgetting about the users.
But still, even if I make it a lot smaller… I’m now wondering about smartphone browsers. I don’t own one so I can’t test it right now, but if I put a fixed size, fixed position popup div on screen couldn’t it still totally block some users from seeing/clicking anything? I could of course make it so that clicking anywhere on the div gets rid of it but still not ideal.
Javascript Question:
I’m now thinking of adding a javascript viewport measurer and testing that it’s over the height of the div before doing the popup. I’ve got all that sorted but in that case, I’m a bit stuck for what to do “else{ … }”… when I find their viewportheight is too short for the popup. When javascript is off, the user is taken to another backup page with all the same info on.
<a href="mybackuppage.html" onclick="calculateViewportHeight(); popup('popup1'); return false;">
Is there a way to break out of calculateViewportHeight() and make sure the “return false” doesn’t get called? …Or can I do that specific “return false” from within the popup() function?
(sry, should have put this in the JS forum)