Home
Search results “Html style type text javascript”
Where should the script tag be placed in html
 
09:40
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/11/where-should-script-tag-be-placed-in.html In this video we will discuss, where should the script tag be placed in the html. Should it be placed in the body or head section of the page. In general the script tag can be placed either in the head or body section. Let's look at a few examples : Example 1 : Script tag in the head section [html] [head] [script type="text/javascript"] alert("Welcome to JavaScript Tutorial"); [/script] [/head] [body] [form id="form1" runat="server"] [/form] [/body] [/html] Example 2 : Script tag in the body section [html] [head] [/head] [body] [form id="form1" runat="server"] [/form] [script type="text/javascript"] alert("Welcome to JavaScript Tutorial"); [/script] [/body] [/html] In Example 1 we placed the script tag in the head section and in Example 2, we placed it in body section. In both the cases JavaScript works as expected. Example 3 : Sets the background color of the TextBox to red. [html] [head] [/head] [body] [form id="form1" runat="server"] [asp:TextBox ID="TextBox1" runat="server"][/asp:TextBox] [/form] [script type="text/javascript"] document.getElementById("TextBox1").style.backgroundColor = "red"; [/script] [/body] [/html] Example 4 : This is same as Example 3, except we moved the script tag to the head section. In this case the script will not work as expected. Depending on the browser you are using you get one of the following JavaScript error. Firefox - TypeError: document.getElementById(...) is null Chrome - Uncaught TypeError: Cannot read property 'style' of null IE - Unable to get property 'style' of undefined or null reference To see these JavaScript errors press F12 which launches developer tools. F12 works for all the 3 browsers. [html] [head] [script type="text/javascript"] document.getElementById("TextBox1").style.backgroundColor = "red"; [/script] [/head] [body] [form id="form1" runat="server"] [asp:TextBox ID="TextBox1" runat="server"][/asp:TextBox] [/form] [/body] [/html] Why did the JavaScript did not work in this case JavaScript code is present before the textbox control. By the time the JavaScript code is executed, the textbox is still not loaded into browser DOM (Document Object Model). This is the reason JavaScript can't find the textbox and throws a NULL reference error. In Part 6, we discussed that, in general it is a good practice to store JavaScript in an external .js file. So, if the JavaScript is present in an external file and if you are referencing it on a page using [script] element, where should such [script] element be placed. To answer this question, first let's understand what happens when a browser starts loading a web page. 1. The browser starts parsing the HTML 2. When the parser encounters a [script] tag that references an external JavaScript file. The parser stops parsing the HTML and the browser makes a request to download the script file. Until the download is complete, the parser is blocked from parsing the rest of the HTML on the page. 3. When the download is complete, that's when the parser will resume to parse the rest of the HTML. This means the page loading is stopped until all the scripts are loaded which affects user experience. In general, the suggested good practice is to place the [script] tag just before the closing [body] tag, so it doesn't block the HTML parser. However, modern browsers support async and defer attributes on scripts. These attributes tell the browser it's safe to continue parsing while the scripts are being downloaded. But even with these attributes, from a performance standpoint it is still better to place [script] tag just before closing [body] tag. According to HTTP/1.1 specification browsers download no more than two components in parallel. So, if the page has several images to download and if you place [script] tags at the top of the page, the script files start to download first which blocks the images download which adds to the total page load time.
Views: 98424 kudvenkat
Typed.js - How to create a typing animation like a type writter with - HTML, CSS, Jquery || 2018
 
05:52
Typed.js - How to create a typing animation like a type writter with - HTML, CSS, Jquery || 2018 Clik here to download the typed.js plugin : https://mattboldt.com/demos/typed-js/ Please Like this video ! Comment this video !! Share this video !!! Subscribe my this channel !!!! sajidz tech Join with me in my group : Like my facebook page : https://www.facebook.com/sajidztech/ Follow me in Twitter : https://twitter.com/MdSajid1514283 Follow me in LinkedIn : https://www.linkedin.com/in/ekrokha-chele-431552139/ Follow me on Instagram : https://www.instagram.com/mohammedraaz/ My website : http://www.sajidhasan360.com/ typing animation jquery .css typing animation multiple lines. animated typing text generator. typing text javascript. typewriter effect website. typed.js alternative. handwriting animation css typewriter effect text animation html text js jquery is visible jquery replace element javascript typing effect typewriter script javascript text animation text animation css jquery typing effect jquery replace html jquery textarea jquery select text types of animation typings jquery jquery text html jquery text animation examples jquery text animation jquery input text typed javascript typewriter animation jquery typewriter typing animation css css typing animation javascript typewriter effect jquery type jquery text function jquery find text typewriter plugin typewriter javascript javascript select text jquery toggle text text types typing effect javascript jquery typewriter effect jquery highlight text javascript typeof jquery label text typing effect jquery change html jquery element type typing text javascript jquery input type text jquery button text jquery text method typescript jquery animate examples typing effect css type d plug css animation effects typing text typewriter effect jquery js typeof typing animation jquery typewriter effect online typewriter effect javascript jquery typing jquery string functions jquery write text typed js example jquery animate typewriter text set text jquery animate js jquery set input text html typing text effect jquery effects jquery type text jquery animation effects animated typing after effects typewriter effect plugin typing text animation typeit typewriter text effect jquery typing animation get innertext jquery typing jquery option text jquery get innertext typewriter code typewriter after effects text typing animation css jquery text effects typed js text writing animation jquery animate css jquery typer jquery edit css typing animation javascript jquery textarea text jquery get type typewriter typing jquery search text typelive jquery demo typing text effect jquery textbox change javascript typing animation typewriter plugin after effects jquery animation examples with code jquery text typing effect jquery show animation jquery effects demo jquery insert text jquery text animation effects typing web css text animation effects typewriter css animated text css jquery javascript simulate typing after effects text typewriter ajax text jquery trim text jquery animate text change jquery text plugin typewriter text after effects jquery append text animated typewriter text generator textcontent jquery jquery text rotator typing text animation css css text animation examples after effects typewriter plugin jquery animation demo css3 text animation css typewriter typing script css effects typing simulator jquery text effects examples jquery blink text jquery blink text carousel jquery typing tricks jquery animation types jquery blink text effect text animation js typewriter html jquery highlight text input text animation jquery plugin jquery add text to input animation effects html text effects typing machine font after effects type animation type text javascript animated typing text generator text replace jquery jquery button name jquery text transition jquery text animation effects demo typing text html jquery link text jquery moving text css text effects css blink animation jquery dropdown text text javascript jquery convert html to text jquery convert text to html types of typewriter jquery cursor jquery hover text convert text to html jquery truncate text javascript after effects typewriter animation jquery edit text cool javascript animations javascript text typing animation script type for jquery css animation types typing animation using css animated letters jquery display text select input text jquery typewriter font text animation jquery demo jquery get text content jquery change html tag.
Views: 4392 sajidz Tech
Pure JavaScript Type Writer Effect
 
36:25
In this project we will create a little website with a type writer effect using pure vanilla JavaScript. We will also do some CSS (Flexbox, etc) Sponsor: DevMountain Bootcamp https://goo.gl/6q0dEa Carlos Mafla Dev Channel: https://www.youtube.com/channel/UCnFRgYETwUg6eoeHACuVkcA 💖 Become a Patron: Show support & get perks! http://www.patreon.com/traversymedia Code: https://codepen.io/bradtraversy/pen/jeNjwP Pexels Image: https://www.pexels.com/photo/city-lit-up-at-night-316902/ Website & Udemy Courses http://www.traversymedia.com Follow Traversy Media: https://www.facebook.com/traversymedia https://www.twitter.com/traversymedia https://www.instagram.com/traversymedia
Views: 33045 Traversy Media
9: CSS Text Styling Tutorial | Basics of CSS | Learn HTML and CSS | HTML Tutorial
 
16:01
CSS text styling tutorial | Basics of CSS | Learn HTML and CSS | HTML tutorial. In this HTML tutorial you will learn how to style text using CSS, which is important to make your content stand out on your website, and make it readable to the website visitors. Using CSS to change text is easy, and you will learn to style text in no time. When it comes to styleing headers or paragraphs using CSS, it is done the same way, however there might be a few differences which we will discuss in this video. CSS units list: https://www.w3schools.com/CSSref/css_units.asp Adobe Color Wheel: https://color.adobe.com/ ➤ GET ACCESS TO MY LESSON MATERIAL HERE! First of all, thank you for all the support you have given me! I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you! I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach. I hope you will find it helpful :) Material for this lesson: https://www.patreon.com/posts/html-9-download-15593539
Views: 50355 mmtuts
Text Typing Animation Effect using HTML/CSS [No JavaScript]
 
04:30
In this video, I'll show you how to add text typing animation effect in your webpage using HTML & CSS (Keyframes + Animation).
Views: 25402 Codingflag
Text Typing Animation Effects Using Html and CSS - Pure CSS Typing Effect - No Javascript
 
06:14
Please LIKE our Facebook page for daily updates... https://www.facebook.com/Online-Tutorial-Html-Css-JQuery-Photoshop-1807958766120070/ Track: Cadmium - Melody (feat. Jon Becker) Link: https://youtu.be/9MiFRbymQXQ
Views: 16696 Online Tutorials
Real Time Text Input Filter tutorial Program Textarea Javascript HTML Tutorial
 
14:43
Lesson Code: http://www.developphp.com/video/JavaScript/Real-Time-Text-Input-or-Textarea-Filter-Tutorial In this Javascript programming lesson you can learn Real-Time Filtering of Text Input. You can learn how to program real time strict text fields that will strip or replace unwanted characters from the field as the user types. Using the search or replace String object methods in Javascript along with the RegExp object gives us a wide of logic possibilities in our Javascript pattern matching with regular expressions.
Views: 49724 Adam Khoury
HTML5 tutorial Autocomplete Form Field Text Input Datalist List Attribute
 
04:02
Lesson Code: http://www.developphp.com/video/HTML/Autocomplete-Text-Input-Datalist-List-Attribute-Tutorial Learn to code the list attribute into your input tags and associate them with a datalist that renders an autocomplete feature while people are typing into your HTML5 web form fields. Used for dynamic autocompletion of search fields primarily, and your datlist can be tied to Ajax and PHP to render autocompletion for your database information.
Views: 57765 Adam Khoury
Simple Text Animation Just By Using HTML & CSS
 
04:29
join our group in facebook https://www.facebook.com/groups/704904666369941/ like our page https://www.facebook.com/darkcode0/ Paypal Donation Link https://paypal.me/YBenlachheb Take Files From Here https://goo.gl/zbMbcf tags simple css text animation effects simple text animation css simple text animation in css simple text animation css3 _Music___ Cold Funk - Funkorama by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/...) Source: http://incompetech.com/music/royalty-... Artist: http://incompetech.com/ Music promoted by Audio Library https://youtu.be/Vhd6Kc4TZls
Views: 152720 DarkCode
1.3: Getting Text form User: Text Input - Programming with Text
 
17:31
In this video, I demonstrate how you can get text input from a user with DOM elements ("input" and "textarea" in combination with the p5.dom.js library. Next Video: https://youtu.be/0Mq2CxspF5s Introduction to Programming from A to Z: http://shiffman.net/a2z/intro/ Support this channel on Patreon: https://patreon.com/codingtrain Send me your questions and coding challenges!: https://github.com/CodingTrain/Rainbow-Topics Contact: https://twitter.com/shiffman GitHub Repo with all the info for Programming from A to Z: https://github.com/shiffman/A2Z-F16 Source Code for the all Video Lessons: https://github.com/CodingTrain/Rainbow-Code p5.js: https://p5js.org/ Processing: https://processing.org createInput() reference: https://p5js.org/reference/#/p5/createInput Drag and Drop with p5.js video: https://www.youtube.com/watch?v=o4UmGrPst_c For More Programming from A to Z videos: https://www.youtube.com/user/shiffman/playlists?shelf_id=11&view=50&sort=dd For More Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH Help us caption & translate this video! http://amara.org/v/V9bp/
Views: 53158 The Coding Train
CSS - ( Part 2 : Adding Icon ) Simple Input Text Box
 
06:07
Code used : https://codepen.io/zFunx/pen/XRyqvx Part 1 : https://youtu.be/omJfspwjnZk Get started with Font Awesome : http://fontawesome.io/get-started/ Learn more about aria-hidden : http://csskarma.com/blog/difference-rolepresentation-aria-hiddentrue/ Website : https://web.zfunx.xyz/ Facebook : https://www.facebook.com/zfunxWeb Google+ : https://plus.google.com/113560671967552430928 Twitter : http://twitter.com/PleeZfunx Instagram : https://www.instagram.com/zfunx/
Learn HTML/CSS - #10 - Styling text with CSS [1080p]
 
03:44
In this tutorial, we will be styling text using CSS. I will show you how to change the following elements of the text: • Font Family • Font Size • Font Weight (Bold) • Underline • Color Twitter: http://twitter.com/coders_guide Donate: http://goo.gl/mfMep
Views: 18286 Neil Rowe
HTML video tutorial - 47 - html input tag and type="text"
 
06:40
HTML - form tag and HTML input tag How to create text box using html input tag? html input tag: is used to create various form fields attributes: type="text" : creates a text box maxlength : controls the number of character to be input value : default value of the input field name: uniquely identify the field in scripts id: uniquely identify the field in scripts ======================================================== Follow the link for next video: https://youtu.be/a_jkWXdAbgM Follow the link for previous video: https://youtu.be/3VZiqUj_9z8 ========= For more benefits & Be up to date =================== Subscribe to "chidres tech tutorials" channel: it's free Visit to Chidre's Tech Tutorials website: https://www.chidrestechtutorials.com Like the Facebook fan page: https://www.facebook.com/ManjunathChidre ======================================================== ========== HTML Questions & Answers ====================== 1.The ______ attribute of HTML input tag specifies the default value. a. placeholder b. default c. value d. required Answer: c ========================================================
Views: 10534 Chidre'sTechTutorials
How to write text on image - HTML and CSS
 
07:45
In this video you will learn that how to write text on image in html and css ---------------------------------------------- Facebook Page : https://www.facebook.com/Rvwebtutorials/ =============********============== Check some popular videos on my channel: css positioning explained with examples (static,relative,absolute,fixed):- https://youtu.be/L_B2RZm-5VI ---------------------------------------------- css image hover effect - Css Tutorial - Css3 Hover Effect:- https://youtu.be/gu8AceXa5Pg ---------------------------------------------- how to change text selection color in html and css:- https://youtu.be/gCGnwS2uRdw ---------------------------------------------- how to make Simple css3 loading animation:- https://youtu.be/1pC_r_AKlmg ---------------------------------------------- How to create contact form using html and css:- https://youtu.be/ubCG1evvZws ---------------------------------------------- How to make fullscreen video background using html and css:- https://youtu.be/1RrR_d4yGJ8 ---------------------------------------------- Advance text shadow hover effect using html and css:- https://youtu.be/FFhDA5XB3CA ---------------------------------------------- How to create fixed navigation bar using html and css:- https://youtu.be/2M3QXuBDQBM ---------------------------------------------- how to create animated Dropdown menu using html and css:- https://youtu.be/EGr4rEgmJ9E ---------------------------------------------- how to create hero image using html and css:- https://youtu.be/3xLfTaMZkEI ---------------------------------------------- simple parallax effect using html and css:- https://youtu.be/Y4_JLIherrw ---------------------------------------------- How to create login form using Html and css:- https://youtu.be/bORk1gxHPaU ---------------------------------------------- How to create animated search bar using Html and css:- https://youtu.be/JaQSzSn0cIQ -~-~~-~~~-~~-~- Please watch: "Responsive Image Slider | HTML & CSS" https://www.youtube.com/watch?v=FTHUXF241Ak -~-~~-~~~-~~-~-
Views: 25192 Web dev
Change Style Sheet Using Javascript Tutorial CSS Swap Stylesheet
 
04:46
Lesson Code: http://www.developphp.com/video/JavaScript/Change-Style-Sheet-Using-Tutorial-CSS-Swap-Stylesheet Learn to change the entire style of your web page with a click using JavaScript that is targeting the href attribute of your familiar link element using the setAttribute method of JavaScript. DEMO: http://www.adamkhoury.com/demo/js_swap_css_stylesheet/
Views: 43758 Adam Khoury
Restrict Text Input Characters HTML JavaScript Tutorial
 
06:53
Lesson Code: http://www.developphp.com/video/JavaScript/Restrict-Text-Input-Characters-HTML-JavaScript-Tutorial Learn to restrict one or more text fields in a form to allow only characters that you desire to be typed into them. We will remove undesirable characters in real time as the user types.
Views: 38512 Adam Khoury
HTML Forms - Learn 18 HTML Input Types | HTML5
 
06:57
Learn 18 different HTML Form Input Types. I make this video as short as possible. 18 HTML Input Types are: * Text * Password * Submit * Reset * Radio * Checkbox * Button * Color * Date * Datetime-local * Email * Month * Number * Range * Search * Time * Url * Week How to connect HTML Form to MySQL Database using PHP in 4 Minutes - 2017 = https://youtu.be/OHjkg_rifTw w3schools : https://goo.gl/dhupXB Twitter : https://twitter.com/CodeAndCoins Google+ : https://goo.gl/7vjhrp Facebook : https://www.facebook.com/CodeAndCoins Blog : https://goo.gl/1C7dNw Share this Video and Subscribe to my channel #CodeAndCoins #HTMLInputTypes
Views: 74120 Code And Coins
Event bubbling in JavaScript
 
15:01
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/event-bubbling-in-javascript.html What is event bubbling Let us understand this with an example. HTML elements can be nested inside each other. For example a button element can be nested inside a span element and the span element inturn can be nested inside a div element. Notice that we have onclick attribute specified for all the 3 elements. [html] [head] [style type="text/css"] .styleClass { display: table-cell; border: 1px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div class="styleClass" onclick="alert('Div click handler')"]DIV element [span class="styleClass" onclick="alert('Span click handler')"]Span element [input type="button" value="Click me" onclick="alert('Button click handler')" /] [/span] [/div] [/body] [/html] A click on the button, causes a click event to be fired on the button. The button click event handler method handles the event. The click event then bubbles up to the button element parent (span element), which is handled by the span element event handler method. The click event then bubbles up to the span element parent (div element). This is called event bubbling. Notice that if you click on the [span] element, it's event handler and it's parent([div]) element event handler are called. If you click on the [div] element, just the [div] element event handler method is called. So, the event bubbling process starts with the element that triggered the event and then bubbles up to the containing elements in the hierarchy. The following example is similar to the one above, except we removed the onclick attribute from button and span elements. Because of event bubbling, when you click on the button or the span element, the event gets handled by the div element handler. [html] [head] [style type="text/css"] .styleClass { display: table-cell; border: 1px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div class="styleClass" onclick="alert('Click event handled by DIV element')"]DIV element [span class="styleClass"]Span element [input type="button" value="Click me"/] [/span] [/div] [/body] [/html] When the event gets bubbled, the keyword this references the current element to which the event is bubbled. In the example below, we are using "this" keyword to reference the current div element and change it's border color. When you click on the innermost [div] element, all the 3 [div] elements border get changed due to event bubbling. [html] [head] [style type="text/css"] .divStyle { display: table-cell; border: 5px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div id="DIV1" class="divStyle"] DIV 1 [div id="DIV2" class="divStyle"] DIV 2 [div id="DIV3" class="divStyle"] DIV 3 [/div] [/div] [/div] [script type="text/javascript"] var divElements = document.getElementsByTagName('div'); for (var i = 0; i [ divElements.length; i++) { divElements[i].onclick = function () { this.style.borderColor = "red"; alert(this.getAttribute("id") + " backgound changed"); } } [/script] [/body] [/html] Stopping event bubbling : If you don't want the event to be bubbled up, you can stop it. With Internet Explorer 8 and earlier versions event.cancelBubble = true With Internet Explorer 9 (and later versions) & all the other browsers event.stopPropagation()
Views: 54609 kudvenkat
Terminal Effect | Typewriter Effect | t.js - JQuery
 
06:44
// Terminal Effect CSS / Typewriter Effect CSS / HTML & CSS / JavaScript / JQuery // Source Code - https://bit.ly/2P3CP9J t.js Plugin - https://bit.ly/2OvUuYf ---------------- Social Media ---------------- Personal Account : https://www.instagram.com/harrnish/ Facebook : https://www.facebook.com/codegridweb/ Instagram : https://www.instagram.com/codegridweb/ Twitter : https://twitter.com/codegridweb/ Thanks for watching ! My friend has started a youtube channel. Check it out for back-end stuff ! Link - https://bit.ly/2PKRfIk Music : (free) 90s Old School Boom Bap type beat hip hop instrumental | 'The Creator' prod by SMOKEONEBEATS Video - https://www.youtube.com/watch?v=5Q68JJSDHUk MUSIC CREDIT - SmokeOneBeats ✘ YT ⇒ https://www.youtube.com/channel/UCFDz... ✘ buy / lease ⇒ [email protected] ✘ original name ⇒ beat #70 ✘ BC ⇒ https://smokeonebeats.bandcamp.com/ ✘ IG ⇒ https://www.instagram.com/smokeonebeats/ ✘ FB ⇒ https://www.facebook.com/SmokeOneOffi... ✘ SC ⇒ https://soundcloud.com/smokeonebeats
Views: 11190 Codegrid
Move Placeholder To Top on Focus And While Typing - Pure CSS Tutorial - No Javascript
 
14:57
Please LIKE our NEW Facebook page for daily updates... https://www.facebook.com/Online-Tutorial-Html-Css-JQuery-Photoshop-1807958766120070/
Views: 34146 Online Tutorials
Learn All Types Of Marquee Tags Effects In HTML.
 
07:18
This video is about all types of marquee tags in html ... with the help of this video you can learn lots of tags of html language like : Scrollamount marquee, Scrolldelay marquee, bgcolor, width & height, direction of marquee,etc., tags are included in this video,.... ------------------------------------------------------------------------------ if you like this video, so don't forget to subscribe this youtube channel for more latest updates... ----------------------------------------------------------------------------------------------- you can also follow on facebook : http://facebook.com/techfully Thank You! --------------------------------------------------------------------------------------------------------
Views: 46203 Tech Fully
Transparent Login Form with floating Placeholder Text - Pure CSS Label Slide Up on Focus - No jQuery
 
12:17
Please LIKE our NEW Facebook page for daily updates... https://www.facebook.com/Online-Tutorial-Html-Css-JQuery-Photoshop-1807958766120070/
Views: 198735 Online Tutorials
JavaScript event capturing
 
08:36
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/javascript-event-capturing.html Event capturing is the opposite of event bubbling. We discussed event bubbling in detail in Part 40 of JavaScript tutorial. With event bubbling the event bubbles up from the inner most element to the outer most element in the DOM hierarchy. With event capuring the opposite happens, the event gets captured from the outer most element to innermost element. In real world event capturing is rarely used. Let us understand this with an example. In the following example we have 3 [div] nested elements. Notice that we are using addEventListener() method to assign event handler to each [div] element. To enable event capturing we have set the third parameter (phase) of addEventListener() method to true. Now when you click on the innermost [div] (DIV3), notice that the events are fired from the outermost [div] to innermost [div] (DIV1 =] DIV 2 =] DIV 3). [html] [head] [style type="text/css"] .divStyle { display: table-cell; border: 5px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div id="DIV1" class="divStyle"] DIV 1 [div id="DIV2" class="divStyle"] DIV 2 [div id="DIV3" class="divStyle"] DIV 3 [/div] [/div] [/div] [script type="text/javascript"] var divElements = document.getElementsByTagName('div'); for (var i = 0; i [ divElements.length; i++) { divElements[i].addEventListener("click", clickHandler, true); } function clickHandler() { alert(this.getAttribute("id") + " click event handled"); } [/script] [/body] [/html] Please note : IE8 and earlier versions does not support addEventListener() method. This implies that event capturing is not supported in IE8 and earlier versions, and hence the above code will not work in IE 8 and earlier versions. Stopping event capturing : Stopping event capturing is very similar to stopping event bubbling. With the example below, when you click on any [div] element notice that DIV 1 element handles the click event and it does not get captured down. [html] [head] [style type="text/css"] .divStyle { display: table-cell; border: 5px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div id="DIV1" class="divStyle"] DIV 1 [div id="DIV2" class="divStyle"] DIV 2 [div id="DIV3" class="divStyle"] DIV 3 [/div] [/div] [/div] [script type="text/javascript"] var divElements = document.getElementsByTagName('div'); for (var i = 0; i [ divElements.length; i++) { divElements[i].addEventListener("click", clickHandler, true); } function clickHandler(event) { event.stopPropagation(); alert(this.getAttribute("id") + " click event handled"); } [/script] [/body] [/html] Using addEventListener() method with last argument set to true is the only way to enable event capturing. If the thid parameter (phase) is set to true event capturing is enabled and if it is set to false event bubbling is enabled. If you want both even bubbling and capturing to be enabled, then assign handlers 2 times, once with the phase parameter set to false and once with the phase parameter set to true as shown below. [html] [head] [style type="text/css"] .divStyle { display: table-cell; border: 5px solid black; padding: 20px; text-align: center; } [/style] [/head] [body] [div id="DIV1" class="divStyle"] DIV 1 [div id="DIV2" class="divStyle"] DIV 2 [div id="DIV3" class="divStyle"] DIV 3 [/div] [/div] [/div] [script type="text/javascript"] var divElements = document.getElementsByTagName('div'); for (var i = 0; i [ divElements.length; i++) { divElements[i].addEventListener("click", clickHandler, false); divElements[i].addEventListener("click", clickHandler, true); } function clickHandler() { alert(this.getAttribute("id") + " click event handled"); } [/script] [/body] [/html] With both event capturing and bubbling enabled, events are first captured from the outermost element to the innermost element and then bubbles up from the innermost to the outermost element.
Views: 37241 kudvenkat
jQuery disabled selector
 
04:29
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-disabled-selector.html In this video we will discuss 1. jQuery disabled selector 2. jQuery enabled selector 3. Where you can find jquery selectors documentation Selects all disabled elements $(':disabled') Selects all disabled elements and sets a 3px solid red border [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $(':disabled').css('border', '3px solid red'); }); [/script] [/head] [body style="font-family:Arial"] [table] [tr] [td]First Name [/td] [td][input type="text" disabled="disabled" /][/td] [/tr] [tr] [td]Last Name [/td] [td][input type="text" disabled="disabled" /][/td] [/tr] [tr] [td]Email [/td] [td][input type="text" /][/td] [/tr] [tr] [td]Gender [/td] [td] [select id="selectGender" disabled="disabled"] [option value="Male"]Male[/option] [option value="Female"]Female[/option] [/select] [/td] [/tr] [tr] [td]Comments[/td] [td][textarea][/textarea][/td] [/tr] [tr] [td colspan="2"] [input type="submit" value="Submit" disabled="disabled"/] [/td] [/tr] [/table] [/body] [/html] Selects all input elements that are disabled and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('input:disabled').css('border', '3px solid red'); }); [/script] Selects all input elements with type=text that are disabled and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('input[type="text"]:disabled').css('border', '3px solid red'); }); [/script] Selects all enabled elements $(':enabled') Selects all enabled textarea elements and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('textarea:enabled').css('border', '3px solid red'); }); [/script] Where can you find jquery selectors documentation https://api.jquery.com/category/selectors
Views: 56683 kudvenkat
Image gallery with thumbnails in JavaScript
 
13:13
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/image-gallery-with-thumbnails-in.html In this video we will discuss creating image gallery with thumbnails in JavaScript. When you click on the image thumnail, the respective image should be displayed in the main section of the page. For the purpose of this demo we will be using the images that can be found on any windows machine at the following path. C:\Users\Public\Pictures\Sample Pictures Step 1 : Open Visual Studio and create a new empty asp.net web application project. Name it Demo. Step 2 : Right click on the Project Name in Solution Explorer in Visual Studio and create a new folder with name = Images. Step 3 : Copy images from C:\Users\Public\Pictures\Sample Pictures to Images folder in your project. Step 4 : Right click on the Project Name in Solution Explorer in Visual Studio and add a new HTML Page. It should automatically add HTMLPage1.htm. Step 5 : Copy and paste the following HTML and JavaScript code in HTMLPage1.htm page. [html] [head] [style type="text/css"] .imgStyle { width:100px; height:100px; border:3px solid grey; } [/style] [/head] [body] [img id="mainImage" height="500px" width="540x" src="/Images/Hydrangeas.jpg" style="border:3px solid grey"/] [br /] [div id="divId" onclick="changeImageOnClick(event)"] [img class="imgStyle" src="/Images/Hydrangeas.jpg" /] [img class="imgStyle" src="/Images/Jellyfish.jpg" /] [img class="imgStyle" src="/Images/Koala.jpg" /] [img class="imgStyle" src="/Images/Penguins.jpg" /] [img class="imgStyle" src="/Images/Tulips.jpg" /] [/div] [script type="text/javascript"] var images = document.getElementById("divId").getElementsByTagName("img"); for (var i = 0; i [ images.length; i++) { images[i].onmouseover = function () { this.style.cursor = 'hand'; this.style.borderColor = 'red'; } images[i].onmouseout = function () { this.style.cursor = 'pointer'; this.style.borderColor = 'grey'; } } function changeImageOnClick(event) { event = event || window.event; var targetElement = event.target || event.srcElement; if(targetElement.tagName == "IMG") { mainImage.src = targetElement.getAttribute("src"); } } [/script] [/body] [/html] Finally run the application and test it.
Views: 64953 kudvenkat
Autocomplete Input Text Field using JavaScript
 
10:08
URL: https://github.com/LeaVerou/awesomplete
Views: 17016 QScutter Tutorials
Lesson 18 HTML Forms Input Type Text
 
08:54
HTML Forms Input tag Type attribute Text value
Views: 237 Fathi Khalfi
How to Make an Animation Alert using JavaScript
 
09:36
In this video javascript tutorial how to make an alert within animation using the sweet alert javascript. Follow me ========================================== facebook : @anggariskys twitter: @anggariskys google+: plus.google.com/+anggariskysetiawan instagram: pandastwn
Views: 120541 Angga Risky
HTML div tag Example and Tutorial using CSS
 
09:06
http://www.LittleWebHut.com This video demonstrates how to use the HTML / XHTML div tag and how to style it with CSS. The examples will cover the basic usage for the div tag and demonstrate the CSS color, text-align, background, float, and width properties.
Views: 466048 tutor4u
Assigning event handlers in JavaScript using DOM object property
 
10:20
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/assigning-event-handlers-in-javascript.html In JavaScript there are several ways to associate an event handler to the event. In Part 36, we discussed, associating event handler methods to events using the attributes of HTML tags. In this video we will discuss using DOM object property to assign event handlers to events. First let us understand, what is DOM DOM stands for Document Object Model. When a browser loads a web page, the browser creates a Document Object Model of that page. The HTML DOM is created as a tree of Objects. Example : [html] [head] [title]My Page Title[/title] [/head] [body] [script type="text/javascript"] [/script] [div] [h1]This is browser DOM[/h1] [/div] [/body] [/html] JavaScript can be used to access and modify these DOM objects and their properties. For example, you can add, modify and remove HTML elements and their attributes. Along the same lines, you can use DOM object properties to assign event handlers to events. We will discuss the DOM object in detail in a later video session. We will continue with the same examples that we worked with in Part 36. Notice that in this case, we are assigning event handlers using the DOM object properties (onmouseover & onmouseout) instead of using the attributes of the HTML tag. We are using this keyword to reference the current HTML element. In this example "this" references the button control. [input type="button" value="Click me" id="btn"/] [script type="text/javascript"] document.getElementById("btn").onmouseover = changeColorOnMouseOver; document.getElementById("btn").onmouseout = changeColorOnMouseOut; function changeColorOnMouseOver() { this.style.background = 'red'; this.style.color = 'yellow'; } function changeColorOnMouseOut() { this.style.background = 'black'; this.style.color = 'white'; } [/script] The following example is same as the above. In this case we are assigning an anonymous function to onmouseover & onmouseout properties. [input type="button" value="Click me" id="btn" /] [script type="text/javascript"] document.getElementById("btn").onmouseover = function () { this.style.background = 'red'; this.style.color = 'yellow'; } document.getElementById("btn").onmouseout = function () { this.style.background = 'black'; this.style.color = 'white'; } [/script] If an event handler is assigned using both, i.e an HTML attribute and DOM object property, the handler that is assigned using the DOM object property overwrites the one assigned using HTML attribute. Here is an example. [input type="button" value="Click me" id="btn" onclick="clickHandler1()"/] [script type="text/javascript"] document.getElementById("btn").onclick = clickHandler2; function clickHandler1() { alert("Handler set using HTML attribute"); } function clickHandler2() { alert("Handler set using DOM object property"); } [/script] Using this approach you can only assign one event handler method to a given event. The handler that is assigned last wins. In the following example, Handler2() is assigned after Handler1. So Handler2() owerites Handler1(). [input type="button" value="Click me" id="btn"/] [script type="text/javascript"] document.getElementById("btn").onclick = clickHandler1; document.getElementById("btn").onclick = clickHandler2; function clickHandler1() { alert("Handler 1"); } function clickHandler2() { alert("Handler 2"); } [/script]
Views: 51914 kudvenkat
Events in JavaScript
 
17:08
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/events-in-javascript.html What is an event An event is a signal from the browser that something has happened. For example, 1. When a user clicks on an HTML element, click event occurs 2. When a user moves the mouse over an HTML element, mouseover event occurs When events occur, we can execute JavaScript code or functions in response to those events. To do this we need to associate JavaScript code or functions to the events. The function that executes in response to an event is called event handler. In JavaScript, there are several ways to associate an event handler to the event 1. Using the attributes of an HTML tag 2. Using DOM object property 3. Using special methods In this video we will discuss associating event handler methods to events using the attributes of HTML tags. In the following example, the code to execute in response to onmouseover & onmouseout events is set directly in the HTML markup. The keyword "this" references the current element. In this example "this" references the button control. [input type="button" value="Click me" id="btn" onmouseover="this.style.background= 'red'; this.style.color = 'yellow'" onmouseout="this.style.background= 'black'; this.style.color = 'white'" /] The above example, can be rewritten as shown below. In this case the code to execute in response to the event is placed inside a function and then the function is associated with the event. [input type="button" value="Click me" id="btn" onmouseover="changeColorOnMouseOver()" onmouseout="changeColorOnMouseOut()" /] [script type="text/javascript"] function changeColorOnMouseOver() { var control = document.getElementById("btn"); control.style.background = 'red'; control.style.color = 'yellow'; } function changeColorOnMouseOut() { var control = document.getElementById("btn"); control.style.background = 'black'; control.style.color = 'white'; } [/script] Events are very useful in real-world applications. For example they can be used to 1. Display confirmation dialog box on submitting a form 2. Form data validation and many more How to show confirmation dialog in JavaScript [input type="submit" value="Submit" id="btn" onclick="return confirmSubmit()" /] [script type="text/javascript"] function confirmSubmit() { if (confirm("Are you sure you want to submit")) { alert("You selected OK"); return true; } else { return false; confirm("You selected cancel"); } } [/script] JavaScript form validation example : In this example, both First Name and Last Name fields are required fields. When you type the first character in any of the textbox, the background colour is automatically changed to green. If you delete all the characters you typed or if you leave the textbox without entering any characters the background colour changes to red indicating the field is required. We made this possible using onkeyup and onblur events. onkeyup occurs when the user releases a key. onblur occurs when an element loses focus. [table] [tr] [td] First Name [/td] [td] [input type="text" id="txtFirstName" onkeyup="validateRequiredField('txtFirstName')" onblur="validateRequiredField('txtFirstName')"/] [/td] [/tr] [tr] [td] Last Name [/td] [td] [input type="text" id="txtLastName" onkeyup="validateRequiredField('txtLastName')" onblur="validateRequiredField('txtLastName')"/] [/td] [/tr] [/table] [script type="text/javascript"] function validateRequiredField(controlId) { var control = document.getElementById(controlId); control.style.color = 'white'; if (control.value == "") { control.style.background = 'red'; } else { control.style.background = 'green'; } } [/script]
Views: 70485 kudvenkat
Styling HTML 5 Forms #4 - Styling Text Inputs
 
06:19
----- COURSE LINKS: + Repo - https://github.com/iamshaunjp/styling-html5-forms-playlist + Atom editor - https://atom.io/ CSS Playlist - https://www.youtube.com/playlist?list=PL4cUxeGkcC9gQeDH6xYhmO-db2mhoTSrT HTML Playlist - https://www.youtube.com/playlist?list=PL4cUxeGkcC9ibZ2TSBaGGNrgh4ZgYE6Cc --------------------------------------------------------------------------------------------- You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage... SUBSCRIBE TO CHANNEL - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1 ========== PSD to WordPress Playlist ========== https://www.youtube.com/playlist?list=PL4cUxeGkcC9gnow7e45LQFkNVxwQ5BH-W ============ Node.js for Beginners Playlist ============= https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp ============== The Net Ninja ===================== For more front-end development tutorials & to black-belt your coding skills, head over to - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk ================== Social Links ================== Twitter - @TheNetNinja - https://twitter.com/thenetninjauk
Views: 9102 The Net Ninja
How to write text on image using  HTML and CSS
 
08:55
In this video tutorial, I am going to tell you how you can write some text on image by using HTML and CSS. Here I use CSS position attribute. By using position= absolute I break the flow of heading and place it in the middle of the banner image. You can also see this video for: text on image tutorial html and css overlay text on image text on image css text over image html how to add text on image in html how to put text on image in html  how to write text on image in html  how to add text over image with html and css  how to add text on image css html  text over image with html and css  text over image html and css  add text over image using html and css  text over image html css  how to put text on image with html 2018 text on image  text on image html  write text on image  webseotips my another video links: Bootstrap 4 progress bars : https://youtu.be/tQpUUOZQhKs How to customize navbar - bootstrap4 tutorial - https://youtu.be/PRMtNdlSpzY Bootstrap 4 Tutorial - Responsive Navbars - https://youtu.be/hj_ayO9P3R4 Google Penguin Update and Penguin Recovery Process in 2017 - https://youtu.be/MrKHpS588Fs Google Panda Update AND Recovery Process from Panda - https://youtu.be/OzZq-nmonaU how to add numeric counter on website- https://youtu.be/AQYv14sY_q8 How to find best Profitable keyword for Your Website 2018 part 1- https://youtu.be/QdMMfSwU15M How to find best Profitable keyword for Your Website in 2018 part2- https://youtu.be/t3hHUA5KiQI Introduction To Keyword Match Types In Google AdWords 2018- https://youtu.be/Re3rfgYdkG8 Bootstrap 4 tutorial – card : https://youtu.be/qIPdaBIQXtg Bootstrap 4 card slider- https://youtu.be/mglq2tBjRxk bootstrap 4 testimonial - https://www.youtube.com/watch?v=gbNhlAoHQkI&t=793s Transparent navbar with full screen background image landing page-Bootstrap https://youtu.be/SvpyyIE5vG0 Bootstrap Transparent menu with Responsive Slider - https://youtu.be/2vSc6VJtz4s How to Create Mega Menu with Bootstrap 4 with CODE : https://youtu.be/932hSm1yNII How to create Responsive LightBox Gallery with Bootstrap 4: https://youtu.be/k-RtYiiB47E How to customize owl carousel slider navigation 2018 with Bootstrap : https://youtu.be/nVNv1jUitCk scrolling effect on Navbar -bootstrap 4 tutorial: https://youtu.be/cskDxDRD1Kw bootstrap 4 dropdown on hover - Bootstrap 4 tutorial: https://youtu.be/2vwrwrMd1NM Customize Navbar Bootstrap 4 tutorial 2018 : https://youtu.be/rgukBRi1CSU Bootstrap 4 website built from scratch in 1 hour 2018 (with code) : https://youtu.be/xVjYT-Eu-N8
Views: 22173 webseotips
ASP NET TextBox and JavaScript
 
09:16
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/aspnet-textbox-and-javascript.html In this video we will discuss 1. JavaScript focus method 2. JavaScript select method 3. How to count the number of characters as you type in a textbox and display that count in a label control JavaScript focus method : focus() method is used to put the keyboard cursor in a particular textbox when the web page loads so that we can start typing without having to first click in the textbox with the mouse. For example, when a web page with the following HTML and JavaScript is loaded, the keyboard cursor is already in the textbox waiting for the user to type his input. There is no need for the user to first click in the textbox with his mouse. Name : [asp:TextBox ID="TextBox1" runat="server"][/asp:TextBox] [script type="text/javascript"] document.getElementById("TextBox1").focus(); [/script] focus() method can be used with most HTML elements. For example, when a web page with the following HTML and JavaScript is loaded, the keyboard focus is set to DropDownList1 control. You can change the Gender value in the DropDownList by pressing ALT + Down Arrow keys simultaneously. Since we are using focus() method there is no need to first click on the DropDownList with the mouse. [table style="border:1px solid black"] [tr] [td]Name[/td] [td][asp:TextBox ID="TextBox1" runat="server"][/asp:TextBox][/td] [/tr] [tr] [td]Gender[/td] [td] [asp:DropDownList ID="DropDownList1" runat="server"] [asp:ListItem Text="Male" Value="Male"][/asp:ListItem] [asp:ListItem Text="Female" Value="Female"][/asp:ListItem] [/asp:DropDownList] [/td] [/tr] [/table] [script type="text/javascript"] document.getElementById("DropDownList1").focus(); [/script] JavaScript select method : select() method is used to select the contents of a text field, so when you start typing, the new text that you have typed will automatically replace the existing selected text. You can use select() method with textbox and textarea controls. When a web page with the following HTML and JavaScript is loaded, the text in the textarea element is selected and when you start typing, the new text that you typed will replace the existing selected text. [table style="border:1px solid black"] [tr] [td]Name[/td] [td][asp:TextBox ID="TextBox1" runat="server"][/asp:TextBox][/td] [/tr] [tr] [td]Comments[/td] [td] [asp:TextBox ID="TextBox2" TextMode="MultiLine" runat="server" Text="Type your comments here"][/asp:TextBox] [/td] [/tr] [/table] [script type="text/javascript"] document.getElementById("TextBox2").select(); [/script] How to count the number of characters as you type in a textbox and display the count in a label control Name : [asp:TextBox ID="TextBox1" runat="server" onkeyup="CountCharacters();"] [/asp:TextBox] [asp:Label ID="Label1" runat="server"][/asp:Label] [script type="text/javascript"] function CountCharacters() { document.getElementById("Label1").innerHTML = document.getElementById("TextBox1").value.length + " charactes"; } [/script]
Views: 33577 kudvenkat
Learn JavaScript in 12 Minutes
 
12:01
Learn the fundamental features of JavaScript - the language used to add dynamic, interactive content to websites. I teach you how to get started with JavaScript, how to use variables, operators, arrays, properties, methods, custom functions, conditionals and loops. In 12 minutes. LEARN HTML IN 12 MINUTES http://youtu.be/bWPMSSsVdPk LEARN CSS IN 12 MINUTES http://youtu.be/0afZj1G0BIE LEARN PHP IN 15 MINUTES http://youtu.be/ZdP0KM49IVk Support this channel at https://www.patreon.com/jakewright ---------- Text Editors ---------- For Windows users, I recommend using Notepad++ to edit HTML files: http://notepad-plus-plus.org For Mac users, I recommend Sublime Text: http://www.sublimetext.com ---------------------------------------- SUBSCRIBE FOR MORE http://youtube.com/subscription_center?add_user=jaketvee TWITTER http://twitter.com/jakewrightuk FACEBOOK https://www.facebook.com/jakewrightuk INSTAGRAM http://instagram.com/jakewrightuk http://jakewright.net
Views: 1721104 Jake Wright
jQuery input vs input
 
06:29
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-input-vs-input.html In this video we will discuss the difference between $(input) and $(:input) selectors $(:input) selects all input, textarea, select and button elements where as $(input) just selects elements with an input tag. The following is the HTML used in the examples. Replace < with LESSTHAN symbol and > with GREATERTHAN Symbol. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> </head> <body style="font-family:Arial"> First Name : <input type="text" value="John" /> <br /><br /> Last Name : <input type="text" value="Major" /> <br /><br /> Gender : <input type="radio" name="gender" checked="checked" value="Male">Male <input type="radio" name="gender" value="Female">Female <br /><br /> Skills : <input type="checkbox" name="skills" checked="checked" value="JavaScript" />JavaScript <input type="checkbox" name="skills" checked="checked" value="jQuery" />jQuery <input type="checkbox" name="skills" value="C#" />C# <br /><br /> Country: <select> <option selected="selected" value="USA">USA</option> <option value="India">India</option> <option value="UK">UK</option> </select> <br /><br /> Summary : <br /> <textarea>I am a Senior Dot Net Developer with 10 years experience</textarea> <br /><br /> <input type="submit" value="submit" /> </body> </html> Now we want to get the text value from all the textboxes. On this page we have 2 textboxes 1. First Name 2. Last Name jQuery code to get textbox value using $(input) <script type="text/javascript"> $(document).ready(function () { $('input[type="text"]').each(function () { alert($(this).val()); }); }); </script> jQuery code to get textbox value using $(:input) <script type="text/javascript"> $(document).ready(function () { $(':input[type="text"]').each(function () { alert($(this).val()); }); }); </script> Which one is better for performance $('input[type="text"]') or $(':input[type="text"]') $('input[type="text"]') is better for performance over $(':input[type="text"]'). This is because $(':input[type="text"]') needs to scan all input elements, textarea, select etc, where as $('input[type="text"]') scans only input elements. So if you want to find elements with an input tag, it is always better to use $('input[type="text"]') over $(':input[type="text"]')
Views: 90446 kudvenkat
Css Custom Animated Checkbox - How to make CSS switch / toggle / custom checkbox  - No Javascript
 
05:49
Please LIKE our NEW Facebook page for daily updates... https://www.facebook.com/Online-Tutorial-Html-Css-JQuery-Photoshop-1807958766120070/
Views: 20672 Online Tutorials
04 - Hello User JavaScript Interactive Application - Coding Behavior
 
13:41
04 - Hello User JavaScript Interactive Application - Coding Behavior As JavaScript is a behavioral language. Se We use Javascript to add behavior to Hello user application. Example Code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Hello user application</title> <style type="text/css"> #frmWelcome { background-color:lightgray; font-family:Arial; padding:10px; } </style> </head> <body> <form id="frmWelcome"> <fieldset> <legend>Welcome Form</legend> <label>User Name:</label> <input type="text" id="txtUserName" value=""/> <span id="spnMessage"></span> <br/> <input type="button" id="btnWishUser" value="Wish User" onclick="btnWishUser_onClick()"/> </fieldset> </form> <script type="text/javascript"> function btnWishUser_onClick() { var txtUserName = document.getElementById("txtUserName"); var spnMessage = document.getElementById("spnMessage"); if(txtUserName.value != "") { spnMessage.innerHTML = "Hello " + txtUserName.value; spnMessage.style.color="green"; } else { spnMessage.innerHTML = "Please enter your name"; spnMessage.style.color="red"; } } </script> </body> </html> ======================================================== Follow the link for previous video: https://youtu.be/53UC2RmvCX8 ========= For more benefits & Be up to date =================== Subscribe to the channel: https://www.youtube.com/chidrestechtu... Like the Facebook fan page: https://www.facebook.com/ManjunathChidre Visit to Chidre's Tech Tutorials website: http://www.chidrestechtutorials.com ========================================================
JavaScript popup window
 
11:54
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/01/javascript-popup-window_22.html In this video we will discuss, how to open a popup window using JavaScript. To open a popup window, use window.open() method. All the parameters are optional. window.open(URL, name, features, replace) URL - URL of the page to open. If URL is not specified, a new window with about:blank is opened name - Specifies the target attribute or the name of the window. _blank - URL is loaded into a new window. This is the default value if not specified. _parent - URL is loaded into the parent frame _self - URL replaces the current page _top - URL replaces any framesets that may be loaded name - name of the window features - Must be a comma-separated list. Some of the browsers does not support these features. menubar (yes/no) - Shows or hides the browser menu toolbar (yes/no) - Shows or hides the browser navigation bar location (yes/no) - Shows or hides the address field status (yes/no) - Shows or hides the status bar resizable (yes/no) - Whether or not the window is resizable scrollbars (yes/no) - Whether or not to display scroll bars top(pixels) - The top position of the window left(pixels) - The left position of the window height (pixels) - The height of the new window width (pixels) - The width of the new window replace - Specifies whether the URL creates a new entry or replaces the current entry in the browser history. Works only if the url is loaded into the same window. true - URL replaces the current document in the browser history list false - URL creates a new entry in the browser history list No parameters are passed to window.open() method. Since URL is not specified, a new window with about:blank will be opened. [input type="button" value="Open popup" onclick="window.open()" /] Most modern browsers open new tabs instead of separate windows. If you want to open the popup in a new window, one workaround I have found is to specify the URL, name, and features(height and width) parameters. This may not work in all browsers and it also depends on user's browser preferences. [input type="button" value="Open popup" onclick="window.open('http://google.com', '_blank', 'height=200,width=200')" /] When name parameter is set to _self, the new window replaces the current window [input type="button" value="Open popup" onclick="window.open('http://google.com', '_self')" /] Specify where you want the new popup window to be positioned using top and left features. [input type="button" value="Open popup" onclick="window.open('http://google.com', 'My Window', 'height=300,width=300, top=400, left=400')" /] Disable scrollbars and resizing. Works in IE but not in Chrome. [input type="button" value="Open popup" onclick="window.open('http://google.com', 'My Window', 'height=300,width=300, scrollbars=no, resizable=no')" /] To close pouup use window.close() method. [input type="button" value="Open popup" onclick="openPopup()" /] [input type="button" value="Close popup" onclick="closePopup()" /] [script type="text/javascript"] var popup; function openPopup() { popup = window.open("http://google.com","My Window", "height=300,width=300") } function closePopup() { popup.close(); } [/script]
Views: 138337 kudvenkat
How to check if JavaScript is enabled
 
09:17
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/02/how-to-check-if-javascript-is-enabled.html In this video we will discuss how to check if JavaScript is enabled or disabled. Let us understand this with an example. We have a page that captures Name and Gender. Both fields are required. The page relies on JavaScript being enabled for performing validation. We should always have server side validation irrespective of whether we have client side validation or not. It is not a good practice to rely just on client side validation, but for the purpose of this demo, let us say we only have client side validation. If JavaScript is enabled then we want to display the Name and Gender elements and the user can continue to use the application. If JavaScript is disabled then we want to hide the Name and Gender elements and we want to display the following message. It seems that you have disabled JavaScript. Please enable JavaScript. The easiest way to detect if JavaScript is enabled is by using noscript tag. The content inside the [noscript] element will be displayed only if scripts are not supported, or are disabled in the user's browser. [noscript] [style type="text/css"] .rootDiv { display: none; } [/style] [h1]It seems that you have disabled JavaScript. Please enable JavaScript.[/h1] [/noscript] [div id="rootElement" class="rootDiv"] [table border="1"] [tr] [td] Name [/td] [td] [input id="txtName" type="text" onfocus="validateIfEmpty('txtName')" onblur="validateIfEmpty('txtName')" onkeyup="validateIfEmpty('txtName')" /] [/td] [/tr] [tr] [td] Gender [/td] [td] [input id="txtGender" type="text" onfocus="validateIfEmpty('txtGender')" onblur="validateIfEmpty('txtGender')" onkeyup="validateIfEmpty('txtGender')" /] [/td] [/tr] [/table] [/div] [script type="text/javascript"] function validateIfEmpty(control) { var controlToValidate = document.getElementById(control); if (controlToValidate.value == "") { controlToValidate.style.background = "red"; } else { controlToValidate.style.background = "white"; } } [/script]
Views: 23347 kudvenkat
Form validation with JavaScript (on user registration form)
 
21:59
Source code: https://goo.gl/sihxZ7 Support me on Patreon: https://goo.gl/hv7yjB Using JavaScript, the input fields of the registration page are validated individually. Form submitting is prevented if all the form validation rules are not fulfilled. Styled error messages are displayed underneath each field and the user is prompted to re-enter the correct value. To learn how to insert in the database, check out this video: https://www.youtube.com/watch?v=gTQU_veJ6Kk - - - - - - - - - - - - - - - - - - - C O U R S E S - - - - - - - - - - - - - - - - - - - { B O O T C A M P S } - - The Web Developer Bootcamp: http://bit.ly/2NpDcKR - - The Complete Web Developer in 2018: Zero to Mastery: http://bit.ly/2N0ZW4F { P H P } - - PHP for Beginners - Become a PHP Master - CMS Project: http://bit.ly/2u5QMIw - - Create a REAL Social Network like Facebook in PHP + MySQL: http://bit.ly/2wUv3om - - PHP with Laravel for beginners - Become a Master in Laravel: http://bit.ly/2QcbeRf - - PHP OOP - Understand Object Oriented Programming in PHP: http://bit.ly/2CysNs3 { P Y T H O N } - - Complete Python Bootcamp: Go from zero to hero in Python 3: http://bit.ly/2wSybRs - - Complete Python Masterclass: http://bit.ly/2oNWfQW { J A V A S C R I P T } - - Modern JavaScript From The Beginning: http://bit.ly/2wUHdwD - - The Complete JavaScript Course 2018: Build Real Projects!: http://bit.ly/2wUlZ1L - - Modern React with Redux: http://bit.ly/2QcWBx0 - - MERN Stack Front To Back: Full Stack React, Redux & Node.js: http://bit.ly/2CAaeDY
Views: 298527 Awa Melvine
jQuery case insensitive attribute selector
 
09:03
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-case-insensitive-attribute.html In this video we will discuss, how to write a jQuery case-insensitive attribute value selector. Let us understand this with an example. The following example, only selects DIV 1. This is because jQuery attribute value selector is case-sensitive. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div[title="DivTitle"]').css('border', '3px solid red'); }); [/script] [/head] [body] [div title="DivTitle"] DIV 1 [/div] [br /] [div title="DIVTITLE"] DIV 2 [/div] [br /] [div title="divtitle"] DIV 3 [/div] [/body] [/html] Use the following code to make the jQuery attribute value selector case-insensitive [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return $(this).attr('title').toLowerCase() == 'divtitle'; }).css('border', '3px solid red'); }); [/script] The above script should select all the 3 divs. Now let us look at an example of making attribute contains selector [name*="value"], case-insensitive. The following example, selects only DIV 1 element. This is because the attribute contains selector is case-sensitive. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div[title*="Div"]').css('border', '3px solid red'); }); [/script] [/head] [body] [div title="DivTitle1"] DIV 1 [/div] [br /] [div title="DIVTITLE2"] DIV 2 [/div] [br /] [div title="divtitle3"] DIV 3 [/div] [/body] [/html] To make attribute contains selector case-insensitive, use filter() method and regular expression as shown below. [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return (/Div/i).test($(this).attr('title')); }).css('border', '3px solid red'); }); [/script] OR [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return RegExp('Div','i').test($(this).attr('title')); }).css('border', '3px solid red'); }); [/script] The above script should select all the 3 divs. Visual Studio Keyboard Shortcuts Convert Selected Text to Upper Case - CTRL + SHIFT + U Convert Selected Text to Lower Case - CTRL + U
Views: 77880 kudvenkat
How to add text over image - HTML and CSS
 
03:27
This video is about how to text over an image using HTML and CSS -- -- -- Online tools used in this tutorial: 1. Google Fonts: https://fonts.google.com ---- ------ ------ ------ ------ ------ - Code Editor: Brackets - Recorded with : OBS Studio ----- -------- ------- -------- -------- ------- ------- • Music Info: Title: don't leave me here alone Artist: Artificial Music Genre: Hip Hop & Rap Mood: Bright Download: https://goo.gl/BtGV37 ––– • Licence: don't leave me here alone by Artificial.Music https://soundcloud.com/artificial-music Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0 http://creativecommons.org/licenses/b... ------ -------- --------- --------- -------- --------- Video Created By: R.Y Baskara
Views: 65204 Code Instinct
Web Development Tutorial for Beginners (#1) - How to build webpages with HTML, CSS, Javascript
 
14:08
Once you're done with this, checkout lesson #2 - introduction to CSS: https://www.youtube.com/watch?v=gBi8Obib0tw How to put your website online (with coupon): https://www.youtube.com/watch?v=tq7dqdHCc7U How to build webpages with html, css, javascript tutorial for beginners. In this video, we'll cover how to develop websites using just the computer you have already. I'm using Sublime Text editor http://www.sublimetext.com/ and Google Chrome Other great text editors: Atom.io Brackets.io Notepad++ Now, if you just want a website and don't want to be a web developer, don't mess with learning all of this, get a site from squarespace.com and use squarespace plugins from http://thecustomsquare.com to make your site unique. Learn how to develop your own websites using the computer you already have. The basics of web development is the html file, which is centered around html tags. In this first lesson, we'll cover the basic html tags and how to use them to build a web page. Once you learn HTML, you can use CSS to add style to your pages and JavasScript to add animation and fun features. Learn Javascript with the Javascript tutorials for beginners: https://www.youtube.com/watch?v=fGdd9qNwQdQ&list=PLoYCgNOIyGACnrXwo5HMCfOH9VT05znGv -~-~~-~~~-~~-~- Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device" https://www.youtube.com/watch?v=fgOO9YUFlGI -~-~~-~~~-~~-~-
Views: 3332200 LearnCode.academy
Converting strings to numbers in JavaScript
 
17:14
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/11/converting-strings-to-numbers-in.html In this video we will discuss different methods that are available in JavaScript to convert strings to numbers. This example allows the user to enter 2 numbers and add them. Along the way we will learn the use of the following functions 1. parseInt() 2. parseFloat() 3. isNan() Here is the HTML for the web form [table style="border:1px solid black; font-family:Arial"] [tr] [td]First Number[/td] [td][asp:TextBox ID="txtFirstNumber" runat="server"][/asp:TextBox][/td] [/tr] [tr] [td]Second Number[/td] [td][asp:TextBox ID="txtSecondNumber" runat="server"][/asp:TextBox][/td] [/tr] [tr] [td]Result[/td] [td][asp:TextBox ID="txtResult" runat="server"][/asp:TextBox][/td] [/tr] [tr] [td] [/td] [td] [input type="button" value="Add" id="btnAdd"/] [/td] [/tr] [/table] Include the following JavaScript in the head section of the web form. [script type="text/javascript"] function addNumbers() { var firstNumber = document.getElementById("txtFirstNumber").value; var secondNumber = document.getElementById("txtSecondNumber").value; document.getElementById("txtResult").value = firstNumber + secondNumber; } [/script] Set the onclick attribute of the Add button to call the addNumbers() function. The HTML for the button should be as shown below. [input type="button" value="Add" id="btnAdd" onclick="addNumbers()" /] Run the application and enter 20 as the first number and 10 as the second number. Click Add buton. Notice that JavaScript concatenates the numbers instead of adding them. This is because the value property of the textbox is returning the number in a string format. So we need to explicitly do the conversion. This is when parseInt() function is useful. Modify the addNumbers() JavaScript function as shown below. function addNumbers() { var firstNumber = parseInt(document.getElementById("txtFirstNumber").value); var secondNumber = parseInt(document.getElementById("txtSecondNumber").value); document.getElementById("txtResult").value = firstNumber + secondNumber; } Run the application and test. Notice that we now get 30 as expected. Let's do another test. Enter 20.5 as the first number and 10.3 as the second number. Click the Add button. Notice that the decimal part is ignored. To retain the decimal places, use parseFloat() function. function addNumbers() { var firstNumber = parseFloat(document.getElementById("txtFirstNumber").value); var secondNumber = parseFloat(document.getElementById("txtSecondNumber").value); document.getElementById("txtResult").value = firstNumber + secondNumber; } If you leave first number and second number textboxes blank or if you enter text instead of a number, and when you click the Add button, NaN is displayed in result textbox. NaN in JavaScript stands for Not-a-Number. In JavaScript we have isNaN() function which determines whether a value is an illegal number. This function returns true if the value is not a number, and false if not. Modify the addNumbers() JavaScript function as shown below. function addNumbers() { var firstNumber = parseFloat(document.getElementById("txtFirstNumber").value); if (isNaN(firstNumber)) { alert("Please enter a valid number in the first number textbox"); return; } var secondNumber = parseFloat(document.getElementById("txtSecondNumber").value); if (isNaN(secondNumber)) { alert("Please enter a valid number in the second number textbox"); return; } document.getElementById("txtResult").value = firstNumber + secondNumber; } Now, when you leave first number and second number textboxes blank or if you enter text instead of a number, and when you click the Add button, you get relevant validation error messages as expected. Let's make the validation error message a little more relevant: If the first number and second number textboxes are left blank, then we want to display the following validation messages a) First Number is required b) Second Number is required If you enter text instead of number a) Please enter a valid number in the first number textbox b) Please enter a valid number in the second number textbox
Views: 120213 kudvenkat
jQuery image gallery
 
10:19
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/05/jquery-image-gallery.html In this video we will discuss how to create an image gallery with thumbnails using jQuery. We discussed how to do exactly the same thing using raw JavaScript in Part 41 of JavaScript tutorial. When you click on the image thumnail, the respective image should be displayed in the main section of the page. For the purpose of this demo we will be using the images that can be found on any windows machine at the following path. C:\Users\Public\Pictures\Sample Pictures Step 1 : Open Visual Studio and create a new empty asp.net web application project. Name it Demo. Step 2 : Right click on the Project Name in Solution Explorer in Visual Studio and create a new folder with name = Images. Step 3 : Copy images from C:\Users\Public\Pictures\Sample Pictures to Images folder in your project. Step 4 : Right click on the Project Name in Solution Explorer in Visual Studio and add a new HTML Page. It should automatically add HTMLPage1.htm. Step 5 : Add a reference to the download jQuery file. I am using jquery-1.11.2.js version for this demo. Step 6 : Copy and paste the following HTML and jQuery code in HTMLPage1.htm page. Replace < with LESSTHAN symbol and > with GREATERTHAN symbol <html> <head> <style type="text/css"> .imgStyle { width: 100px; height: 100px; border: 3px solid grey; } </style> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#divId img').on({ mouseover: function () { $(this).css({ 'cursor': 'hand', 'border-Color': 'red' }); }, mouseout: function () { $(this).css({ 'cursor': 'default', 'border-Color': 'grey' }); }, click: function () { var imageURL = $(this).attr('src'); $('#mainImage').fadeOut(500, function () { $(this).attr('src', imageURL); }).fadeIn(500); } }); }); </script> </head> <body> <img id="mainImage" style="border:3px solid grey" src="/Images/Hydrangeas.jpg" height="500" width="540" /> <br /> <div id="divId"> <img class="imgStyle" src="/Images/Hydrangeas.jpg" /> <img class="imgStyle" src="/Images/Jellyfish.jpg" /> <img class="imgStyle" src="/Images/Koala.jpg" /> <img class="imgStyle" src="/Images/Penguins.jpg" /> <img class="imgStyle" src="/Images/Tulips.jpg" /> </div> </body> </html> In our next video, we will discuss how to make this image gallery a bit more efficient using the concept of event bubbling.
Views: 49959 kudvenkat
JavaScript password strength checker
 
10:48
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/javascript-password-strength-checker.html In this video we will discuss how to implement a simple password strength checker using JavaScript. As we type the password in the password TextBox, the strength of the password should be displayed in a label control. The password strength is determined based on the following scoring criteria. If the password contain atleast 8 characters - 20 Points If the password contain atleast 1 lowercase letter - 20 Points If the password contain atleast 1 uppercase letter - 20 Points If the password contain atleast 1 number - 20 Points If the password contain atleast 1 special character - 20 Points The password strength is determined using the following scale. Password Score - Password Strength ]= 100 - Strong ]= 80 - Medium ]= 60 - Weak [ 60 - Very Weak Example : [asp:TextBox ID="TextBox1" runat="server" TextMode="Password" onkeyup="checkPasswordStrength()"] [/asp:TextBox] [asp:Label ID="lblMessage" runat="server"][/asp:Label] [script type="text/javascript"] function checkPasswordStrength() { var passwordTextBox = document.getElementById("TextBox1"); var password = passwordTextBox.value; var specialCharacters = "!£$%^&*[email protected]#~?"; var passwordScore = 0; passwordTextBox.style.color = "white"; // Contains special characters for (var i = 0; i [ password.length; i++) { if (specialCharacters.indexOf(password.charAt(i)) ] -1) { passwordScore += 20; break; } } // Contains numbers if (/\d/.test(password)) passwordScore += 20; // Contains lower case letter if (/[a-z]/.test(password)) passwordScore += 20; // Contains upper case letter if (/[A-Z]/.test(password)) passwordScore += 20; if (password.length ]= 8) passwordScore += 20; var strength = ""; var backgroundColor = "red"; if (passwordScore ]= 100) { strength = "Strong"; backgroundColor = "green"; } else if (passwordScore ]= 80) { strength = "Medium"; backgroundColor = "gray"; } else if (passwordScore ]= 60) { strength = "Weak"; backgroundColor = "maroon"; } else { strength = "Very Weak"; backgroundColor = "red"; } document.getElementById("lblMessage").innerHTML = strength; passwordTextBox.style.backgroundColor = backgroundColor; } [/script]
Views: 19038 kudvenkat
JavaScript beginner tutorial 30 - form validation text boxes and passwords
 
11:59
In this video I finally start speaking about form validation. I show you how to check if a form field has been left empty, and how to use a return statement in JavaScript. Don't forget to subscribe: http://www.youtube.com/user/QuentinWatt Social links: ------------------------------------------------------------- Add me on twitter: http://www.twitter.com/QuentinWatt facebook group: https://www.facebook.com/quentin.watt -------------------------------------------------------------
Views: 146231 Quentin Watt Tutorials
CSS Tutorial for Beginners - 02 - Changing font type, color, and size
 
04:06
In this video we go over changing the font type, size, and color. Source for episode: http://pastebin.com/RVK07MrM
Views: 433978 EJ Media