Announcement

Collapse
No announcement yet.

"onClick" popups not working ....

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

    "onClick" popups not working ....

    I am adding html into my product description boxes using the

    Code:
    !!< >!!
    tags.

    All is fine accept when I added an OnClick event, (in DWeaver), to an image as follows......
    Code:
    <td width="30"><a href="javascript:;" onClick="MM_openBrWindow('../mypages/popup_A3.htm','PopupA3','scrollbars=yes,width=340,height=500')"><img src="../images/icons/icon_A3.gif" alt="... can be scaled to A3" width="30" height="30" border="0"></a></td>
    I hit the button and nothing happens.

    The browser status bar reads "javascript:;", on mouse rollover?

    Any ideas, as I would like a popup window to appear when I click on this image.

    Thanks, Simon.
    esafetysigns.co.uk
    your instant download portal for self printable health and safety signs and posters
    ... download once use as many times as you like !


    http://www.esafetysigns.co.uk/index.html
    http://www.esafetysigns.co.uk/acatalog/index.html

    #2
    By attaching javascript to the <a> tag, the script will fire when clicked or when
    highlighted and the Enter key is pressed. The "javascript:" inside the href part of the link tells the browser to perform the script, rather than the default behaviour of following the link. This means you don't need the 'onclick' part:
    Code:
    <td width="30"><a href="javascript:MM_openBrWindow('../mypages/popup_A3.htm','PopupA3','scrollbars=yes,width=340,height=500')" ><img src="../images/icons/icon_A3.gif" alt="... can be scaled to A3" width="30" height="30" border="0"></a></td>
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      You can use this:
      Code:
      <a href="javascript:ShowPopUp('pic2.jpg',440,440)"><img src="pic1.jpg" border="0" ></a>
      Showpopup code is already in actiniccore.js

      Comment


        #4
        Sorted .... but ...

        I opted for Kermy's solution, adding the javascript to the actiniccore.js..... I didn't know you could do this ... so thanks both jobs sorted.

        However, there is just one point though, even with all my pop-up blockers set to off etc etc, I always get the warning in IE Browser when my pop-up is initiated, "Active X Controls" etc etc "Always Allow" etc etc.....

        Q1. Is this because, I am using "javascript:MM_openBrWindow" to open a popup browser window, or is it because I have a "Close Window" button on the popup page?

        Q2. Annoying while developing can I turn this off, even thou pop-up blocker is off in IE, and in my McAfee ?

        Thanks, S.
        esafetysigns.co.uk
        your instant download portal for self printable health and safety signs and posters
        ... download once use as many times as you like !


        http://www.esafetysigns.co.uk/index.html
        http://www.esafetysigns.co.uk/acatalog/index.html

        Comment


          #5
          Q1, Yes I think it's due to the Close Window button (if you dis-allow, the button won't appear)

          Q2, I'd be interested in an answer to this as well . . . you can by-pass the problem by adding your computer to the trusted sites list in Internet Option|Security|Trusted Sites, but I couldn't get the thing to *only* trust the Actinic preview directory . . . it's either all or nothing as far as I could tell.
          David
          Mandrake Press Ltd

          <a href="http://www.mandrake-press.co.uk" target="_blank">www.mandrake-press.co.uk</a>

          Comment

          Working...
          X