Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Login/register box

Featured Replies

Hi there, I am trying to create a combined login/register box using tabs to switch between. I have used Javascript to switch the tabs but I just seem to be getting two boxes on top of each other :S Could you please point out where I am going wrong? Thanks. Here is my code:

     <script language="javascript">if (box == "login") {</script>
     <div class="login"> 
       <p align="center" class="style15">Login</p>
       <form id="form1" name="form1" method="post" action="login.php">
         <label><span class="style11"> Username:</span>
         <br />
          
         <input type="text" name="user" id="user" />
         </label>
         <label><span class="style11"> Password:</span>
         <br />
          
         <input type="password" name="pass" id="pass" />
         </label>
         <label><br />
         <input type="checkbox" name="remember" id="remember" />
         <span class="style14">remember me</span>          </label>
         <br /><br />
         <div align="center">
           <input type="submit" name="Submit" id="Submit" value="Submit" />
         </div>
       </form>
     </div>
  <script language="javascript">} else if (box == "register") {</script>
     <div class="login">

     </div>
  <script language="javascript">}</script>

     <div id="logintab" onclick="document.getElementById('logintab').style.background-image='url(Images/tab_on.png)';
                                 document.getElementById('registertab').style.background-image='url(Images/tab_off.png)';
                                 var box='login';">

     </div>
     <div id="registertab" onclick="document.getElementById('registertab').style.background-image='url(Images/tab_on.png)';
                                    document.getElementById('logintab').style.background-image='url(Images/tab_off.png)';
                                    var box='register';">

     </div>

  • Author

Would it be better to accomplish this using html to load an almost identical page with the only difference being the alternate box. Or possibly even in flash?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.