Forum Moderators: open

Message Too Old, No Replies

Popup Code

         

ron_ron

3:51 am on Aug 10, 2014 (gmt 0)

10+ Year Member



I am updating the code of an old site and need advice about popups. These are small windows which will be viewed on all devices. I head Apple recommends 480 width x 320 height for the iphone. This would also be a good size for PC use as well. The head code I have now is this:

function Start(page,width) {
OpenWin = this.open(page,"CtrlWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,width="+width+",height=320");
}

The popup code is this:

<a href="#" onClick="Start('popups/MyPopup.asp', '480')">My Popup</a>

Is there a better code I should use?

Also, there is one problem. When the popup link is clicked, although the popup opens, the browser moves to the top of the page. Is there a way I can have the browser stay where it is?

mw11

9:37 pm on Oct 19, 2014 (gmt 0)



If you're working on an old site,
then you've got a lot of freedom as to how to re-code that site.

May I suggest that, from a user's perspective, popups are more annoying than an embedded video that starts up automatically. Therefore, unless it's an emergency, the use of popups should be avoided as much as possible!

What worked for me was a free JavaScript, known as "read more" script. I found it at AptArticle. Basically it's a script that gives your users additional info, just like a popup would. However, when you use a "read more" script, it's a PLEASANT surprise!