# Login Form Problem

**URL:** <https://forum.kirupa.com/t/login-form-problem/240401>\
**Category:** flash\
**Created:** [October 2, 2007, 5:37pm UTC](https://forum.kirupa.com/t/login-form-problem/240401 "2007-10-02T17:37:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsmflash](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@dsmflash](https://forum.kirupa.com/u/dsmflash)\
**Post date:** [October 2, 2007, 5:37pm UTC](https://forum.kirupa.com/t/login-form-problem/240401/1 "2007-10-02T17:37:53Z")

</div>

I’m trying to create a simple login form that takes user to a url containing a .pdf file. Each username and password links to a specific url. Frame 1 is my form and frame 2 would contain my error page with a back button. However, even when you enter one of the correct usernames and passwords, the window will open, but the playhead still goes to my error page, which of course i do not want. Also, the browser window opens in some browsers, but for example gets stuck in IE 7. This is my code for the submit button:

on(release){  
if(user == “customer”){  
if(pass == “customer”){  
var jscommand:String = “window.open(‘[http://www.splashadvertising.com/assets/clients/customer.pdf’,‘win’,'height=700,width=600,toolbar=no,scrollbars=yes,location=no](http://www.splashadvertising.com/assets/clients/customer.pdf','win','height=700,width=600,toolbar=no,scrollbars=yes,location=no)’);”; getURL(“javascript:” + jscommand + " void(0);");  
}  
}  
if(user == “customer2”){  
if(pass == “customer2”){  
var jscommand:String = “window.open(‘[http://www.splashadvertising.com/assets/clients/customer.pdf’,‘win’,'height=700,width=600,toolbar=no,scrollbars=yes,location=no](http://www.splashadvertising.com/assets/clients/customer.pdf','win','height=700,width=600,toolbar=no,scrollbars=yes,location=no)’);”; getURL(“javascript:” + jscommand + " void(0);");  
}  
}  
else{  
gotoAndStop(“error”);  
}  
}

This should be simple, but it does not work? What am I doing wrong?  
Thanks
