I am trying to use the pui.shiftElements function on an onLoad event.
I coded it like this:
pui.shiftElements(1800,2800,get("OFFSET"));
Where OFFSET is an onscreen variable with a valid value of -1152 at runtime. I keep getting and invalid argument popup when I run it. What am I missing? There must be a way to substitute a value in. When I hardcode the -1152, it works fine.
pui.shiftElements
-
- Profound User
- Posts: 27
- Joined: Wed Dec 14, 2011 12:25 pm
- First Name: Shon
- Last Name: Malone
- Company Name: Summit
- Phone: (863) 668-7657
- Address 1: 2310 Commerce Point Drive
- City: Lakeland
- State / Province: Florida
- Zip / Postal Code: 33801
- Country: United States
- Contact:
-
- Profound User
- Posts: 82
- Joined: Fri Jun 29, 2012 2:33 pm
- First Name: Antonio
- Last Name: Ruballos
- Company Name: Profound Logic
- Contact:
Re: pui.shiftElements
Shon,
I sent you an email on what the problem here was. For future reference (and to help anyone else who might run into this issue), I have copied my response below.
The get statement needs to get encapsulated in a “Number()” or “parseInt()” statement; it seems the value being returned by get was not an int and this is why the shiftElements was not working.
pui.shiftElements(1800,2800,Number(get(“OFFSET”))); or pui.shiftElements(1800,2800,parseInt(get(“OFFSET”), 10));
I sent you an email on what the problem here was. For future reference (and to help anyone else who might run into this issue), I have copied my response below.
The get statement needs to get encapsulated in a “Number()” or “parseInt()” statement; it seems the value being returned by get was not an int and this is why the shiftElements was not working.
pui.shiftElements(1800,2800,Number(get(“OFFSET”))); or pui.shiftElements(1800,2800,parseInt(get(“OFFSET”), 10));
Who is online
Users browsing this forum: No registered users and 0 guests