Hi I have written a code: 1. function test() { 2. alert("Press OK to load Teacer !"); 3. document.Tracer.setPoints(window.opener.parent.option.jncurves,window.opener.parent.option.jinfo); 4. } If I remove the line 2 then this code dosen't work. In line 3 I am calling an applet function that is embeded on this page. I I keep line 2 then code is working perfectly. This is the complete code main.asp <html> <head> <script type="text/javascript"> function test() { alert("Press OK to load Teacer !"); document.Tracer.setPoints(window.opener.parent.option.jncurves,window.opener.parent.option.jinfo); } var parameters; parameters = "width=450px,height=250px,left=50px,top=10px,resize=0,scrolling=0"; function openmypage() { ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "My_Application_File.asp", "Window Name", parameters) } </script> </head> <body> <a href="#" onClick="openmypage();test();">Open Ajax Window</a> </body> </html> I am calling My_Application_File.asp file from above code... <div style="z-index:0"> <div id= "mydiv"> <applet style="z-index:0" id="Tracer" name="Tracer" code="MyApplication.class" codebase="tracer/" width = 400 height =200 VIEWASTEXT> </applet> </div> </div> Please help me !!! dcm_2001@yahoo.com
I don't see anything wrong at first site. Can you put this up somewhere so we don't have to replicate the test case?
I think asp cause some trouble with javascript. you can try vbscript. vbscript goes fine with asp. best wishes.
When this happens it's usually somthing to do with timing. An alert pauses script execution untill the visitor deals with the alert. Java applets, Flash Movies, & similar things are notorious for not being ready when scripts want to use their methods. Try setTimeout("document.Tracer.setPoints(window.opener.parent.option.jncurves,window.opener.parent.option.jinfo)", 1000); Code (markup):
Thanks a lot joebert. Problem solved by using code: setTimeout("document.Tracer.setPoints(window.opener.parent.option.jncurves,window.opener.parent.option.jinfo)", 1000);