Solved

Window.focus - IE - Strange Problem

Posted on 2006-06-28
4
309 Views
Last Modified: 2010-04-06
Hello All

I'm having very strange problems with window focus in internet explorer.

1.  I've my default.aspx and in that I'm opening a new asp page called  Edi.aspx using
      Dim jscriptStr As String
                jscriptStr = "<script language=JavaScript> window.open('Edi.aspx','editorWin','height=5,width=555,left=300,top=300,toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=no,resizable=0,titlebar=no');</script>"
                RegisterClientScriptBlock("clientScript", jscriptStr)

 In the Edi.aspx body tag I'm putting onload="javascript:top.focus();".

This is not working and the Edi.aspx is hiding behind the default.aspx. why is this happening? At the same time when I used this technique for a opening different page other.aspx its working.

Another big thing is- the above technique is working perfectly fine in firefox browser for both Edi.aspx and other.aspx.

I'm using IE.6.0.


2. Is there any way to access the controls in Edi.aspx from the default.aspx ( here Edi.aspx is opened from the default.aspx using window.open('Edi.aspx'))?


Thanks for your help
Aditya
0
Comment
Question by:adityaiiii
4 Comments
 
LVL 30

Accepted Solution

by:
callrs earned 250 total points
Comment Utility
onload="setTimeout('top.focus();',50);" .
Might work as it did here: http:Q_21900260.html
0
 
LVL 27

Assisted Solution

by:Chinmay Patel
Chinmay Patel earned 250 total points
Comment Utility
Hi There,

Yes its possible to access the new windows's controls.

oNewWindow = window.open(ur params);

oNewWindow.formname.controlname will get you the control/s.

Regards,
Chinmay
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now