Assign An Window Object Variable To An Already Opened Window
Jul 23, 2005
Is that possible I can assign an window object variable to an already opened
window? With window.open(), we can get a window object from opened window.
If a window has already opened, is there any way I can attach that window
with an object variable in javascript? Because I want to communicate with
that window.
View 3 Replies
ADVERTISEMENT
Aug 8, 2007
I know I can get the window object by using
obj = window.open( .... );
but what I need is, after the new window is popped up, the opener will
be redirected to another page, I want the another page able to control
the popup window is it possible? is there something like getWindowById.
View 2 Replies
View Related
Jan 3, 2011
I have a window with a form that is accessed directly. I would like to pop open another window from it and make the new window the parent/opener. I've tried the following but I keep getting 'opener is null' after trying to access the new parent's Javascript methods.
Code:
childWindow = window.open(someUrl);
window.opener = childWindow;
...
opener.someMethodInNewParent();
Am I going about it the correct way? Or is it not even possible to create a window and assign it as an opener to an existing window?
View 2 Replies
View Related
Mar 24, 2011
i have this code i need to close the parent.html window when the child window opened, i need the code for that working well in IE and Firefox Parent.html
<HTML>
<SCRIPT TYPE="text/javascript">
function sendTo()
{
window.open('child.html','_blank','resizable=yes,width='+(screen.width-500)+',height='+(screen.height-500)+'');
}
[Code]...
View 2 Replies
View Related
Dec 24, 2005
I am trying to open up a new window and then get the current url/location
back from the (win_1) window and display the url in an alert box.
Here is the code I am using :-
<script type="text/javascript">
var mywin_1 = open ("http://www.anysite.com/index.htm", "win_1",
"height=640, width=820, left=200, top=0, scrollbars, status, location");
var temp = mywin_1.location;
alert (temp);
</script>
Where am I going wrong?
View 2 Replies
View Related
Jan 3, 2011
Here is the program: [URL] Basically, I want to input a number in the input box, which assigns a number to the variable numval located at document.box1.b1. When clicking on the "new window" button, an alert displays the input box value, then another window opens and displays the integers 1 through 12 and the amount squared.
I would like the new window to obtain the number from the previous window so that the new window will display integers (and their squares) from 1 to the value of numval.
View 3 Replies
View Related
Jun 3, 2009
I am doing a chating application.I want to know whether a window is opened or not. This is the code i am using to open a window.
var title='Chat_'+userId+"_"+selectedUserId;
var url="OneToOneChat.aspx?FromUserId="+userId+"&FromUserName="+userName+"&ToUserId="+selectedUserId+"&ToUserName="+selectedUserName;
window.open(url,title,'width=410,height=400,toolbar=no,menubar=no,scrollbars=no,status=yes',false);
later i trying whether the window is already opened or not.
[Code]...
for win.closed it is giving javascript error like "closed is null or not an object". I am using IE7.
View 2 Replies
View Related
Jul 23, 2005
How is it possible to take the value of a variable (in this case,
MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name?
In the following example I want 'oIcon' object to have the properties:
mode1, mode2, and mode3.
This seems simple but I can't quite figure it out...
Any ideas anyone?
var MODE_CREATE = "mode1";
var MODE_UPDATE = "mode2";
var MODE_DELETE = "mode3";
var oIcon = {
MODE_CREATE: "create.gif"
, MODE_UPDATE: "update.gif"
, MODE_DELETE: "delete.gif"
};
var oTitle = {
MODE_CREATE: "Create a new item..."
, MODE_UPDATE: "Update this item..."
, MODE_DELETE: "Delete this item..."
};
View 16 Replies
View Related
Jul 20, 2005
i have popup window that maybe covered by other windows or minimized how can i use javascript to check for existence of a window named "AAA" and if exist open and raise it to the top of the stack so that its becomes viewable ?
View 1 Replies
View Related
Jun 22, 2009
How to close window when it is opened under a tab?
normally....window.close() will work for a single window
View 2 Replies
View Related
Jul 26, 2006
I am opening one new window using open.window() function.
Suppose if user minimize that window then how i can show blink on that window if any event occuir on that window....
I do't want one more pop-up for user its not user friendly....
View 12 Replies
View Related
Jul 23, 2005
Does anyone know why the following function works in FireFox but not in IE6?
function ShowTable()
{
clonedNode = document.getElementById("myTable").cloneNode(true);
win = window.open();
win.document.body.appendChild(clonedNode);
}
I am trying to display a table with id="myTable" in a new window. IE6
complains that "document.body" is null or not an object.
View 2 Replies
View Related
Jan 11, 2006
If I open a window like this
mywin=window.open("http://localhost:3456/" );
Is there a way to find out, in the calling javascript code, if the opened window mywin could read server information from "http://localhost:3456/".
I tried mywin.error and mywin.status, but it's not yet clear to me what to do.
In mywin, the (Dutch) InternetExplorer version, it can, sometimes say, could not open this page. (To be exact: In Dutch "De pagina kan niet worden weergegeven".)
My goal is actually to find out, if there is something running on localhost that is listening on port 3456. There might be other ways to do this then checking mywin even?
View 3 Replies
View Related
Mar 10, 2004
I have a form that I link to from several locations. Right now I use JS in the link to the page to open it a specific size. I would rather simplify the links and just put the dimensions in one place...the file that opens. Is there a best way to force a page to be opened in a specific size without putting JS in the link? I would just use target="_blank" to get it in a new window.
View 2 Replies
View Related
Jun 3, 2011
In one of my webpage, I have a child window gets opened. How to get the child window's reference in to my javascript and access its elements? I am aware of the method: child = window.open(....) However, I can't use this logic because, I can't change the code of the web page since I am not the developer. So, I want logic to get the reference of an already opened child window.
View 4 Replies
View Related
Nov 21, 2007
I was wondering if the following would be a valid JavaScript
assignment vor a variable and if anybody knows this to work in IE6 or
lower?
var someVar = (typeof(someVar) === Object) ? this : getVar();
function getVar(){
alert('getVar() called');
return(true);
}
alert(someVar);
alert(someVar);
It seems to be working in FF 2 an Safari 3.
View 9 Replies
View Related
Jul 23, 2005
The application I am working on uses Frames (TopFrame, SideFrame(Left)
and the MainFrame). On the occurance of a certain event, I am closing
the window from one of the frames. This is the script I use.
function CloseWin ()
{
window.opener = window;
window.close();
}
Works perfectly well with IE. But not with Netscape. The Javascript
console says 'Script may not close windows that were not opened by the
script'. Is there any workaround to this?
View 8 Replies
View Related
Jul 23, 2005
Is it possible, to hide the menubars of a browser, if the window is already
opened? I want to post a html-form to a "_blank" target (new window). This
new window should have no Menubars.
View 1 Replies
View Related
Oct 6, 2009
How do I set the contents(src) of a frame in a frameset when opened in new window?(frameset has a frame called APtop)I have following code
newWind = window.open("http://server/db.nsf/ActionPlan?OpenFrameSet","_blank");
newWind.frames['APtop'].location.replace("http://server/db.nsf/Administration?OpenPage");
It does not work... I even tried
newWind.document.getElementById('APtop').src = "http://server/db.nsf/admin?OpenPage";
How do i do this?
View 4 Replies
View Related
Jun 30, 2010
I have a thumbnail gallery on my website. The thumbnails can be opened in a new window using:
<a href="/images/flowers22.jpg" target="_blank"><img src="images/flowers.jpg" alt="flowers" onClick="MM_openBrWindow('/images/flowers22.jpg','','status=yes,width=630,height=379');return false" /></a>
I have inserted javascript code into my .js stylesheet to disable the right clicking of images on the page where the thumbnails are:
[Code]....
However, when the images open in a new window, the 'no right click' function does not apply. Does anyone know how to disable the right click for the newly opened images?
View 6 Replies
View Related
Jun 16, 2005
I want to prevent an opened window to be closed by clicking the right-top 'X' . Whenever user try to close the window by clicking the right-top 'X', an alert message will be generated and it will not be browser specific.
View 6 Replies
View Related
Mar 19, 2010
Suppose I have multiple pages, and one javascript file (the js file is available to all pages). Using a javascript function I open a new window from first page. Script looks like this:
[Code]...
What I would like to do is close this window as soon as other pages load. Suppose user clicks a menu and that load a new page. But I would like to close the child window after the 2nd page load. Is it possible to close the window in the second page with the name (using the same java script, or may be use another java script)?
View 1 Replies
View Related
Feb 18, 2010
I've been struggling on how to make this work.I have a problem in Javascript when it comes to passing of value in a input type field.
page1.html
<html>
<head><title></title></head>
<form action="" method="post>
[code]....
View 5 Replies
View Related
Feb 17, 2010
I have a problem in Javascript when it comes to passing of value in a input type field.
page1.html
Code:
<html>
<head><title></title></head>
<form action="" method="post>
<input type="text" name="weight" value=""><a href="hw_calculator.html"
[Code]....
View 1 Replies
View Related
Jul 20, 2005
I'm using window.open and as soon as I click on the link to open the new window, my original page content is replaced with '[object]'.
<
href="javascript:onClick=window.open('leaving.htm','','t oolbar=no,location=no,status=no,menubar=no,scrollb ars=no,resizable=no,width=300,height=400')">Lin
1 </a>
Any ideas ...
View 1 Replies
View Related
Jun 27, 2002
I need the most efficient way of passing a variable from a parent window to a popup window.The reason i say "most efficient" is because i currently do it like this from the parent:[code]But this is inefficient because at times it randomly alerts "undefinded".Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.
View 1 Replies
View Related