Announcement

Collapse
No announcement yet.

Java popup problem

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

    Java popup problem

    I have a site on development using the Smart theme at

    https://www.volvoclub.org.uk/test/index.html

    I have named one of the small side boxes Membership Benefits, and in the text I want a link to get a popup box with info.

    I have got this working from this box from all pages except when in any of the pages listed in Store Sections. I get 'Error on Page' displayed at the bottom of the browser.

    I think the reason is that the Java script
    <SCRIPT LANGUAGE="JavaScript">
    function popUp(url) {
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=350,height=350');
    self.name = "mainWin"; }
    </SCRIPT>
    won't fit in the small space available in Design > Options > Site Defaults > LeftBarText > Value and needs to be somewhere on the page on display.

    In Design > Options > Site Defaults > LeftBarText > Value I currently have
    <P><B>We cater for ALL models and ages of Volvo cars.<A
    HREF="javascriptopUp('http://www.volvoclub.org.uk/benefits.htm')"><BR><BR>Read
    by clicking HERE</A></B></P>
    Am I right, if so, where do I need to place this code. If I am wrong what should I be doing.

    Thanks
    Supporting the environment. This post uses 100% recycled electrons.
    Bob Isaac
    Director/Web Admin
    Volvo Owners Club Ltd

    Actinic MS Business Version 8.5.2

    #2
    Hi Bob,

    In the code that you presently have in Design > Options > Site Defaults > LeftBarText >
    <P><B>We cater for ALL models and ages of Volvo cars.<A
    HREF="javascript: popUp('http://www.volvoclub.org.uk/benefits.htm')"><BR><BR>Read
    by clicking HERE</A></B></P>

    Change the "javascript: popUp" to read "javascript:ShowPopUp" and it works fine.

    Cheers,
    Bruce King
    SellerDeck

    Comment


      #3
      Hi Bob,

      The first part of JavaScript...
      <SCRIPT LANGUAGE="JavaScript">
      function popUp(url) {
      sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=350,height=350');
      self.name = "mainWin"; }
      </SCRIPT> ........... needs to be placed into the <head> section of the overall layout template.

      Cheers,
      Bruce King
      SellerDeck

      Comment


        #4
        Originally posted by Bruce
        Hi Bob,

        In the code that you presently have in Design > Options > Site Defaults > LeftBarText >
        <P><B>We cater for ALL models and ages of Volvo cars.<A
        HREF="javascript: popUp('http://www.volvoclub.org.uk/benefits.htm')"><BR><BR>Read
        by clicking HERE</A></B></P>

        Change the "javascript: popUp" to read "javascript:ShowPopUp" and it works fine.

        Cheers,
        Thanks for that. I have it all working now, new to Javascript. Just one question on it, I have:

        <P><B>Read about the
        <A
        HREF="javascript:ShowPopUp('http://www.volvoclub.org.uk/benefits.htm',520,500)">Benefits
        of Membership</B></A></P>
        ..do I need to put a semi colon after 500)
        Supporting the environment. This post uses 100% recycled electrons.
        Bob Isaac
        Director/Web Admin
        Volvo Owners Club Ltd

        Actinic MS Business Version 8.5.2

        Comment


          #5
          Hi there

          The semi-colon would actually go after the right bracket just before the closing quote marks.

          Comment

          Working...
          X