Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Basic form design

  • 05-01-2017 3:54pm
    #1
    Closed Accounts Posts: 191 ✭✭


    Hey how do i make it so when my mouse hoovers over my textboxes the outline lights blue? Thank you.


Comments

  • Registered Users, Registered Users 2 Posts: 6,207 ✭✭✭miralize


    Something like this in CSS
    input:hover {
    box-shadow: 0 3px 3px blue;
    transition: all 300ms ease-in-out;
    }
    


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    Thank you! Can i ask why my validation is not working either is my fieldset?
    <script>
    	
    		function submitFunction(){
    			var userName = document.forms["registrationForm"]["username"].value;
    			var firstPassword = document.forms["registrationForm"]["pass1"].value;
    			var secondPassword = document.forms["registrationForm"]["pass2"].value;
    			var userAddress = document.forms["registrationForm"]["address"].value;
    			var userEmail = document.forms["registrationForm"]["email"].value;
    			
    			if(userName == ""){
    				alert("All fields are mandatory!");
    				return false;
    			}
    			else if (firstPassword == null){
    				alert("All fields are mandatory!");
    				return false;
    			}
    			else if (secondPassword == null){
    				alert("All fields are mandatory!");
    				return false;
    			}
    			else if (userAddress == null){
    				alert("All fields are mandatory!");
    				return false;
    			}
    			else if (userEmail == null){
    				alert("All fields are mandatory!");
    				return false;
    			}
    			else if (firstPassword != secondPassword){
    				alert("Passwords do not match!");
    				return false;
    			}
    		}
    	
    	</script> <!-- Form validation -->
    	
    	<div id ="registrationForm">
    		<h1> Create Account </h1>
    	
    		<form name = "userRegistration" onsubmit ="return submitFunction()" method ="POST">
    			<fieldset>	
    			
    				<label>Your name </label> 
    				<p><input type ="text" name ="username"></p>
    				<label>Password</label>
    				<p><input type ="password" name ="pass1"></p>
    				<label>Retype Password</label>
    				<p><input type ="password" name ="pass2"></p>
    				<label>Address</label>
    				<p><textarea rows ="6" cols = "22" name ="address"> </textarea></p>
    				<label>Email</label>
    				<p><input type ="email" name ="email"></p>
    			    <span style="color: blue"><input type ="submit" value = "Create Rochvalle Account">
    			
    			</fieldset>
    		</form>
    	</div>
    


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    You haven't closed the span at the submit bit.


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    What do you mean? I do not have any span tags.


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    You definitely do.
    <[B]span [/B]style="color: blue"><input type ="submit" value = "Create Rochvalle Account">
    


  • Advertisement
Advertisement