Re: is it possilble that a <form> dont open a new window
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: is it possilble that a <form> dont open a new window

From: Yann-Erwan Perio <yep@invalid.com>
Date: Sun Jul 24 2005 - 19:39:00 CEST

Wouter wrote:

> check: http://webshop.addrenaline.com/content/algemeen/algemeen/0/
> if you want to login you can use as pass and login: usenet

Thanks this is clearer now.

The approach in your page is dependent on javascript, which means that
if your user does not have javascript activated, it will fail. Moreover,
it's dependent on popups, which may be blocked by popup blockers.
Therefore, if you have the chance, I suggest you drop the popup thing
and include the login/password fields directly in the main page.

Now, if you want to keep this popup approach, then update the main file
and the popup file with the following patterns.

--- main file ---
<script type="text/javascript">
self.name="main";
</script>

<a href="login.html"
    target="popup"
    onclick="loginPopup=window.open(this.href, this.target)">Login</a>

---
--- popup file ---
<form action="doLogin.html"
       target="main"
       onsubmit="setTimeout(function(){window.close()},1);return true">
   <input type="submit">
</form>
---
HTH,
Yep.
Received on Tue Oct 18 03:00:47 2005