Welcome to TalkGraphics.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2008
    Posts
    11

    Default Webstyle Javascript Coding Problem

    The code below is from my Webstyle-generated script:-

    -------------------------------------------------------------------------
    writeButton(loc+"../","/page.html","button_b1",200,30,"mygraphicname","",0 );
    -------------------------------------------------------------------------

    The fields in the above line corresponds to the following defined labels in the following line from the same script:-

    ---------------------------------------------------------
    function writeButton(urld, url, name, w, h, alt, target, hsp)
    ---------------------------------------------------------

    I have no problems when working with the fields except the first one (urld). I've been trying unsuccessfully to make sense of the field. Does anyone know what this field refers to and how to make it work?

    Thanks in advance for the help.

  2. #2

    Default Re: Webstyle Javascript Coding Problem

    rwon, I have moved your thread to the correct forum for Webstyle questions.
    Please take care where you post.

  3. #3
    Join Date
    Nov 2008
    Posts
    11

    Unhappy Re: Webstyle Javascript Coding Problem

    I am still struggling with this problem.

    Hope to find a solution soon.

  4. #4
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Webstyle Javascript Coding Problem

    Hi Rwon,

    I'm not sure what your question is, and why you would want to write your own javascript when Webstyle has already done so.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  5. #5
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Webstyle Javascript Coding Problem

    Looking at a sample file created with Webstyle 4, the only time the urld variable is more than an empty text string is when the button is linked to a local page.

    The javascript for the Webstyle menu is located in a subfolder and the local pages are located in the parent folder of the subfolder.

    The variable loc is usually an empty text string so the urld variable (the loc variable) would be the text string "../"
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  6. #6
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Webstyle Javascript Coding Problem

    The attached image shows how the writebutton function is used in a simple 4 button menu. The first three buttons link to xara.com, xaraxone.com, and talkgraphics.com. The fourth button links to the "Home" page, and is the only place the urld (the loc) variable contains more than a null string.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ws-urld_loc-variable.jpg 
Views:	210 
Size:	50.8 KB 
ID:	68369  
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

 

 

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
  •