Hello all, is there any way to send php variables to another popup html
window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50>
click here </a>
....that will popup another window. This new window should be able to use
those variables.
Thanks in advance.
Mosher 6 3559
*** Mosher escribió/wrote (Fri, 11 Mar 2005 16:40:59 -0600): Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50> click here </a>
...that will popup another window. This new window should be able to use those variables.
You can do this:
<a target=new href="/main.php?userna me=test&id=50>c lick here</a>
Further info: http://www.php.net/manual/en/reserve....variables.get
--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Manda tus dudas al grupo, no a mi buzón
-+ Send your questions to the group, not to my mailbox
--
Mosher wrote: Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50> click here </a>
You've answered your own question. The target attribute
'specifies the name of a frame where a document is to be
opened' (HTML4.01 sec. 16.3).
There are a number of questionable things in your example,
though, not least of which are the two glaring syntax
errors: a missing double quote and an unescaped ampersand.
But browsers are usually quite tolerant of those. More
likely to cause problems is your address not beginning with
'http://', which leaves browsers to interpret it relative to
the base URI.
...that will popup another window.
There's nothing to say it will. For starters, it's not a
requirement. Some people don't like popups, so they block
them. More, if there's already a window named 'new', the
page should not open in another one.
This new window should be able to use those variables.
Window? Windows don't use variables. The resource
identified by the address could use them, but that address
probably doesn't identify a resource. Do you get a 404?
--
Jock
You most likely don't want the username and id posted into the address bar
as there are security issues with this.
Session register variables and you can use them on any page the user opens
from your site.
Eg.
<?php
session_start() ;
session_registe r("username") ;
$username = "user";
...........
In the popup window you can now reference the variables as long as you
include the session_start() ; at the start of the page.
Brent Palmer.
"Mosher" <mo***********@ yahoo.com> wrote in message
news:u_******** ************@co mcast.com... Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50> click here </a>
...that will popup another window. This new window should be able to use those variables.
Thanks in advance.
Mosher
Maybe you can put those variables in a cookie/session?
if you register them like $_SESSION['myvarx'] = $myvar I think that
you can use them in the other window then: $myvar =
$_SESSION['myvarx']
I'm not sure about this. http://eye.cc -php- web design
I seem to have found a solution with the following in the form window:
<a href="#"
onclick="javasc ript:window.ope n('main.php?use rname=$username &id=$id','mywin dow','width=400 ,height=450,scr ollbars=yes,res izable=yes')">c lick
here</a>
Thanks for the help.
Mosher
"Mosher" <mo***********@ yahoo.com> wrote in message
news:u_******** ************@co mcast.com... Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50> click here </a>
...that will popup another window. This new window should be able to use those variables.
Thanks in advance.
Mosher
This is ok as long as you don't mind the username and id being public in the
window.
You would be better off using session var's.
Brent Palmer.
"Mosher" <mo***********@ yahoo.com> wrote in message
news:rJ******** ************@co mcast.com... I seem to have found a solution with the following in the form window:
<a href="#" onclick="javasc ript:window.ope n('main.php?use rname=$username &id=$id','mywin dow','width=400 ,height=450,scr ollbars=yes,res izable=yes')">c lick here</a>
Thanks for the help.
Mosher
"Mosher" <mo***********@ yahoo.com> wrote in message news:u_******** ************@co mcast.com... Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this...
e.g., <a target=new href="www.mydom ain.com/main.php?userna me=test&id=50> click here </a>
...that will popup another window. This new window should be able to use those variables.
Thanks in advance.
Mosher
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pack Fan |
last post by:
I've noticed that session variables will persist on Mac IE even after all
browser windows have been closed. One must quit the program to clear the
session variables. This presents a security risk for my session variable
based security scheme.
Basically, the risk is that a user will login to my site, close the window
when done and allow someone else to come up to the machine, go back to my
site and be logged into the previous user's...
|
by: Daniel |
last post by:
Hullo =)
Inspired by another guy's questions here I've created an isset function that
works (almost) like the one in native PHP:
function isset(variablename) {
return(typeof(eval("window."+variablename))!='undefined');
}
I use it like if(isset('myVar') { alert(myVar); }
|
by: Marco Alting |
last post by:
hi
I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question
is, how can I send the variable values from one function to another in a new
window?
Thanks,
Marco
|
by: adeon |
last post by:
Hi,
I'm trying to create specific pop'up window (for product category
selection), but in JS I'm a newbie
and some problem occured, so I have a question:
Is it possible in main window (that opens a popup) to set in popup window:
1. global variables
2. form fields
|
by: Lars Netzel |
last post by:
Hello!
I have a button, in the click event I have this code:
----------------------------------------------------------------------------
----------------------------
Response.Write("<script
language=javascript>window.open('CrystalReports.aspx?FromDate=" &
txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" &
drpReports.SelectedValue & "');</script>")
| |
by: Bill |
last post by:
I've noticed that in my ASP application that session variables are not carried over from
one IE6 open browser window to another.
Can anyone tell me how IE can do this? It seems like it's a useful protection mechanism
that I can add to my application.
BTW, I'm looking for a way to determine if someone is moving cookies between computers.
How IE and/or ASP handles sessions might give me some insights (and I'm open to
suggestions as to...
|
by: BillE |
last post by:
When a user opens a new IE browser window using File-New-Window the
integrity of an application which relies on session state is COMPLETELY
undermined. Anyone who overlooks the fact that File-New-Window creates an
instance of IE in the same process with the same SessionID as the parent
window is in big trouble. This fundamentally restricts the usefullness of
using session state management.
I probably missed it somewhere - can...
|
by: ahoyer |
last post by:
Im currently writing a small phone directory, that allows a user to search by given name, surname, address, etc. everything is implemented with asp.net (the backend is in c#).
My problem comes about when i want to pass the user entered values across to another window, that displays the results, using javascript. The easiest and most secure way for me to do this i think would be using asp.net's session variables.
I know how to access...
|
by: phoenix917 |
last post by:
I have been working on this code for 5 days... I have read multiple tutorials and looked at various code. This is my third forum try... :) My instructor refuses to help me. I think it's because I'm a good student. They assume you know it all. :) Well, I don't and I'm getting a little frustrated and wonder if you guys can shed some light? It's an 8 ball. It works. I've tested and tested but can't find where to put the oldQuestion...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |