Hi:
Need some working sample code to post hidden form data from a php page
to a new popup window. 540 x 500 centered. The popup that I'm calling
already is formatted and has a TITLE:web-2007.php so what I need to do
is to write the values from the PHP page to that popup in specific
places.
Some of the hidden values are also like this format;
<input type="hidden" name="handling" value="<?php echo $_POST["sub"];
?>">
<input type="hidden" name="email" value="<?php echo $_POST["email"];
?>">
Right now,the hidden input fields are on a PHP page, and I'm calling the
popup from the generated PHP page like so:
<A HREF="javascript:void(0);" style="TEXT-DECORATION: none"
onClick="popUpCenteredWindow();"> <span style="color: blue; font-
family: Verdana;"> Click Here </span></span></A></font>
<script language="JavaScript">
function popUpCenteredWindow() {
var iMyWidth;
var iMyHeight;
//gets top and left positions .
iMyWidth = (window.screen.width/2) - (200 + 10);
//half the screen width etc..
iMyHeight = (window.screen.height/2) - (255 + 1);
//half the screen height etc...
var win2 = window.open("web-2007.php","Window2","status,height=
540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight +
",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
win2.focus();
}
</script>
Need help. Thanks 3 4647
simora wrote:
Hi:
Need some working sample code to post hidden form data from a php page
to a new popup window. 540 x 500 centered. The popup that I'm calling
already is formatted and has a TITLE:web-2007.php so what I need to do
is to write the values from the PHP page to that popup in specific
places.
Some of the hidden values are also like this format;
<input type="hidden" name="handling" value="<?php echo $_POST["sub"];
?>">
<input type="hidden" name="email" value="<?php echo $_POST["email"];
?>">
Right now,the hidden input fields are on a PHP page, and I'm calling the
popup from the generated PHP page like so:
<A HREF="javascript:void(0);" style="TEXT-DECORATION: none"
onClick="popUpCenteredWindow();"> <span style="color: blue; font-
family: Verdana;"> Click Here </span></span></A></font>
<script language="JavaScript">
function popUpCenteredWindow() {
var iMyWidth;
var iMyHeight;
//gets top and left positions .
iMyWidth = (window.screen.width/2) - (200 + 10);
//half the screen width etc..
iMyHeight = (window.screen.height/2) - (255 + 1);
//half the screen height etc...
var win2 = window.open("web-2007.php","Window2","status,height=
540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight +
",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
win2.focus();
}
</script>
Need help. Thanks
Hi,
This can be solved in different ways, depending on your needs/setup.
1) The easiest way is changing the url you use and expand it so it contains
(urlencoded) name/value pairs.
eg:
var theURL = "web-2007.php";
// get some hidden form info:
var firstname = document.forms.formnamehere.firstname.value;
theURL += "?firstname="+firstname;
theURL = encodeURI(theURL);
var win2 = window.open(theURL,"Window2","status,height=
540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight +
",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
Then from the popup, read the URL, and get your name-value pairs out.
2) More complex: Make window-communication.
EG: On the popupwindow add an onLoad-eventhandler that calls a function that
loads info from the opener.
eg:
<body onLoad="loadHiddenInfo();">
....
<script type="text/javascript">
function loadHiddenInfo(){
var firstname = opener.document.forms.formnamehere.firstname.value ;
alert (firstname);
}
</script>
3) Use a SUBMIT instead of a hyperlink. CHange the target of your form to
the name of the window you opened (it must be opened first by yourself if
you want to set dimension like width and height.).
Regards,
Erwin Moller
Hi:
Thanks for the ideas, but I'm not well versed on the level of javascript
required. I'll need more sample code suited to my situation. On my
formatted PHP page, I'm set up to get vlues in this format;
<?php echo $_POST["salutation"]; ?>.
<?php echo $_POST["first_name"]; ?> <?php echo $_POST["last_name"];
?><BR>
<?php echo $_POST["address"]; ?><BR>
What I need to see is both how I can send the hidden values, and how do
I display them on the PHP popup page. I do not need an alert.
Is there some way to make sure that the popup is fully opened before I
start having it get the hidden values.?
=============================================
On Sat, 26 May 2007 03:14:38 -0700, Erwin Moller
<si******************************************@spam yourself.comwrote:
simora wrote:
>Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php so what I need to do is to write the values from the PHP page to that popup in specific places.
Some of the hidden values are also like this format;
<input type="hidden" name="handling" value="<?php echo $_POST["sub"]; ?>">
<input type="hidden" name="email" value="<?php echo $_POST["email"]; ?>">
Right now,the hidden input fields are on a PHP page, and I'm calling the popup from the generated PHP page like so:
<A HREF="javascript:void(0);" style="TEXT-DECORATION: none" onClick="popUpCenteredWindow();"> <span style="color: blue; font- family: Verdana;"> Click Here </span></span></A></font>
<script language="JavaScript">
function popUpCenteredWindow() { var iMyWidth; var iMyHeight; //gets top and left positions . iMyWidth = (window.screen.width/2) - (200 + 10); //half the screen width etc.. iMyHeight = (window.screen.height/2) - (255 + 1); //half the screen height etc... var win2 = window.open("web-2007.php","Window2","status,height= 540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes"); win2.focus(); } </script>
Need help. Thanks
Hi,
This can be solved in different ways, depending on your needs/setup.
1) The easiest way is changing the url you use and expand it so it
contains
(urlencoded) name/value pairs.
eg:
var theURL = "web-2007.php";
// get some hidden form info:
var firstname = document.forms.formnamehere.firstname.value;
theURL += "?firstname="+firstname;
theURL = encodeURI(theURL);
var win2 = window.open(theURL,"Window2","status,height=
540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight +
",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
Then from the popup, read the URL, and get your name-value pairs out.
2) More complex: Make window-communication.
EG: On the popupwindow add an onLoad-eventhandler that calls a function
that
loads info from the opener.
eg:
<body onLoad="loadHiddenInfo();">
...
<script type="text/javascript">
function loadHiddenInfo(){
var firstname = opener.document.forms.formnamehere.firstname.value ;
alert (firstname);
}
</script>
3) Use a SUBMIT instead of a hyperlink. CHange the target of your formto
the name of the window you opened (it must be opened first by yourselfif
you want to set dimension like width and height.).
Regards,
Erwin Moller
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
ma <al.qwest.netwrote:
>
Hi:
Thanks for the ideas, but I'm not well versed on the level of javascript
required. I'll need more sample code suited to my situation. On my
formatted PHP page, I'm set up to get vlues in this format;
<?php echo $_POST["salutation"]; ?>.
<?php echo $_POST["first_name"]; ?> <?php echo $_POST["last_name"];
?><BR>
<?php echo $_POST["address"]; ?><BR>
What I need to see is both how I can send the hidden values, and how do
I display them on the PHP popup page. I do not need an alert.
Is there some way to make sure that the popup is fully opened before I
start having it get the hidden values.?
Hi,
I don't want to be rude: but I adressed those questions.
If you are not able to implement them, what do you want us to do?
Create the whole script without being able to see what you made already?
My suggestion: OR you learn a little JavaScript basics so you can implement
it yourself (it is really easy), OR you hire somebody who can help you with
it.
Sorry mate.
Regards,
Erwin Moller
>
=============================================
On Sat, 26 May 2007 03:14:38 -0700, Erwin Moller
<si******************************************@spam yourself.comwrote:
>simora wrote:
>>Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php so what I need to do is to write the values from the PHP page to that popup in specific places.
Some of the hidden values are also like this format;
<input type="hidden" name="handling" value="<?php echo $_POST["sub"]; ?>">
<input type="hidden" name="email" value="<?php echo $_POST["email"]; ?>">
Right now,the hidden input fields are on a PHP page, and I'm calling the popup from the generated PHP page like so:
<A HREF="javascript:void(0);" style="TEXT-DECORATION: none" onClick="popUpCenteredWindow();"> <span style="color: blue; font- family: Verdana;"> Click Here </span></span></A></font>
<script language="JavaScript">
function popUpCenteredWindow() { var iMyWidth; var iMyHeight; //gets top and left positions . iMyWidth = (window.screen.width/2) - (200 + 10); //half the screen width etc.. iMyHeight = (window.screen.height/2) - (255 + 1); //half the screen height etc... var win2 = window.open("web-2007.php","Window2","status,height= 540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes"); win2.focus(); } </script>
Need help. Thanks
Hi,
This can be solved in different ways, depending on your needs/setup. 1) The easiest way is changing the url you use and expand it so it contains (urlencoded) name/value pairs. eg:
var theURL = "web-2007.php"; // get some hidden form info: var firstname = document.forms.formnamehere.firstname.value; theURL += "?firstname="+firstname; theURL = encodeURI(theURL);
var win2 = window.open(theURL,"Window2","status,height= 540,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
Then from the popup, read the URL, and get your name-value pairs out.
2) More complex: Make window-communication. EG: On the popupwindow add an onLoad-eventhandler that calls a function that loads info from the opener. eg: <body onLoad="loadHiddenInfo();"> ... <script type="text/javascript"> function loadHiddenInfo(){ var firstname = opener.document.forms.formnamehere.firstname.value ; alert (firstname); } </script>
3) Use a SUBMIT instead of a hyperlink. CHange the target of your form to the name of the window you opened (it must be opened first by yourself if you want to set dimension like width and height.).
Regards, Erwin Moller
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Johan |
last post by:
I have a form that submit to the same page when double click on a product:
<form method="post" action="quotes.asp" name="form1"
onDblClick="javascript:formHandler()">
How can I submit the form...
|
by: Eli |
last post by:
How can I POST a form into a new window where I control the size and
other attributes of the new window?
Also. Are there any implications, perhaps due to browser security
(Interne Explorer?)...
|
by: aaa |
last post by:
I am bringing up a popup which has a couple of fields that the user enters.
I fill the hidden fields then submit and close the popup which then reverts
back to my main form, which retrieves the...
|
by: jeffrobbins |
last post by:
Hello, I am having an issue that I haven't been able to find an answer
for. Any help or pointers to information would be appreciated.
I have a form, lets call it mainForm, that contains a...
|
by: Bill Steele |
last post by:
I want to have a window pop up with a form. When the form is submitted,
it needs to pass along the URL of the original window. If find on th
web eight gazillion descriptions of how to pass data...
|
by: Fary4u |
last post by:
Hi Guys
i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem
hidden file value, multiple form or popup uploading.
1-...
|
by: Bam |
last post by:
Hey gang. I have searched the web, and can't find what i need. hoping
someone here can help
i have a form that pops up based on a click. the popup opens up correctly.
now what i want it to do is...
|
by: V S Rawat |
last post by:
using Javascript, I am opening a web-based url in a popup window.
MyWin1=Window.Open(url, "mywindow")
There is a form (form1) in the url in that popup window, I need to
submit that form.
...
|
by: viki1967 |
last post by:
Hidden field
Hello my friends.
This is a htm page that contains a form open in window popUp ( page daughter ).
This form insert a value in the one hidden field called "tec", in other form...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |