Topic
1 reply Latest Post - ‏2012-12-11T19:27:10Z by SystemAdmin
SystemAdmin
SystemAdmin
9029 Posts
ACCEPTED ANSWER

Pinned topic javascript variable interpretation

‏2012-12-11T19:10:20Z |
using Portal 6
Web Experience Factory 7

The following is part of a Client Javascript builder
drawing = '${Variables/RowThatWasSelected/Row/DRAWING}';
viewPrint = '${Variables/viewPrint}';
url = viewPrint;
myRef = window.open(url,'mywin');

viewPrint has a value of "http://pview.acme.com/productview/rest/launch/drawing/"+drawing
drawing has a value of '1BSY34'
url gets a value of http://pview.acme.com/productview/rest/launch/drawing/1BSY34

This has been working for a year but recently something changed causing the variable to be interpreted differently. The url is now getting a value of "http://pview.acme.com/productview/rest/launch/drawing/"+drawing which returns a 404 message.

As a work around I've replaced
url = viewPrint;
with
url = 'http://pview.acme.com/productview/rest/launch/drawing/'+drawing;

But I'd rather not hard code the url. Any ideas regarding this?

Thanks in advance!
Updated on 2012-12-11T19:27:10Z at 2012-12-11T19:27:10Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    9029 Posts
    ACCEPTED ANSWER

    Re: javascript variable interpretation

    ‏2012-12-11T19:27:10Z  in response to SystemAdmin
    How are you setting the "drawing" variable?

    Can you post a sample model exhibiting the problem? (without any confidential info, of course). This will help us pinpoint exactly what you did wrong.

    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.