Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Problem with popup window

Problem with popup window

huskers
10-14-2005, 04:10 AM
Hi All

I am trying to pass some values through a URL to a popup window .....



<Script Language="JavaScript">
<!--
function load(code,leader,passcode,area,value,pid) {

var url = 'change.php?id='+code+'&leader='+leader+'&passcode='+passcode+'&val='+value+'&area='+area+'&pid='+pid;

var load = window.open(url ,"change","scrollbars=no,menubar=no,height=100,width=400,resizable=yes,toolbar=no,location=no,status=no");

}
// -->
</Script>

I am assigning the proper values to the variables and a popup window is opening when I click on the hyperlink.

<td class=prompt nowrap><a class=lnk href=http://www.codingforums.com/archive/index.php/# onclick=\"

load('".$t."','".$leader."','".$passcode."','".$area."','".$values[$z+1]."','".$pid."');\">".$labels[$z+1]."</a></td>


The problem is ariasing when I am trying to perform the following things in change.php(here is where I write the code for the popup window)
<head>
<script Language=Javascript>
function ReloadParent() {
window.opener.document.location.reload();
}
</script>
</head>

<body bgcolor="http://www.codingforums.com/archive/index.php/#FFFFFF" onUnload='ReloadParent();'>


if ($_GET['id'] && $_GET['leader'] && $_GET['passcode'] && $_GET['val'] && $_GET['area'] && $_GET['pid']) {

<form method=post action=change.php>
.
.
some code
.
.
</form>

}else

if ($_POST['area'] && $_POST['oldv'] && $_POST['pid'] && $_POST['id'] && $_POST['leader'] && $_POST['passcode'] && $_POST['nval']) {


}

else

{
<tr><td align=center class=prompt>No username,password, or level was entered.</td></tr>

}

At times it is executing correctly and at other times The control of the program is going to last else clause and its displaying that "No username,password, or level

was entered" eventhough I have supplied them..................

I am been trying to solve this problem from quite a few days and I am posting this as a last resort ............Please help.

Thanks
Huskers

pccode
10-14-2005, 08:57 AM
If you could post your entire script, I will test it and post any errors I find. It's very difficult to say what the problem is without seeing the whole script. I do have one suggestion though. In php, it automatically interprets all of the variables contained between quotes. So http://www.codingforums.com/archive/index.php/instead of using quotes around each variable, just put the quotes at the beginning and end of the content that you want to print. Also, I would suggest placing the link function directly after the href= http://www.codingforums.com/archive/index.php/instead of using the onclick event handler.


echo "<td class=prompt nowrap><a class=lnk href=\"javascript:load('$t','$leader','$passcode','$area','$values[$z+1]','$pid');\">$labels[$z+1]</a></td>";

huskers
10-14-2005, 08:27 PM
Thanks for ur help ............
My problem got solved ...


 

TOP

For more info

setting a minimum size
Auto Preview of Image 
Refresh with a query s
JS Validation obsolete
Javascript Pop up func
Slide show transitions
I'm a newbie...please!
how to write coding in
Advanced Debug Info 
.js file doesn't work 

News Archive

Adding Graphic To Text
re-direct form after s
pop up window controls
Clock on homepage - He
passing a param from a
Password Procection wi
document.title in same
focus onload 
Counting Wrong from Ri
Help needed on how to 

Related stories:

Accessing the CD drive from a disk in...the same drive!
Why doesn't 'total' box work!?
Time Refreshing
(please) Help with onmouseover images
Changing the onClick function call dynamically
need help running two sricpts on one page
Javascript / PHP Date Function
Calculating string width in pixels

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics