Posts

Showing posts from July, 2025

How to display Word file in HTML using JavaScript

  Introduction: Hello Guys, “ Welcome back” Today i am here with another one new great article. In this article I will explain about that how to display (embed) Word (Docx) file in HTML using JavaScript. Download this script file from below mentioned link and place in the folder named Scripts https://drive.google.com/file/d/10tmZOPxOReGV2j1AazChbdup98MLz4w3/view?usp=sharing   docx-preview.js plugin The Word (Docx) file will be displayed (rendered) in Browser using docx-preview.js JavaScript plugin. This library only works for Word 2007 and higher formats (docx).  Here i will use following files JavaScript plugin. 1. docx-preview.js 2. jszip.min.js  Description for HTML Page On the HTML page i will place HTML FileUpload element or control with the id named files . Also a Button with the id named btn_preview   and an HTML DIV with the id named word_container . Here i will assigned JavaScript OnClick event handler to the button. When the w...

PAN Card Number validation using JavaScript

  Introduction: Hello Guys, “ Welcome back” Today i am here with another one new great article. In this article I will explain about how to implement Indian PAN Card Number validation using JavaScript. PAN Card Number will be entered in the TextBox by the user and it will be validate on the click of Button by using Regular Expression (Regex) in JavaScript. Code for HTML Page On the HTML page there i will place Textbox control for entering the PAN Number by the user. Here I will also place the control named span to show the message or error message. Here I will also place the control named button, on the click of button   Validation_PAN   function will be called to check the valid PAN Card entered by the user. < input name ="txt_PanCard" type ="text" id ="txt_PanCard" class ="PAN" /> < span id ="lbl_PanCard" class ="error"> Invalid PAN Number </ span > < br />< br /> ...