Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member tksforlife's Avatar
    Join Date
    Oct 2012
    Location
    Hawaii
    Posts
    26
    Member #
    33545

    Java/AngularJS Help

    Trying to figure out why my help block won't show. Appreciate the help!

    Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
    <!DOCTYPE html>
    <html>
    <head>
    <link href="<c:url value="/resources/css/normalize.css" />"
        rel="stylesheet">
    <link href="<c:url value="/resources/css/bootstrap.css" />"
        rel="stylesheet">
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <script type="text/javascript"
        src="<c:url value="/resources/js/app.js"/>">
        
    </script>
    <script type="text/javascript"
        src="<c:url value="/resources/js/angular.min.js"/>">
        
    </script>
    <style>
    body {
        background-color: #DADADA;
    }
    
    
    #header {
        background-color: #B9090B;
        margin: 15px;
        box-shadow: 0 1px 6px black;
    }
    
    
    #logo {
        color: white;
        margin-left: 30px;
        padding-top: 20px;
        height: 60px;
        vertical-align: middle;
        text-shadow: 3px 3px 0px black;
    }
    
    
    .main {
        background-color: white;
        margin: 40px auto 40px auto;
        padding: 10px;
        box-shadow: 3px 3px 10px black;
        background-repeat: no-repeat;
        min-height: 350px;
        width: 700px;
    }
    </style>
    <title>Home</title>
    </head>
    <body ng-app="validationApp" ng-controller="mainController">
        <div id="header">
            <h1 id="logo">NextFlixs</h1>
        </div>
    
    
        <div class="main">
            <div id="form-container">
                <form:form name="userForm" ng-submit="submitForm(userForm.$valid)" novalidate="novalidate" class="form-horizontal" method="post">
                    <fieldset>
                        <legend>Create a new user!</legend>
                        <div class="control-group">
                            <form:label class="control-label" for="firstname" path="firstName">First Name:</form:label>
                            <div class="controls">
                                <form:input ng-model="firstname" name="firstname" type="text" class="input-xlarge" id="firstname" path="firstName" required="required" autofocus="autofocus"  />
                                <p ng-show="userForm.firstname.$invalid && !userForm.firstname.$pristine" class="help-block">Your name is required.</p>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button ng-disabled="userForm.$invalid" type="submit" class="btn btn-primary">Create User</button>
                        </div>
                    </fieldset>
                </form:form>
            </div>
        </div>
        <script>
            var validationApp = angular.module('validationApp', []);
            validationApp.controller('mainController', function($scope) {
                $scope.submitForm = function(isValid) {
                    if (isValid) {
                        alert('our form is amazing');
                    }
                };
            });
        </script>
    </body>
    </html>

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:00 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com