Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 18th, 2005, 02:54 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Event handler problem

Why doesn't this script work in Internet explorer but in Mozilla firefox it work fine
In exploer I only got the 'bye now' message when I push the send button.
Please HELP!!!!

http://medlem.spray.se/carro82/open.php
[code]
//Open.php
<?
include ("window.php");
?>
 <?php
 echo "<form>
 <input type=\"button\" name=\"submit\" value=\"Open window\" onclick=\"WinOpen()\">
 </form>";
 ?>
<script language="JavaScript">
var msg=null;
function WinOpen() {
  msg=open("","displayWindow","toolbar=no,directorie s=no,menubar=no,width=600, height=600 resizable=yes" );
  if(msg == null)
    alert('Popup was blocked');
  msg.document.write("<HEAD><TITLE>Window!</TITLE></HEAD>");
  msg.document.write("<html><head><title>Window</title>");
  msg.document.write("<meta http-equiv='Content-Type' content='text/html' charset=iso-8859-1'>");
  msg.document.write("</head>");
  msg.document.write("<frameset rows='*' cols='65%,35%' framespacing='1' frameborder='1' border='1' >");
  msg.document.write("<frame src='file1.php' name='bottomFrame' scrolling='NO' resizable=yes >");
   msg.document.write("<frame src='file2.php' name='bottomFrame' scrolling='AUTO' resizable=yes ></frameset");
  msg.document.write("<noframes><body></body></noframes></html>");
}

</script>
//file1.php
<html>
<head>
<meta http-equiv="refresh" content="2"; URL="file1.php">
<?php
echo "frame1";
?>
</head>
</html>

//file2.php
<html>
<head>
<body onunload="alert('bye now!');">
<form method="post" action="file2.php">
<textarea name="meddelande" cols="30" rows="7" scrolling="NO" noresize>
Reply With Quote
  #2 (permalink)  
Old May 20th, 2005, 03:30 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I solved why it doesn't work. I think it has to do with frame. If i don't use frames in the script it works fine.
Is there someone that can tell me how onunload and onload work with frames. And give me some script that works.

solution

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO ADD AN EVENT HANDLER pallone .NET Framework 2.0 10 September 16th, 2008 12:28 PM
Mouse Event Handler daniel.mihalcea C# 2008 aka C# 3.0 1 September 8th, 2008 06:30 AM
Event handler samir_katore Pro VB 6 6 June 8th, 2006 01:22 PM
PreDefined Event Handler mark C# 1 June 7th, 2003 04:47 AM



All times are GMT -4. The time now is 01:53 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.