This topic is locked

how to get the actual id of a field

2/14/2014 6:20:43 AM
PHPRunner General questions
U
U.M.Mbanaso author

what i want is how to get the actual id of a field to use

here is a fragment of my html page generated.

<input id="display_value_Reservations_7" class="" type="text" value="" style="width: 150px;" name="display_value_Reservations_7" autocomplete="off"></input>
<input id="value_Reservations_7" type="hidden" value="2" name="value_Reservations_7"></input>
and i inserted a custom button to get the id from the input field
on client before here is the code i used

params["txt"] = document.forms.addform1.value_Reservations_7.value;
on server

$result["txt"] = $params["txt"];

then on client after

alert(result["txt"]);
it is not working i know there is something that i missed, can any help be given to me?
my next question is can i do something like this in th server side

$result["p"] = "p";

$result["o"] = "o";

$result["y"] = "y";

$result["j"] = "j";
and on client after

result["p"] = $result["p"];

result["o"] = $result["o"];

result["y"] = $result["y"];

result["j"] = $result["j"];
thanks

Sergey Kornilov admin 2/14/2014

My suggestion is to use Javascript API. You won't need to know field ID which may change from page to page.
More info:

http://xlinesoft.com/phprunner/docs/ctrl_getvalue.htm

U
U.M.Mbanaso author 2/15/2014



My suggestion is to use Javascript API. You won't need to know field ID which may change from page to page.
More info:

http://xlinesoft.com/phprunner/docs/ctrl_getvalue.htm



thanks, but i have used Runner.getControl.().getValue(); it is not getting the value i want to retrieve on the button client before don't know why!!!!

Sergey Kornilov admin 2/15/2014

Runner.getControl.().getValue() doesn't look like a proper syntax. Check the supplied article in the manual for correct syntax.