Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #20039

How do I find which text field

From "Tony" <tony.johansson@inport.com>
Newsgroups comp.lang.javascript
Subject How do I find which text field
Date 2013-05-29 17:32 +0200
Organization A noiseless patient Spider
Message-ID <ko56q1$kph$1@dont-email.me> (permalink)

Show all headers | View raw


I have three input text fields and when I click F4 I display a jQuery-UI 
dialog which mainly consist of a html table this works fine.
I select a row in the html table in the jQuery-UI dialog by double click and 
in the event handler I can extract the values from the selected row.
All this work fine.

Now starts the problem because I can click F4 and display the same JQuery-UI 
dialog in all three text fields I must be able
to know which text field was I standing in when I double click in the html 
table that exist in  jQuery-UI dialog.

What can I do to know that ?

Here is the event handler that is called when  I double click in table with 
id=ort.
If I keep this code then only text field with id = prevPortID will get value 
from the selected row
in the html table that exist in the jquery-UI

$("#ort").dblclick(function (event)
          {
              var row = $(event.target).closest('tr');

              $('#dlgSearchOrt').dialog("close");

              $('#prevPortID').val(row.find('td:eq(0)').text());
          });

//Tony 

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How do I find which text field "Tony" <tony.johansson@inport.com> - 2013-05-29 17:32 +0200
  Re: How do I find which text field Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-29 15:51 +0000

csiph-web