Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    13

    Default Script not working across variants in Web Designer 10 Premium.

    Hi,

    I've just purchased Web Designer 10 Premium specifically to create mobile landing pages.

    I have a countdown timer script inside a placeholder on all 3 variants but when previewing the site in either Firefox or Chrome the script only displays in the Main site Variant.

    In each variant the placeholder is 'stand-alone and not shared with other variants. In each placeholder the script has code in the Body and some basic formatting in the Head section.

    I updated WD10P to the latest version today after I upgraded it and the version is: - 10.1.4.36389 DL x64 Dec 10 2014

    As a test I tried to make a duplicate of the working placeholder on the same page but interestingly only one instance of the script was displayed. I am by no means a programmer but i'm feeling this has something to do with it. If so, how do I get my script to display across all variants as a work around? I need this script to display on different mobile devices with different resolutions so this is a little frustrating.

    I have attached a web file if anyone could please shed some light on why this is happening.

    Thank you in advance to anyone who can help
    Attached Files Attached Files
    Last edited by ianparks; 15 February 2015 at 02:21 AM.

  2. #2
    Join Date
    Jan 2010
    Posts
    13

    Default Re: Script not working across variants in Web Designer 10 Premium.

    I'm guessing this has to do with a conflict of variables in the script. As the browser is essentially trying to run the same script 3 times (in the 3 variants) the browser gets confused.
    These types of placeholders with code cannot be live shared across variants so making independent versions for each variant is the only way. Given the text size needs to be changed for each variant it is probably better that this is the case however, a work-around without the need to create 3 different versions of the script would be ideal.

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,828

    Default Re: Script not working across variants in Web Designer 10 Premium.

    Sorry i haven't an immediate solution but you should never have the same ID referenced more than once.
    All your CSS reverts to the last in line so all timers are now the same size.

    I would delete the timer code from all but the Main Variant.
    I renamed the time IDs to timer3, timer2 & timer1 and changed the CSS accordingly.

    I tried to the innerHTML value from timer3 into timer2 & timer1 but had a hiccough.

    This approach is going to work but I am busy for now, so hopefully someone else will sort you out.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Jan 2010
    Posts
    13

    Default Re: Script not working across variants in Web Designer 10 Premium.

    Countdown script problem with variants2.web

    Thanks Acorn.

    I had assumed as much so i've changed the ID in the body and head sections respectively to timer1, timer2 & timer 3 etc...

    Now the timer is displaying on the mobile variant and no others so something else must be causing a conflict.

    I've attached the web file with the updated changes.

    Thanks to anyone who can assist

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,828

    Default Re: Script not working across variants in Web Designer 10 Premium.

    Ian, you only need one piece of JavaScript to do the timing but three updates of the HTMLInner to each timer SPAN.
    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  6. #6
    Join Date
    Jan 2010
    Posts
    13

    Default Re: Script not working across variants in Web Designer 10 Premium.

    Thanks Acorn.

    OK. I must admit i've no idea how to do that. I'm afraid I'm limited to changing fonts, text sizes and URL's etc in code. Anything beyond that it's just trial and error.

  7. #7
    Join Date
    Jan 2010
    Posts
    13

    Default Re: Script not working across variants in Web Designer 10 Premium.

    I've had to abandon the use of variants for now as I am unable to resolve the issue. It turns out this countdown script doesn't display on the newer stock android browsers anyway after V4.2 so i'm using a different script now. I will revisit variants soon and see if this one fairs any better. Thanks for your assistance.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •