Current location: Hot Scripts Forums » General Web Coding » JavaScript » Windows 7 JavaScript issue window.focus()


Windows 7 JavaScript issue window.focus()

Reply
  #1 (permalink)  
Old 03-01-10, 12:35 PM
tkrishnagokul tkrishnagokul is offline
New Member
 
Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Spin Windows 7 JavaScript issue window.focus()

Hi
I am using Windows 7 and IE8 in my application. I am opening a new pop window using window.open(). After submit, my request will reload the same popup. While reloading the page is hiding behind the parent window. I have tried using window.focus() to bring the popup front, its not working. This problem occurs only if i use Win 7 and IE8.
Is this issue specific to Win 7? Is there any soln for this issue?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-01-10, 04:18 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Please post your code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-02-10, 12:33 AM
tkrishnagokul tkrishnagokul is offline
New Member
 
Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Hi
Here is the code for opening popup
<script language ="javascript">
function popup1(){
window.open("popup.jsp",null,"height=200,width=400 ,status=yes,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body>
<input type ="text" value ="Test"/>
<input type="submit" value ="Submit" onClick ="popup1();"/>
</body>

Here is the code where the two request will takes place together
<%
String submitted = request.getParameter("submitted");
boolean submit = false;
if(submitted != null){
submit = true;
}
%>
<script language="javascript">
function focusWindow(){
window.focus();
}
</script>
<%if(submit){
%>
<body onload = "focusWindow();">
Sucessfully submitted
</body>
<%}
else
{%>
<form action = "sub.do">
<input type ="hidden" value ="submit"/>
<input type="submit" value ="Submit"/>
</form>
<%}%>

i have tried window.focus(), this.focus(), self.focus() and all the ways related to focus(). But nothing helps me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
javascript, win7js


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Senior JavaScript Developer - Full Time - Permanent - London AJAX, CSS, JSONP Chris Peacock Job Offers & Assistance 0 01-19-10 01:28 PM
Javascript help - same as customer info script issue izzysanime JavaScript 2 04-24-08 11:00 AM
Windows media Javascript Pineriver JavaScript 0 08-22-06 04:21 PM
Windows Media Player Javascript Status Bar sixflagsga JavaScript 3 02-04-06 06:20 PM
close pop-up windows on javascript redirect crmpicco JavaScript 1 06-15-05 03:19 PM


All times are GMT -5. The time now is 01:36 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.