JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 18th, 2012, 05:03 PM
codernoob codernoob is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 1 codernoob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 20 sec
Reputation Power: 0
Question Need help to combine CSS with Javascipt - Login form

Hi,

Am building a website - which will run on bunch of network computers.
Practically new to Javascript and CSS and so been using available templates and code snippets to build this.

I have a CSS code for the login box whichs is as below


Code:
    
    <H2>Admin Login</H2>
    <br />
    <br />
    <div id="login-box-name" style="margin-top:20px;">Username:</div><div id="login-box-field" style="margin-top:20px;"><input name="q" class="form-login" title="Username" value="" size="30" maxlength="2048" /></div>
    <div id="login-box-name">Password:</div><div id="login-box-field"><input name="q" type="password" class="form-login" title="Password" value="" size="30" maxlength="2048" /></div>
    <br />
    <span class="login-box-options"><input type="checkbox" name="1" value="1"> Remember Me <a href="#" style="margin-left:30px;">Forgot password?</a></span>
    <br />
    <br />
    <a href="#"><img src="images/login-btn.png" width="103" height="42" style="margin-left:90px;" /></a>



Now I have a simple javascript username/password script which I would like to combine (this owrks fine in its own way - but i would like to add the above css /PSD combination for login with this code below):

Code:
    <script type="text/javascript">
    <!--
    if (location.search.indexOf("auth=failed") != -1) {
    	document.write("<span style=\"color:#ff0000\">Authorization Failed! Please Enter correct Details</span>");
    }
    // -->
    </script>
    <form id="form1" action="javascript://"
     onsubmit="return authPass(this.user.value,this.pass.value)">
      <table>
        <tbody>
          <tr>
            <td>Username: </td>
            <td><input name="user" type="text"></td>
          </tr>
          <tr>
            <td>Password: </td>
            <td><input name="pass" type="password"></td>
          </tr>
          <tr>
            <td colspan="2" align="center"><input
     value="Login" type="submit"></td>
          </tr>
        </tbody>
      </table>
    </form>




Can anyone help me combine these two??

Would be great help!

Thanks

Reply With Quote
  #2  
Old September 19th, 2012, 05:56 AM
Lenton Lenton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 10 Lenton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 45 m 27 sec
Reputation Power: 0
html4strict Code:
Original - html4strict Code
  1. <script type="text/javascript">
  2. if(location.search.indexOf("auth=failed") != -1) {
  3.     document.write('<span style="color:#ff0000">Authorization Failed! Please Enter correct Details</span>');
  4. }
  5. </script>
  6. <h2>Admin Login</h2>
  7. <br /><br />
  8. <form id="form1" action="javascript://" onsubmit="return authPass(this.user.value,this.pass.value)">
  9.     <div id="login-box-name" style="margin-top:20px;">Username:</div>
  10.     <div id="login-box-field" style="margin-top:20px;"><input name="user" class="form-login" title="Username" size="30" maxlength="2048" /></div>
  11.    
  12.     <div id="login-box-name">Password:</div>
  13.     <div id="login-box-field"><input name="pass" type="password" class="form-login" title="Password" size="30" maxlength="2048" /></div>
  14.     <br />
  15.    
  16.     <span class="login-box-options"><input type="checkbox" name="1" value="1"> Remember Me <a href="#" style="margin-left:30px;">Forgot password?</a></span>
  17.     <br /><br />
  18.    
  19.     <input type="image" src="images/login-btn.png" style="margin-left:90px;width:103px;height:42px" />
  20. </form>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Need help to combine CSS with Javascipt - Login form

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap