Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Page class > Methods


Scroll Prev Next More


Sets the variable to the given value. Use the setProxyValue() method to pass PHP values to JavaScript: you assign value to a variable in PHP and then use it in JavaScript.


This method is available on all pages and needs to be added to BeforeDisplay event.


setProxyValue($name, $value)



any variable name. Example: "master".


the value assigned to the variable. $value may be a simple value (e.g., string, number) or an array.

Return value

No return value.

Example 1

Setting and using regular variables and arrays. This code goes to BeforeDisplay event.


$pageObject->setProxyValue("name", "some value");


Use the name and master variables in JavaScript OnLoad event:



Example 2

Using PHP values in button's Javascript code.


BeforeDisplay event:


$pageObject->setProxyValue("name", "some value");



Javascript OnLoad event:


window.proxy = proxy;


Button's ClientBefore or ClientAfter event



See also:

RunnerPage class: getMasterRecord()

Event: AfterAdd

Event: AfterEdit

Event: JavaScript OnLoad

Example: How to display any page in a popup window

About RunnerPage class


Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software