Pop-out a chat windows (using iframe) to new tab then pop-in it to get it back to the windows ..like Google does with they hangout chat windows in Gmail web.
I have been googling but could figure it out. Maybe my knowledge is not good enough
i mean that you want to say when you click in the arrow into the box, then is opening a popup with the chat.
I'm not sure that google do this, but is a way to do the same effect for the user.
When you click there, there open a pop up, the procediment to do this is the next;
you create a function in JS with window.open() this opens a window
If you want to open a page inside the window you have to specified it
window.open("chat.php")
the method open allows 3 parameters
window.open(document,name of the window,attributes of the window)
Document
Uri of the doccument to be loaded into the popup.
Name of the window
Identified for the window, you can do references to this id after is opened.
Attributes of the window
A couple of name/value to assign different options for this widow, there are:
Width (of the window in pixels)
height (of the window in pixels)
top : position of the window starting on the top
left: position of the window starting on the left
toolbar, if you want to show the toolbar or not (boolean)
status, if you want to show the status bar (boolean)
location, if you want to show the location bar.
directories, if you want to show the personal bar.
scrollbars, if you want to show the scrollbar
menubar if you want to show the menubar
this is a example of how to open a new window :
function openPopUp(){
newpopup = window.open('chat.html/user1=xxxx?user2=yyyy','newwindow','width=300, height=400')
}
the back-end of this page is going to load the chat between the user 1 and 2.
now to go back to the parent window.
you can return a value then when you click in the arrow to go back, they should be something in the onclick function like
function returnPopUp(){
top.close();
return "user1=xxxx?user2=yyyy"
}
then they load the frame in the parent window again.
and as I told you before, something similar for the newpopup close listener.
Thanks.
Related
I am currently trying to make a more accessible version of an info window by extending google map's overlay view class (by building on this example). In my web app, when the user clicks on a marker or on an item in a list of locations displayed in a sidebar, an info window will open up at the position of the corresponding marker and display supplementary information about the selected location, which may include a description, images, ratings, tips, etc. retrieved from another API. There will only ever be a maximum of one info window open at any given time.
What I'm confused about is which semantic element or role attribute or whatnot to use to describe the info window and thus how to manage focus accordingly? My current thoughts are:
use the role = 'dialog' attribute and develop the info window as a non-modal type dialog so that external content outside the info window is still accessible. In this case, the marker and list items can have the attribute aria-haspopup = 'dialog' which would nicely alert of the opening of the info window. The problem with this approach is that it is disruptive by nature and it's not exactly critical information being displayed in the info window nor is it information in which the user needs to respond to it.
use an <aside> element since it contains information complementary to the marker or side bar list item clicked upon. The info window will have a title of the location clicked on, so the info window could be viewed as stand alone information. However, I can't use the aria-haspopup attribute in this case. I suppose I could label the marker and list item buttons in such a way as to alert the user that an info window will open up as a result by using aria-label.
use role = 'tooltip' and describe the info window as a tooltip widget. But this implies that focus has to be trapped within the info window until it is closed. In google map's actual implementation of the info window, a user can interact with anything else on the page without focusing the info window to close and I don't think it makes sense to change that default behavior. There's also arguments about whether a tooltip can be triggered outside of a mouseover/hover event and I want the info window to appear on a click event or enter/space key events.
implement the info window as 'collapsible content' and the associated marker and list item buttons as 'disclosure' buttons. This way the user is alerted of extra content appearing in a non-disruptive manner and focus isn't trapped within the info window. Although the styling wouldn't follow the typical styling practices/DOM order of collapsible content since the info window's html wouldn't appear immediately after the html of the button that triggered the info window opening.
Which option(s) is appropriate, or is there a better approach that makes more sense?
Depending on which approach is chosen, should focus be trapped within the info window?
If the info window is closed and the focused wasn't trapped within the info window, where should focus go after closing it using a click event or keyboard shortcut:
The button that opened the info window?
The last focused element before closing the info window (provided the last focused element was outside the info window)? But what if the last focused element was an element within the info window?
The body element or map element?
Also, should focus move immediately into the info window when it is opened or should it remain on the button that triggered it's opening?
I have a page that uses window.open() with a window name to pop up another window that will act as a presentation screen for my app:
window.open(url, 'my-presentation-win', 'resizable');
Now, that works well, and if I trigger that action, and then navigate to a different page, but then come back to the original page and trigger the action again, it brings the original popup window back into focus (the name is honored).
However, if I load the same HTML page in two different browser tabs (Chrome on OSX), and trigger that action in each, I end up with two different windows (each presumably with the name my-presentation-win?). Is there a way for that window to be re-used, when its used by the same app running in different tabs?
I don't think it's possible :(
Access a window by window name
I have a web page where certain links open up a popup window, now if a user is about to be loggedout out we show a jquery layer stating that.
now if he user is still on the popup for a long time he never sees the log out layer and is then automatically logged out
Is there a way to
1.Highlight the main window in the taskbar so the user can take notice and go there
2.Bring the window to the front
We do not want to show any mesage in the popup window
We also do not want to use html5 notifications for now
Also cannot use alert() but need to replicate the behaviour of alert when my layer shows
I'm having an issue with a our main application's window activating itself when the mouse is hovered over it.
I'm opening the new window in a javascript function using the line below:
window.open(URL, 'Requests', 'location=no,toolbar=no,status=yes,scrollbars=yes,resizable=yes');
I have noticed that if I open a new IE window through Explorer, hovering over our main application's window does not reactivate itself. Even in this case though, the main window does make itself be "on top" of the pop-up window created by the window.open command above.
The question is this: Is there any way, when opening a "child" window in javascript, to detach the child window from the parent?
Further info: I am using an Infragistics WebDataMenu with ActivateOnHover set to true so users don't need to click on main menu items to see sub-menu choices. Unfortunately, that setting sensitizes the whole menu bar so that sliding the mouse through it activates the menu (and sadly the window when a popup is active). This is the root behavior I'm trying to fix.
The window.open(); method will create a popup window that really only shares a relationship through JavaScript via the return value of the call, and the window.opener property on the popup window.
What you want is the behavior of a modal window that locks out interaction from the 'parent' page while you work on the 'child' popup.
You can try to fight with JavaScript (and your users) by forcing a focus on the popup and blocking any blurring but this will drive users nuts when they want to go read their email etc. (eg not recommended)
You can also use the not so standard showModalDialog(); method but support is far from fully cross browser and there are a whole bunch of new problems if you try to use this (no right click in IE, zoom issues in IE, and no grandchildren popups to name a few) (again not recommended)
What you can do is make an "overlay" popup similar to many online photo viewers where you first overlay a mask (typically semi transparent) that blocks mouse/focus on the entire page content below and then overlay that with your "popup content". Just be sure that you provide a close option that removes the mask when the overlay is closed/done.
Note if you need to support IE6 you'll also need an iframe shim (Google if needed)
Many UI frameworks will provide a "dialog" just like this for you. (Eg jQueryUI)
Ultimately, I gave up on making this work. I found that what I had to do was turn off ActivateOnHover from the WebDataMenu, which didn't answer this question and requires users to click on the menu to make it drop down, but it became a work-around.
I'm working with a software package that creates Flash panorama .swf's. The package allows the creation of hotspots in the pano. You can specify the URL and the Target of the hotspot, so if you click on the hotspot it launches the URL in _blank, _self, etc.
However, the package doesn't allow you to specify the attributes of the window.
I'm trying to figure out if there's a way for the child window (once the swf opens it), to control it's own window attributes via Javascript.
I want to be able to control the size of the window and hide the address bar, status bar, etc.
One other issue that I need to deal with is this...I don't want the child window to open in a tab, but in a new smaller window...the only way that I've done this in the past is if the parent opens the child window and specify the size and that there are no menu bars and address bars. I'm not sure how to do that from the child window.
want to be able to control the size of the window and hide the address bar, status bar, etc.
You can maybe use window.resizeTo / window.resizeBy to resize the window. I'm saying "maybe" because some browsers will allow this only for windows opened through window.open().
You will not be able to get rid of the address bar and status bar in modern browsers any more for security reasons.
One other issue that I need to deal with is this...I don't want the child window to open in a tab, but in a new smaller window...the only way that I've done this in the past is if the parent opens the child window and specify the size and that there are no menu bars and address bars. I'm not sure how to do that from the child window.
This would amount to turning a "normal" window into a window.open popup window - I don't think that can be done at all.
Sadly, dealing with pop-up windows has become very restrictive because it has been abused so much.