Hello all,

I have a problem frying my brain..
I have a main page that opens a popup in order to list a few options (including pagination) shown to the user. Inside each option I added a link that calls a local js function ( sendInfo(<&#37;=recordsetvalue%>)) that populates a input at the mainpage and also fires their onchange() event.
See the js below:
function sendInfo(pat)
var stringObject = new String(pat);
var main_input=opener.document.getElementById('equip_pat');
main_input.value = stringObject;



This works perfectly.
But (there always a but..)
Due the pagination (sometimes more the 10 pages), I also added a input on the popup that perform a search and shows only the selected value as result from the recordset. When clicked on the value, the function above works only partialy (populates the main but don't fires the onchange() ).

Here's my main page where sits the input i'd like to manipulate:

<%If request.QueryString("Patrimonio")<>"" then%>
<div align="left" class="ct"><FONT class=ct>Patrim&ocirc;nio</font>&nbsp;&nbsp;&nbsp;&nbsp;<font class="style2_red">Edit&#225;vel</font></div>
<div align="left">

<input name="equip_pat"id="equip_pat" type=text class="cn" style="{FONT class=cn} " value="<%=rscompletaform("patrimonio")%>" size=15 maxlength=20 onChange="checkPat_duplicado(this.value);" >
<div align="left" class="ct"><FONT class=ct>Patrim&ocirc;nio</font></div>
<div align="left">
<input name="equip_pat"id="equip_pat" type=text class="cn" style="{FONT class=cn} " value="disabled" size=15 maxlength=20 onChange="recarrega('ctrl_equipamentos.asp', 'load=edit_equipamento.asp?patrimonio=',this.value);" disabled="disabled" >
<% end if%>

Ps. I use the if then statement to shift the js function attached at the input. When load firstly (when there's no querystring value) I need to run "recarrega" that reloads the page adding the selected value (on popup window) at the asp variable "patrimonio".
Since this is a edit page, when loaded secondly, I need to use another js function in order to check for duplicity on the edited value...

Again, all this works fine if I pick some value at the popup not using the search tool (just picking via the pagination).