Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by aa on Aug 07, 2008 18:38
open dhtmlx forum
Text feilds in child window can't be editable

I have 2 jsp file,a.jsp and b.jsp.   In a.jsp, I create window which url is b.jsp.for example:
 function editb(id){
    //加载 URL
    if(!dhxWins.window("modify_b")){                 

      var w1 = dhxWins.createWindow("modify_b",10, 10, 600, 500);
      w1.attachURL("b.jsp?id="+id);
        } 
}
In b.jsp,This are some text feilds and a close button. I use button to close this window.
   function b_ok(){
      parent.dhxWins.window("modify_b").close();  
  }
now The question is happen.
   when I use button to close window and open the window again(use editb), all the text fields can't be editable.

Answer posted by Support on Aug 08, 2008 01:54

Problem can't be reconstructed locally - please check attached sample, it uses the same code and works correctly. 

If issue still occurs for you - please provide any kind of sample where issue can be reconstructed. 

Attachments (1)
Answer posted by aa on Aug 08, 2008 10:13
I search by Google, And i see ,some pepole have Encountered the same problem.
Attachments (1)
Answer posted by aa on Aug 09, 2008 04:14
please test it
Attachments (1)
html_win.rar179.24 Kb
Answer posted on Aug 11, 2008 02:23
if this statement is not exist, the problem must be happen.it's a bug.
Answer posted by Support on Aug 11, 2008 07:01
Problem confirmed, there is some strange behavior in IE, when window closed by clicking button inside the window. 
We will investigate and fix issue. 

As fast solution, you can replace 
  parent.dhxWins.window("modify_standard").close();
with 
  window.setTimeout(function(){
       parent.dhxWins.window("modify_standard").close();
  },1)

It will resolve issue.
Answer posted on Aug 11, 2008 07:58

thank you very much.

 

Answer posted on Aug 11, 2008 08:34

sorry!

when I use the  

window.setTimeout(function(){
       parent.dhxWins.window("modify_standard").close();
  },1)

the window can't be closed. my statement is below:

function save(){
    // dwr save
     itemService.saveOrUpdate(itemMap,{
        callback:function(data){
           returnId = data;
          alert('成功');
     //parent.mygrid.insertNewItem($("ref_id").value,returnId,$("dwmc").value,0,0,0,0,"SELECT");       
     },
     verb:"POST",
     timeout:5000,
     errorHandler:function(message){ alert(message); },
        async:false
      });
   window.setTimeout(function(){ 
       parent.dhxWins.window("modify_subitem").close();
    },1);  

}

Answer posted by Support on Aug 11, 2008 09:23
The code with only 
  window.setTimeout(function(){ 
        parent.dhxWins.window("modify_subitem").close();
  },1);  
works correctly in local sample. 
Please try the next, which may be a bit more stable solution
  parent.setTimeout(function(){ 
        dhxWins.window("modify_subitem").close();
  },1);  
Answer posted by Support on Aug 18, 2008 03:47
Here are some possible solutions:

1. Use the focus() metod in "onContentLoaded" event to set focus on any inner element in iframe (see the demo#1)
2. Not close window globally - just show/hide it (see demo#2)
Attachments (2)
demo_1.zip120.39 Kb
demo_2.zip120.31 Kb
Answer posted on Aug 19, 2008 22:59
thank you