Announcement

Collapse
No announcement yet.

Pop up code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pop up code

    Is there any code to control a popup within the actinic js code? Or should I add it myself?

    If there is code - is there also an example code I can copy to create a popup box?

    #2
    The function is already there croccy, take a look at the extended info popup code or the T+C code on the checkout process, just copy the format.

    Comment


      #3
      Ta Lee

      I suspected it would be, just thought I'd be lazy and ask where it was

      Comment


        #4
        Originally posted by pinbrook View Post
        Ta Lee

        I suspected it would be, just thought I'd be lazy and ask where it was
        The code is in Actinic but it suffers from one annnoying problem, if you move back to the main page and leave the popup open so it gets hidden the next time you click the button it fails to open, in fact it does open but is still hidden as the javascript doesn't force focus to the popup. There is code on the forum to make it always show the popup I use this
        Code:
        function ShowPopUp(sUrl, nWidth, nHeight){  
          	if (sUrl.indexOf("http") != 0 && sUrl.indexOf("/") != 0) {
          		var sBaseHref = GetDocumentBaseHref();
        		sUrl = sBaseHref + sUrl;
          	}  
        	/******* new code to always bring popup to front ******/
        	newwindow = window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
        	if (window.focus) {
        		newwindow.focus();
        	}
        	return false;
        }
        though there are other ways to achieve this

        Malcolm

        SellerDeck Accredited Partner,
        SellerDeck 2016 Extensions, and
        Custom Packages

        Comment

        Working...
        X