473,387 Members | 1,574 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,387 software developers and data experts.

How do you parse post variables to a popup window?

Hi I know this isnt really a php question but can anyone tell me how
you parse post variables to a popup window, here's my code so far, im
trying to pass the value entered into a radio button:

<head>
<script language="JavaScript" type="text/JavaScript">
var win= null;
function NewWindow(mypage,myname,w,h,scroll)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<form name="answer" action="result.php" method="post">
<input type="radio" name="group1" value="Milk"> Milk<br>
<input type="radio" name="group1" value="Butter"> Butter<br>
<input type="radio" name="group1" value="Cheese"> Cheese<br>
<input type="submit" name="submit" value="submit" src="result.php"
onClick="NewWindow(this.src,'name','300','300','ye s');return false" >
</form>
</body>

Feb 25 '06 #1
2 3490
monomaniac21 wrote:
Hi I know this isnt really a php question but can anyone tell me how
you parse post variables to a popup window, here's my code so far, im
trying to pass the value entered into a radio button:


(JS and HTML snipped)

So why ask in a PHP newsgroup then?

Since it seems to be a javascript question, why not ask in a javascript
newsgroup?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Feb 25 '06 #2
monomaniac21 wrote:
<body>
<form name="answer" action="result.php" method="post">
<input type="radio" name="group1" value="Milk"> Milk<br>
<input type="radio" name="group1" value="Butter"> Butter<br>
<input type="radio" name="group1" value="Cheese"> Cheese<br>
<input type="submit" name="submit" value="submit" src="result.php"
onClick="NewWindow(this.src,'name','300','300','ye s');return false" >
</form>
</body>


Try this:

<form name="answer" action="result.php" method="post" target="name">
<input type="radio" name="group1" value="Milk"> Milk<br>
<input type="radio" name="group1" value="Butter"> Butter<br>
<input type="radio" name="group1" value="Cheese"> Cheese<br>
<input type="submit" name="submit" value="submit" src="result.php"
onClick="NewWindow('about: blank','name','300','300','yes');" >
</form>

Feb 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mosher | last post by:
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...
3
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...
2
by: Terry | last post by:
When launching our application with Internet Explorer already opened, but not pointing to our web server, the session variables disappear. If you open I.E. after launching our app, it works fine....
3
by: Chris | last post by:
Hi, I'm really begginer in javascript. I created a form in a pop-up opened with javascript. how to recover variables of the form in the main page. Thanks for your help Chris.
6
by: nate | last post by:
Hello, Does anyone know where I can find an ASP server side script written in JavaScript to parse text fields from a form method='POST' using enctype='multipart/form-data'? I'd also like it to...
6
by: veganeater | last post by:
Hi Everyone, I was wondering if there was a way to pass a variable to a popup window. The purpose is make it so when a user clicks on a specific region/link of the glossary page, a popup opens...
2
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...
0
by: magix | last post by:
Hi, I launched a modal popup window with code like: <script language="javascript"> function modalWin() { if (window.showModalDialog) { window.showModalDialog("MyPage1.asp","MyPopup",...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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,...
0
jinu1996
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...

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.