View Full Version : What does this mean in a Javascript?

Jun 6th, 2004, 06:46 PM
Someone wrote some code for me that contains the following statement, and I'd like to know what it means. The statement (contained in the HEAD section, sandwiched between <script> and </script>, is:

function yourfunctn(s) {
window.open("?xz="+s,"data","resizeable=yes[etc etc--other variables for the window to be popped-up]");

This statement is contained within some HTML code that is written to a window. xz is the name of a variable that the PHP script contains. xz clearly is the name of a file that's written in the window.

What I want to know is, what is the meaning of the ?, the =, and the +s in the statement above.

Tnx in advance.

Willy Duitt
Jun 6th, 2004, 07:28 PM
Look at the url to this thread:


Jun 6th, 2004, 08:31 PM
a ? mark is used to seperate the url on the rigth side of it from the data on the left. basicly the idea is to pass data from page a to page be by writing in the link on page a: b?name=value.
then on page be you would have access to a variabel called name with the value as its value in a server side language, and in javascript using a user made script.

Jun 6th, 2004, 08:35 PM
What Gardon said is pretty much correct. This is referred to as a query string (http://www.webopedia.com/TERM/q/query_string.html).