I want my web site to open login form in a modal div window (like thickbox works). So I see 2 questions here:
- Client validation – should I send from javascript plain login & password in POST request to the server? Is it safe to do so?
- Using of IFrame. Login link will be on every page in top right corner, so I’m just thinking about avoiding CSS styles collisions and ruining DOM model. What is a best practice here – should I use IFrame or not?
Sending credentials is safe as long as the POST request is using HTTPS.
I would use jQuery UI’s dialog widget. Because it uses jQuery underneath, you can be fairly certain it will be supported across every popular browser. Either way, avoid using an
iframeif at all possible.