| Web Design and Hosting Creating sites, scripting, and hosting discussions. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
|
Guest
Posts: n/a
|
Hello,
I have a script in which from parent browser, I open a pop up window. Clicking submit on Pop up window, should close the pop up window and submit the values to the parent window. The code on parent window(say parent.php) is something like this: <script language=javascript> window.name="jobpost"; window.open('xyz.php', 'xxx'); </script> The code on xyz.php is something like this: <form name=form1 method=post target=jobpost> <input type=button value="Apply" onclick="javascript:OnApply();"> </form> <script language=javascript> function onApply(){ document.form1.action="parent.php"; document.form1.submit(); self.close(); } </script> The above code works on windows IE as well as NN. But it doesnot work on Mac. It gives lot of errors . When I do not submit to parent window, no error comes. Can anyone help me on this issue?I have no button named Submit in pop up window as well as parent window. Thanks |
| QUOTE Thanks | |
![]() Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,905
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
|
Ok here is my popup code...
Code:
function popup( page, title, w, h, scroll ) {
if (!title) title = 'Popup';
if (!scroll) scroll = 'no';
if (!w) w = 500;
if (!h) h = 350;
var wintop = (screen.height - h) / 2;
var winleft = (screen.width - w) / 2;
var atts = 'width='+w+',height='+h+',scrollbars='+scroll+',resizable,screenX=150,screenY=150,top='+wintop+',left='+winleft+'';
win = window.open( page, title, atts);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
Code:
top.opener.location.href ![]() Cheers! ---> Join the Mac-Forums Folding team: use 37954 as your team number.View Mac-Forums Folding team statistics (More Info) Don't forget to use the User Reputation System |
| QUOTE Thanks | |
|
Guest
Posts: n/a
|
The problem is I need values from pop up window into the parent window. If I use, top.opener.location.href, then the page doesnot get submitted and I donot get values. If I use javascript to assign values, like top.opener.form1.field1.value it gives problem with array elements. I am using php to code. I have a field called grades which is an array. So to use something like following, doesnt work in Javascript. document.popup.grades[].value = top.opener.posting.grades[].value; Do you have any suggestion for the above problem? |
||||
| QUOTE Thanks | |||||
![]() Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,905
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
|
Hmm... I see what you are saying.. Ok what I would do is submit the form to <?=$_SERVER["PHP_SELF"]?> then parse your post variables
PHP Code:
grade1=value&grade2=value&grade3=value so forth and so forth.. that should help you out a bit there.. ---> Join the Mac-Forums Folding team: use 37954 as your team number.View Mac-Forums Folding team statistics (More Info) Don't forget to use the User Reputation System |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Where Are The Windows Switchers? | mimmyhonker | Switcher Hangout | 12 | 07-15-2008 04:19 PM |
| iPod for Windows and Mac? | MacAddikt | iPod Hardware and Accessories | 12 | 03-31-2007 09:33 AM |
| Windows 2003 File Sharing | darvay1 | OS X - Operating System | 0 | 09-08-2004 09:43 AM |
| Mac dial in to Windows RRAS tips | kermit4karate | OS X - Operating System | 1 | 08-13-2004 01:56 PM |
| Windows XP on my mac | natey | Switcher Hangout | 5 | 03-14-2004 01:00 AM |
All times are GMT -4. The time now is 08:25 AM.
Powered by vBulletin