jQuery EasyUI Forum
July 26, 2017, 03:31:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Reference elements in dialogue  (Read 209 times)
jkdoyle
Newbie
*
Posts: 16


View Profile Email
« on: May 18, 2017, 09:43:17 AM »

How do I reference elements in dialogues?

For example I use:

Code:
$('#my_modal').dialog({
     href: 'search_form'.html

})

To load a search form, and now I want to use scripting to add combobox values to an input with id "search_field" or name "search_value" in the dialogue.  How do I make the reference $('#search_field').combo(); doesn't work.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3054


View Profile Email
« Reply #1 on: May 20, 2017, 01:46:18 AM »

You must wait the dialog content to be loaded successfully before calling $('#search_field').
Code:
$('#my_modal').dialog({
     href: 'search_form.html',
     onLoad: function(){
       $('#search_field')...
     }
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!