Welcome to TalkGraphics.com
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Moncton, NB Canada
    Posts
    149

    Default A Text-Link question

    Hi Everybody,

    I'm trying to learn how to do the following.

    I plan to have a text link on a page, say "index.htm". Rather than link to a different page, say "email.htm" ... I want to link to a specific PopUp that is contained in email.htm.

    How do I need to approach that?

    Many thanks,

    -Paul-

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Lightbulb Re: A Text-Link question

    Paul, I played with this ages ago.

    JQ - Scroll To Anchor on Popup Layer.xar

    You start with giving an object on your pop-up layer a Name.
    This it is Anchor - I called mine 'pop'.

    I then checked that my pop-up layer was the seventh from the bottom.
    In JavaScript this counts as 6 as JS counts from 0.

    I added some jQuery code to the Website Code (body).
    I included the jQuery Library by adding the Name UsesJQuery to any object. [There is a typo in the design file]

    I finally created a Grey button with code: javascript: xr_cpu(6); scroller('#pop', 5000);
    This pretends it is the normal pop-up button click (the red box).
    Then a 5-second slide to place the Anchor at the top of the browser.

    You can hide the Red button but it must exist.
    You need to check the layer you are popping.
    You can change the 5000 (milliSeconds) to any value you want.

    I cannot recall any simpler approach but I would love finding one.

    Acorn
    Last edited by Acorn; 20 October 2021 at 06:50 PM.
    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

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

    Info Re: A Text-Link question

    If you can handle the jQuery, this code works for the Grey button, without you having to work out what layer the Red button is opening:

    javascript: xr_cpu($('#pop').parent().parent()[0].id.split('xr_xp')[1]); scroller('#pop', 5000);

    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
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: A Text-Link question

    Quote Originally Posted by Acorn View Post
    If you can handle the jQuery, this code works for the Grey button, without you having to work out what layer the Red button is opening:

    javascript: xr_cpu($('#pop').parent().parent()[0].id.split('xr_xp')[1]); scroller('#pop', 5000);

    Acorn
    Very neat Acorn, it works for multiple popups which saves the hassle of checking 'xr_cpu(n)' in the bottom left of the browser each time. Looks like it works across variants too.

    Could you though please explain the string and how the id spilt works wrt 'xr_xp'?

    Thanks

    Gary

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

    Default Re: A Text-Link question

    Quote Originally Posted by Initiostar View Post
    Very neat Acorn, it works for multiple popups which saves the hassle of checking 'xr_cpu(n)' in the bottom left of the browser each time. Looks like it works across variants too.
    Could you though please explain the string and how the id spilt works wrt 'xr_xp'?
    Thanks Gary
    Gary, pretending to be a computer:

    • Go and find the Anchor (id) called 'pop' in the Document Object Model. [<span ... id="pop"...]
    • Now climb to its grandparent [<div ... id="xr_xp6"...]; it is always xr_xp(something) - this something number is which layer it is on, here it is 6 - the seventh layer.
    • Now remove the known bit to get the (something) ["xr-xp6".split('xr_xp')[1]) ==> ['', '6']; an array where we only need the second element [1] ==> 6]
    • Finally, "Fire up the Quattro" with xr_cpu(6) to make Layer 6 visible.

    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
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: A Text-Link question

    Thanks Acorn, understood

    Gary

 

 

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
  •