473,657 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button to loose focus after close of popup window

200 New Member
Good day, I need help.

I have an html button that calls & open another browser window on the onMouseUp event, but once I close the popup new browser window my button has focus & is like selected.

I want it not to be selected or clicked or has focus, how do i loose the focus after close of popup window?

Expand|Select|Wrap|Line Numbers
  1. onMouseUp="window.open("
  2.  
Please Assist!
Oct 21 '09 #1
8 3389
Dormilich
8,658 Recognized Expert Moderator Expert
maybe something like
Expand|Select|Wrap|Line Numbers
  1. window.opener.focus();
  2. window.close();
could work.
Oct 21 '09 #2
ismailc
200 New Member
No luck, I tried on the same event:
Expand|Select|Wrap|Line Numbers
  1. onMouseUp="window.open(); window.opener.focus();window.close();" 
  2.  
the same result - please assist!
Oct 21 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
futile. of course you have to call this snippet in the opened window (where should window.opener come from in a normal window?)
Oct 21 '09 #4
ismailc
200 New Member
i have tried but no luck
Oct 21 '09 #5
Dormilich
8,658 Recognized Expert Moderator Expert
I’m not that good with focus(), but I could prove the concept with alert()
Oct 21 '09 #6
ismailc
200 New Member
not sure what to do !
Oct 21 '09 #7
acoder
16,027 Recognized Expert Moderator MVP
Have you tried blur(), or giving focus to another element?
Oct 25 '09 #8
ismailc
200 New Member
Thanks onBlur(); works great :)
Oct 26 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

31
2836
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page www.any.xy an setting the focus to "extern". But when I go return to "main" without closing "extern", a click to an other link (e.g. www.2nd_any.xy) on "main" does not setting the focus to "extern".
4
2202
by: ...D. | last post by:
OK. I am halfway decent with HTML. Now I want to try javascript for some things that HTML cannot do. I have looked over a tutorial & all. What I want to do is create a button, that when pressed, closes the window it is in, and launches a URL. The window the button is in is actually just a sub-page of the main website page, launched with target="blank", but I just do not want to close the window as I said, I want to launch a website...
4
20787
by: moose | last post by:
OK Popup window? No problem PDF in popup? No problem But what about a couple of Close Window buttons? Imagine a "Close Window" button at the top of the popup page. Then the PDF which can scroll. And another "Close Window" button at the bottom of the page. Any suggestions for completing this task?
14
5453
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
6
12814
by: Sujan | last post by:
Hello all, Help me! -------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script language="JavaScript"> <!--
2
2092
by: Novice | last post by:
Hi all, as you can see from the subject, I'm try to use an asp:button to create a new browser window and output contents to new window But default if I do the Response.Write("..." The output gets sent directly to the window or frame that the button was contained in - if I was using regular anchor links I could just specify the target - i.e. <a href="http://...." target="nameNotInCurrentFrameset">something</a Thanks Novice
4
3500
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I click a button on a pop-up window the javascript for that button click does a 'button.form.submit'. On the Server side there is a Button click event for this button, but for some reason it no longer fires. It worked fine before and everything...
4
68000
by: Roger | last post by:
Hi, I am confused about the differences between this.window.focus(), window.focus(), and this.focus(). I want to use the calls in a <body onload="..."tag. What are the differences between these forms that may make one succeed and another fail? In particular, this.window.focus() fails in Opera 9.10 with an "object not found", and windows.focus() succeeds in Opera 9.10, Firefox 2.02, and IE 7.
1
1608
oranoos3000
by: oranoos3000 | last post by:
hi i,m writing a script for chat room i,d like to with clicking close button of browser user is exited from site meaning of this say is with clicking close button all of session variable is removed from server i wrote below code for this action but sorry i failed please help me my base page code is as follows
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.