SageFix. LetsFix!  
Current Location : Home > Web Development > JavaScript > pop up windows and forms Share/Save/Bookmark    

Main Menu
SageFix - Let's Fix

Board Categories
    Web Site Designing
- Graphics
    Web Development
- .NET
- Classic ASP
- JavaScript
- PHP
    WebSite Management
- Promotion Techniques
- Search Engine Optimization
    Databases
- MySQL

Tutorials

Database Connection Strings

  Contact Us


 1 - 6 of 6 [Total 1 Pages]  
pop up windows and forms      Jul 28, 2002, 00:58 1
  
I'm stumped with this at the moment. I have a small pop up login window with username and password fields. Instead of a submit button I have an image (a gif with "enter"). When the user clicks on the image I want the pop up window to close and the appropriate page to open in the parent window. But so far I can only get this to work if the input type is a button and not an image. Is it the case that this won't work with input type="image"? Or is there something wrong with my code? What I have so far is
Quote:
<input type="image" border="0" src="../images/enter.gif" name="submit" onClick="window.opener.location.href='../client_area/movie.php';window.close();">
But it's not working. Any ideas on what's wrong? Thanks...

 
      Jul 28, 2002, 01:08 2
  
Something like this perhaps?
Code:
<form name="submitForm" target="self.opener" onSubmit="setTimeout('window.close()',500)">	.....form stuff....	<input type="image" src="submit.gif" onClick="this.form.submit();" /></form>

 
      Jul 28, 2002, 06:32 3
  
That would definately do it!

Flawless

 
      Jul 28, 2002, 08:01 4
  
In retrospect, I'm not sure if 'self.opener' is valid for the target. It's correct in javascript, but I dunno if the target attribute will accept it. If not, use this workaround
Code:
<script>self.opener.name='parentWin';</script></head><body><form name="submitForm" target="parentWin" onSubmit="setTimeout('window.close()',500)">....etc.....

 
      Jul 28, 2002, 10:49 5
  
Thanks, beetle! The workaround you put up in your second post worked like a dream (without the workaround it gave me a new pop up window). Many thanks....

 
      Jul 28, 2002, 10:57 6
  
Anytime...

 
 1 - 6 of 6 [Total 1 Pages]  









Subscribe to our mailing list
email


Current Location : Home > Web Development > JavaScript > pop up windows and forms Share/Save/Bookmark    

Development problem? SageFix is completely free -- paid for by advertisers and donations. Click here to Contact Us If you have any query. Enjoy!
Request processed in 7.0E-5 seconds Home - Contact Us - Terms Of Service - Privacy Policy - Copyrights - Top
Advertisements do not imply our endorsement of that product or service.
Current server time now is 18-Mar-2010 06:07:22
Copyright © 2009 Sagefix Inc. All rights reserved.
Powered By SageFix