473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

To get the window name using PHP

Dear sir,

I have created a windows using javascript's window.open method. So is there any method by which i can get the name of that window using PHP.

Mandar
Dec 4 '07 #1
5 6762
RuthC
33
Dear sir,

I have created a windows using javascript's window.open method. So is there any method by which i can get the name of that window using PHP.

Mandar
Hi,
u can use $_SERVER['REQUEST_URI'] to get the current url.
Dec 6 '07 #2
pbmods
5,821 Expert 4TB
Heya, Mandar.

Do you mean the content of the <title> tag in the HTML?

If you mean the name of the variable that points to the window object... even JavaScript can't do that.
Dec 23 '07 #3
spudse
11
The name of the windows is only available client-side I suppose. PHP can't communicate with a client-side language like Javascript (well it could when you use ajax, but I don't think that is what you are looking for).

What you could do is add the window name to the url that is used by this window, for instance "http://www.yourdomain.com/window.php?name=theName".

You can know access this name with:
Expand|Select|Wrap|Line Numbers
  1. echo $_GET[theName]
Jan 7 '08 #4
Dear sir,

I have created a windows using javascript's window.open method. So is there any method by which i can get the name of that window using PHP.

Mandar
Depending on what you are trying to achieve...

you could use js to assign the window name as a text value to a blank hidden input field, e.g. document.formname['hiddenInput'].value = 'windowName';
submit the form and pick up the name in PHP from the POST/GET array.
Jan 21 '08 #5
Markus
6,050 Expert 4TB
The name of the windows is only available client-side I suppose. PHP can't communicate with a client-side language like Javascript (well it could when you use ajax, but I don't think that is what you are looking for).

What you could do is add the window name to the url that is used by this window, for instance "http://www.yourdomain.com/window.php?name=theName".

You can know access this name with:
Expand|Select|Wrap|Line Numbers
  1. echo $_GET[theName]
Expand|Select|Wrap|Line Numbers
  1. echo $_GET[name]
;)
Jan 21 '08 #6

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

Similar topics

1
by: Ben Smeets | last post by:
Hi folks, Have been trying to figure out a solution for the following problem by reading lots of threads here, but doesn't work out. Hope someone can help me. I have a parent window which...
4
by: Phillip Parr | last post by:
Hello, I have a nice system where someone clicks on a picture to show the full version. This pops up in a window.open box. It works great, the only problem is that if the user clicks a second...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
4
by: Ryan | last post by:
Greetings, I would like to know if I can name my main browser window so that I can link back to it from a pop-up window. I know using <A HREF="url" TARGET="name"> will name the new window being...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
5
by: midnight_use_only | last post by:
hi all, quick question, how do you submit a form to a parent window from a child popup window? i have the following and all online documentation *suggests* that it should work but it does NOT: ...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
2
by: Shelly | last post by:
I have a form that updates and stays in the same window. That is the desired behavior. On this form I also have two buttons. I want those buttons to open up a new window with information taken...
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...

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.