javascript - java applet requestFocus() method error when called in js -


मुझे कॉल करने में त्रुटि है requestFocus () JS में विधि।

  अनकॉट टाइप एरर: ऑब्जेक्ट # & lt; HTMLAppletElement & gt;  & lt; head & gt;  टैग  
  फ़ंक्शन ऑनलोड () {var विशेषता = {'id': 'क्लाइंट', 'संग्रह': 'client.jar', 'code': 'org.kuzy.client.ui.Applet.class', 'चौड़ाई': '100%', 'ऊंचाई': '100%'}; Var पैरामीटर = {'scriptable': 'true'}; परिनियोजन जाव.रनआपलेल्ट (गुण, पैरामीटर); Window.onfocus = फ़ंक्शन () {document.getElementById ("क्लाइंट")। RequestFocus (); }; }   

एक अजीब विशेषता है, जब मैं क्रोम में डीबग में कोड चलाता हूं, तो सबकुछ ठीक काम करता है मैं आपकी सलाह के लिए आशा करता हूं।

मुझे यकीन नहीं है, लेकिन संभवतः जब आप विधि अनुरोध फोकस ) एप्लेट पहले से लोड नहीं है शायद जब आप डीबग करना चाहते हैं तो आप जेएस निष्पादन रोक रहे हैं और आप एप्लेट को लोड करने के लिए पर्याप्त समय दे रहे हैं। तो शायद आपको कॉलबैक या कुछ तंत्र की जरूरत है ताकि यह पता चले कि ऐपलेट कब तैयार है।

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -