Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Saturday, May 15, 2021

Django - Simple Registration Form

Django - Simple Registration Form 

 


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<p>Register</p>

<form method="POST" action="">
{% csrf_token %}
{{form.username.label}}
{{form.username}}
{{form.email.label}}
{{form.email}}
{{form.password1.label}}
{{form.password1}}
{{form.password2.label}}
{{form.password2}}
<input type="submit" name="new_user">


</form>


</head>
<body>

</body>
</html>

Thursday, December 28, 2017

html / javascript : Make elements visible / hidden on drop down values

 Make elements visible / hidden on drop down values


<html>
Display Element
<select id="display" name="form_select" onchange="showDiv()">
   <option value="no">No</option>
   <option value="yes">Yes</option>
</select>
<div id="hidden_div" style="display:none;">Hello hidden content</div>

<script type="text/javascript">
    function showDiv()
    {
       if(document.getElementById('display').value=="yes")
        document.getElementById('hidden_div').style.display = "block";
        else
        document.getElementById('hidden_div').style.display = "none";
    }
</script>
</html>

Wednesday, August 20, 2014

BASIC HTML FOR TESTING SELENIUM - SOURCE CODE

 BASIC HTML FOR TESTING SELENIUM - SOURCE CODE

app link -
http://catchbug.blogspot.in/2014/08/basic-html.html




<!—This is a comment  -   ref http://www.ironspider.ca/basic_html/structure.htm-->
<html>
<head>
               <title> My Home Page </title>
</head>
<body>
               HELLO WORLD!
<br>
<br>
               EDIT FIELD
               <input type="text" name="firstname">
<br>
<br>
               CHECKBOX
               My favourite colors are:<br><br>
               <input type="checkbox" name="color" value="red">Red<br>
               <input type="checkbox" name="color" value="yellow">Yellow<br>
<br>
<br>
               RADIO BUTTON
               Your current web browser is:<br><br>
               <input type="radio" name="browser" value="IE" checked>Internet Explorer<br>
               <input type="radio" name="browser" value="Mozilla">Mozilla<br>
<br>
<br>
               DROP DOWN
               I like my coffee:<br><br>
               <select name="coffee">
               <option value="black">Black</option>
               <option value="cream" selected>With cream</option>
<br>
<br>
               BUTTON
               <input type="submit" value="Submit Information">
<br>
<br>
               TABLE
<table border="5">
   <tr>     <td>Row 1, Cell 1</td>                    <td>Row 1, Cell 2</td>     </tr>
   <tr>     <td>Row 2, Cell 1</td>                    <td>Row 2, Cell 2</td>     </tr>
</table>
</body>
</html>