Announcement

Collapse
No announcement yet.

Additional Java script for popups

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

    Additional Java script for popups

    Hi Is it possible to as javascript to the popup window so the images can show copywrite

    I have attached the script I need to work that I have used on another site

    Thanks In advance
    Attached Files

    #2
    I guess all that would go within the Extended Info Page Layout Template - accessible via 'Design Options | Layouts' (at the bottom).

    Click the 'Edit' button and paste the code within the '<head>' tag.

    Comment


      #3
      You could make your pages smaller by keeping that JavaScript in a file (in Site1) called (say) pop-closeup.js and referring to it in your Extended Info Page Layout Template(s) in the <HEAD> section via

      <SCRIPT LANGUAGE="JavaScript" SRC="pop-closeup.js" TYPE="text/javascript"></SCRIPT>

      Actinic will detect that file and upload it for you.

      This will make all your popup pages much smaller and the script will be cached so that subsequent popups will load real fast.

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks but still having problems

        Thanks for your help but I still can not get it to work

        I have but in the line as you suggest in the head section

        the pop-closeup.js is in the route of the (site1) and the images it calls for to put in the pop-up are in a directory called /picts just off the route which the script asks for

        should this work in preview mode ?

        maybe I have the script wrong

        Thanks again

        PS the script is as follows




        <!-- Begin POP-UP SIZES AND OPTIONS CODE



        // USE lowercase FOR ALL OPTIONS ONLY


        // CHANGE ANY OF THESE VARIABLES TO "no" OR "yes" TO TURN AN OPTION OFF OR ON


        var small_icon = "yes" // FOR THE SMALL POP UP ICON
        var popup_text = "yes" // HAVE TEXT IN THE POP-UPS
        var picture_only = "no" // THE SIDE AREA WILL NOT BE VISIBLE
        var viewer = "no" // yes/FULL SCREEN OR no/POPUP MODE

        var close_button = "yes" // CLOSE BUTTON ON/OFF
        right_click_on = "yes" // RIGHT CLICK PROTECTION ON

        var watermark = "yes" // WATERMARK ON/OFF
        var watermark_horz = "430" // WATERMARK POSITION
        var watermark_vert = "200" // WATERMARK POSITION
        var watermark_opacity = "35" // DOES NOT WORK IN NETSCAPE


        // OTHER OPTIONS YOU CAN CHANGE


        text_width = "170" // WIDTH OF THE TEXT TABLE
        border_color = "000000" // PICTURE OUTLINE COLOR


        var view_width = 750 // GALLERY POPUP WIDTH
        var view_height = 525 // GALLERY POPUP HEIGHT


        var scrollbarS = "0" // TURN ON POPUP SCROLLBARS "1" FOR ON "0" FOR OFF
        var hide_status = "yes" // HIDE LINK STATUS
        var status_text = "Yakuda Gallery's" // TEXT IN THE STATUS BAR



        // START GALLERY POPUP CODE



        function popUp(URL,TITLE,TEXT) {

        if (viewer == "no") {
        var look='toolbar=0,scrollbars=' + scrollbarS + ',location=0,statusbar=0,menubar=0,resizable=0,width='+view_width+',height='+view_height+','
        popwin=window.open("","",look,"TITLE","TEXT")
        }
        else
        if (viewer == "yes") {
        popwin=window.open()
        }
        popwin.document.open()
        popwin.document.write('<html><head><title>Picture Close Up</title>')
        popwin.document.write('<link rel=StyleSheet href="coolstyle.css" type="text/css" media="screen">')
        if (right_click_on == "yes") {
        popwin.document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">')
        popwin.document.write('<script language="JavaScript">')
        popwin.document.write('function noRightClick() {')
        popwin.document.write('if (event.button==2) {')
        popwin.document.write('alert(\'You may not right mouse click this page.\')')
        popwin.document.write('}')
        popwin.document.write('}')
        popwin.document.write('document.onmousedown=noRightClick')
        popwin.document.write('</script>')
        }
        popwin.document.write('</head>')
        popwin.document.write('<body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginheight="0" marginwidth="0">')
        popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"><tr><td valign="middle" align="center">')
        if (picture_only == "no") {
        popwin.document.write('<div id="text" name="text">')
        popwin.document.write('<TABLE cellpadding="0" cellspacing="10" border="0" width="'+text_width+ '"><tr><td align="left">')
        if (small_icon == "yes") {
        popwin.document.write('<img src="picts/icon-popup.gif"><br>')
        }
        if (popup_text == "yes") {
        popwin.document.write('<span class="poptitle">'+TITLE+ '</span><br>' +TEXT+'<br>')
        }
        popwin.document.write('</td></tr></table>')
        popwin.document.write('</td><td align="center" valign="middle">')
        popwin.document.write('</div>')
        }
        // ZOOM CODE
        if (zoom == "yes") {
        browser_version= parseInt(navigator.appVersion);
        browser_type = navigator.appName;
        if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4) && (navigator.userAgent.indexOf("Windows") != -1)) {
        popwin.document.write("<div id=\"ZOOM\">");
        popwin.document.write("<a href=\"#\" onMouseOver=\"show.style.zoom='1.5'\" onMouseOut=\"show.style.zoom='1'\"><img src=\"picts/zoom-1.gif\" border=\"0\"></a>");
        popwin.document.write("<a href=\"#\" onMouseOver=\"show.style.zoom='2.0'\" onMouseOut=\"show.style.zoom='1'\"><img src=\"picts/zoom-2.gif\" border=\"0\"></a>");
        popwin.document.write("<a href=\"#\" onMouseOver=\"show.style.zoom='2.5'\" onMouseOut=\"show.style.zoom='1'\"><img src=\"picts/zoom-3.gif\" border=\"0\"></a>");
        popwin.document.write("</div>");
        }}
        popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="1" bordercolor="#' + border_color + '" style="border-collapse: collapse"><tr><td>')
        popwin.document.write('<img src="'+URL+'" name="show"><br>')
        popwin.document.write('</td></tr></table>')
        popwin.document.write('<br>')
        popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="0"><tr><td>')
        if (close_button == "yes") {
        popwin.document.write('<form style="margin: 0px"><input type="button" value="Close" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" class="button-popups" onClick=\'self.close()\'>&nbsp;</form>')
        }
        if (slideshow_button == "yes") {
        popwin.document.write('</td><td>')
        popwin.document.write('<form action="slideshow.htm" style="margin: 0px"><input type="submit" value="Slideshow" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" class="button-popups"></form>')
        }
        popwin.document.write('</td></tr></table>')
        // START WATERMARK CODE
        if (watermark == "yes") {
        popwin.document.write('<div id="watermark" style=" LEFT: ' + watermark_horz + 'px; POSITION: absolute; TOP: ' + watermark_vert + 'px; Filter: Alpha(Opacity=' + watermark_opacity + ')">')
        popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="0"><tr><td>')
        popwin.document.write('<img src="picts/watermark.gif"><br>')
        popwin.document.write('</td></tr></table>')
        popwin.document.write('</div>')
        }
        popwin.document.write('</td></tr></table>')
        popwin.document.write('</body></html>')
        popwin.document.close()
        }



        // MOUSEOVER STATUS

        if (hide_status == "yes") {

        function hidestatus(){
        window.status=status_text
        return true
        }

        if (document.layers)
        document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

        document.onmouseover=hidestatus
        document.onmouseout=hidestatus

        }



        // End -->

        Comment


          #5
          .
          the pop-closeup.js is in the route of the (site1) and the images it calls for to put in the pop-up are in a directory called /picts just off the route which the script asks for
          It is very likely that Actinic will not be able to find the images in preview mode unless you create a subfolder called 'picts' within the 'Site1\PreviewHTML' folder - and then copy all the images within that.

          To be honest, I cannot figure out what this javascript is supposed to do or how it is supposed to work so I'm really at a loss to be able to advise in much more detail. Sorry about that.

          Comment

          Working...
          X