Announcement

Collapse
No announcement yet.

"Popup window" script as a CUSTOMVAR causing IE to crash ?

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

    "Popup window" script as a CUSTOMVAR causing IE to crash ?

    hi folks,

    I have some links in my product detail page that call popup windows with extra info.

    I created these using CUSTOMVARS, one of which contains the following code

    Code:
    javascript:MM_openBrWindow('http://www.esafetysigns.co.uk/acatalog/popup_a3.htm','PopupA3','scrollbars=yes,width=340,height=500')
    and works fine as code in HTML, but when used as a CUSTOMVAR, I get a fatal error in IE and have to bomb out all IE windows to continue.

    Any ideas? 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

    #2
    Hi there,

    The code you specified depends on where you use it. If you are using it within the Act_ProductLine, it would work provided you have the function MM_openBrWindow defined in your Act_Primary.html between the <HEAD> </HEAD> tags

    Alternatively, try the code below, which works with CUSTOMVARs (I've tested this for you)

    1. Copy and paste the code below into your Default Overall Layout (usually Act_Primary.html) between the <HEAD> ... </HEAD> tags

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    function newpop(url, name, w, h) {
      l = (screen.availWidth-10 - w) / 2;
      t = (screen.availHeight-20 - h) / 2;
    
      features = "width="+w+",height="+h+",left="+l+",top="+t;
      features += ",screenX="+l+",screenY="+t;
      features += ",scrollbars=0,resizable=1,location=0";
      features += ",menubar=0,toolbar=0,status=0";
    
      window.open(url, name, features);
    }
    </SCRIPT>
    2. Edit your Default Product Layout (usually Act_ProductLine.html) and insert the code below after NETQUOTEVAR:PRODUCTDESCRIPTION

    Code:
    <A HREF="javascript:newpop('CUSTOMVAR:HTML', 'Home',640,480)">More...</A>
    3. Create a Custom Property called 'CUSTOMVAR:HTML' in 'Advanced | Custom Properties'

    4. Select a product, go to 'Properties' and click + to create a new row and select the custom property from the dropdown and add the value as 'whatever.html' and tick 'Use as customvar' and untick 'Searchable'

    5. For best results, add that 'whatever.html' in 'Advanced | Additional Files'

    Hope this is clear
    Cheers,
    Suresh Babu G

    Comment

    Working...
    X