Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags:

Problem to detect the javascript opener.

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-06-2009
garfield1's Avatar
Member
 
Join Date: May 2008
Posts: 91
Problem to detect the javascript opener.

Hi,

I have this problem with my code.
The script don't detect the opener windows when the page is launched.
Anyone know what could be the cause? may be I have messed up with the syntax.
Reply With Quote
  #2  
Old 29-06-2009
Solaris's Avatar
Member
 
Join Date: Apr 2008
Posts: 89
Re: Problem to detect the javascript opener.

This is the syntax for javascript opener.

Code:
window.opener = value             
It is possible to use the following syntax to reach deeper into the 
heritage of the window:

window.opener.opener...
window.opener.document.getElementById("elementID").propertyName = value
This is an example:

Code:
<html><body>
<script language="JavaScript">
    var newWin
    function function1() {
         newWin = window.open("http://www.java2s.com", 
                              "subwindow", 
                              "width=400,height=150, resizable, top=250") 
    } 
    function hi() {
        if (!newWin.closed) {
            alert("The subwindow is closed");
        }
    }
</script>
<p style="text-decoration:underline; 
   cursor:hand;" 
   onClick="function1();">
   Click to open new window
</p>
</body></html>

Reply With Quote
  #3  
Old 29-06-2009
Y2kCyK's Avatar
Member
 
Join Date: Apr 2008
Posts: 51
Re: Problem to detect the javascript opener.

I am working with javascript opener & having some trouble & my friends told me to convert whitespace to . In this way the browser will be able to request it and the server to understand the request.
Is it helpful to work out with the link?
I have this:
Code:
<a href="javascript:;" onclick=opener.location="hello.php?id=$var">$var</a>
Thanks
Reply With Quote
  #4  
Old 29-06-2009
Israar's Avatar
Member
 
Join Date: Apr 2008
Posts: 54
Re: Problem to detect the javascript opener.

Hi I am working with asp.
My problem is that my javascript window.opener works with IE but not in mozilla Firefox, what could be the reason? IS there something I need to add in my code? working with Javascript Debugger extension in Firefox,"window.opener" do not return any value.

Code:
sheetSelector = window.open("http://localhost/MYPRINT/PopUps/PriceSheetSelector.asp" + querystring,"priceSheetTagSelector","height=800,width=925,left=250px");

window.opener.parent.frames.frmAddTag.location = "AddTagFrame.aspx" + tagQueryString;

Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Problem to detect the javascript opener."
Thread Thread Starter Forum Replies Last Post
How to detect when scrolling occurs in JavaScript? warehouse peon Software Development 5 03-02-2010 04:17 AM
Free .rar file opener RockeЯ Windows Software 3 15-06-2009 05:49 PM
Problem with JavaScript Chintam Software Development 4 14-03-2009 01:47 PM
Detect IE 7 Protected mode using javascript John Vista Security 0 28-09-2008 05:03 PM
TrekStor USB drive 16GB With Bottle opener Scubie67 Portable Devices 1 09-09-2008 09:01 PM


All times are GMT +5.5. The time now is 08:40 AM.