This topic is locked
[SOLVED]

 Lookup Wizard

8/29/2010 7:15:59 PM
PHPRunner General questions
D
ddefrain author

Hi All.

I have a Lookup wizard (customers with id).

And three text fields (master customer data id,name,address), i need to replace the value from the lookup(customers) to text field1 and text field 2(master data).

I'm using phprunner 5.2

Thank's in advance.

A
ann 8/30/2010

Ddefrain,
use JavaScript API to copy the value.

Here is a sample (JavaScript Onload event on theEvents tab):

var ctrlCust = Runner.getControl(pageid, 'customers');

var ctrl1 = Runner.getControl(pageid, 'Field1');

var ctrl2 = Runner.getControl(pageid, 'Field2');



function func() {

ctrl1.setValue(ctrlCust.getValue());

ctrl2.setValue(ctrlCust.getValue());

};



ctrlCust.on('change', func);
D
ddefrain author 8/30/2010

Hi Ann; Thanks for your reply.
Do i have to configure/put something special?; 'cause the following code inserted in the Add page Javascript Onload event shows me nothing in the text fields. I put it single and double quoted.

var ctrlCust = Runner.getControl(pageid, "proveed"); (where "proveed" is a Lookup Wizard).

var ctrl2 = Runner.getControl(pageid, "name"); (where "name" is a Text field).



function func() {

ctrl2.setValue(ctrlCust.getValue());

};



ctrlCust.on("change", func);

;



[/quote]
...And if i put an

alert(ctrlCust.getValue());



In the function func.

It Throws me no alert. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=52250&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
What i need is to fill some text fields from customer table to master table within a lookup wizard or snippet before adding the record on the table.
Thank's in advance.

Best Regards!



Ddefrain,
use JavaScript API to copy the value.

Here is a sample (JavaScript Onload event on theEvents tab):

var ctrlCust = Runner.getControl(pageid, 'customers');

var ctrl1 = Runner.getControl(pageid, 'Field1');

var ctrl2 = Runner.getControl(pageid, 'Field2');
function func() {

ctrl1.setValue(ctrlCust.getValue());

ctrl2.setValue(ctrlCust.getValue());

};
ctrlCust.on('change', func);


Sergey Kornilov admin 8/31/2010

I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

D
ddefrain author 8/31/2010

Ok Here's my Ticket

Ticket 215478: Lookup Wizard (Category: Support) Status: Unprocessed Updated: 8/31/2010 4:00:52 PM
Thank's in advance.



I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

D
ddefrain author 8/31/2010

I'm testing phprunner,Beta version does not do the javascript work; my mistake.
Thank's for your time; i'm going to buy the full version.



Ok Here's my Ticket

Ticket 215478: Lookup Wizard (Category: Support) Status: Unprocessed Updated: 8/31/2010 4:00:52 PM
Thank's in advance.