NetProgrammingHelp.com
Asp.Net,C#,Ajax,Sql server,silverlight,Javascript codes exambles articles,Programming exambles

'JAVASCRIPT' Category

How to declare/use global constants (enum’s) in javascript ajax function

Posted by James Categorized Under: JAVASCRIPT Add Comments

Introduction: In this article i am going to explain about how to declare and use application wide constants (enum’s) in javascript. Main: What is enum? The enum keyword is used to declare an enumeration, a distinct type consisting of a set of named constants called the enumerator list. Every enumeration type has an underlying type, [...]

Creating Developing Cascading DropDownlist Using Ajax/JQuery/JavaScript/ASP.NET

Posted by James Categorized Under: JAVASCRIPT 8 Comments

Introduction: In this article,i am going to explain about how to create a cascading dropdownlist using ajax/javascript. Main: What is Cascading DropDown List? Cascading DropDownList means a series of dependent DropDownLists where one DropDownList is dependent on the parent or previous DropDownList and is populated based on the item selected by the user. See the [...]

How To Change the Image Opacity On MouseOver Using JavaScript/Jquery

Posted by James Categorized Under: JAVASCRIPT 7 Comments

Introduction: In this article,i am going to explain how to change the image opacity on image mouseover using jquery. Main: In this article i used google api(http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js) for demonstrating purpose, You can download this api in google website, Sample Code,try with yours own images <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>Change Image Opacity on Hover</title> <style [...]

Calling Accessing Web Services/Web methods Using JQuery

Posted by James Categorized Under: JAVASCRIPT Add Comments

Introduction: In this article,i am going to explain about, how to call a Web service web method using Jquery. Main: The below attribute allows us to access the web method using client side programming, [System.Web.Script.Services.ScriptService]     function WebService() { $.ajax({ type: "POST", //Method url: "Add.asmx/Addnumbers", //Webservice page/Web method data: "{int a,int b}", //Parameters list [...]

Adjusting Resizing Iframe Based On Screen resolution

Posted by James Categorized Under: JAVASCRIPT 2 Comments

Introduction: In this article,i am going to explain how to adjusting iframe size based on screen resolution or its contents, Main: <html> <body OnLoad = "AdjustSize();"> <div id="FrameDiv" Height="440px"> <iframe id="Frame" src="WebForm1.html"> </iframe> </div> </body> </html>     function AdjustSize() { if ((screen.width>=1024) && (Screen.height>=768)){ document.getElementById(’Frame’).style.height = Frame.document.body.scrollHeight + 10; } } Conclusion: Hope this [...]

Image Div Fade 3D Graphic Effect Using JavaScript Asp.Net Html

Posted by James Categorized Under: JAVASCRIPT 3 Comments

Introduction: In this article,i am going to explain how to create a image fade when they are loading into a DIV. Main: Try the below examble,please use yours own image path below, <img src="http://www.netprogramminghelp.com/wp-content/fadeexamble/Blue_Hills.jpg" /> <img src="http://www.netprogramminghelp.com/wp-content/fadeexamble/Sunset.jpg" /> <img src="http://www.netprogramminghelp.com/wp-content/fadeexamble/Water_Lillies.jpg" /> <img src="http://www.netprogramminghelp.com/site/wp-content/fadeexamble/Winter.jpg" /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   <html xmlns="http://www.w3.org/1999/xhtml" [...]

How to disable Right Click

Posted by James Categorized Under: JAVASCRIPT Add Comments

Introduction: In this article,explains how to disable the right click option in web site. Main: We can easily disable the right click in website/web pages. Step 1:Using Javascript, function disable() { if (event.button == 2) //Handling mouse right click { alert("RightClick is not authorised") } } Step 2:Using html, <body oncontextmenu="return false"> Conclusion: Hope this [...]

Creating delay button using Javascript

Posted by James Categorized Under: JAVASCRIPT one Commented

Introduction: In this article,we are going to discuss about how to set a delay effect(some 2 to 3 seconds) in form button using javascript while page load. Main: We can easily achieve this task using javascript settimeout . Check this sample code, <script type="text/javascript"> document.getElementById(’Frmbtn’).disabled = true; setTimeout(function(){ document.getElementById(’Frmbtn’).disabled = false; }, 15000); </script> Conclusion: [...]

How to create log messages using javascript

Posted by James Categorized Under: JAVASCRIPT Add Comments

Introduction: In this article demostrates,how to add the logging functionality in javascript. Main: Many JavaScript libraries provide built-in logging features similar to the logging packages of other development environment. See this below simple examble, Function we using for capturing log messages, function log(message) { message_list = document.getElementById(“debugging_messages”); log_message = document.createTextNode(message); log_list_item = document.createElement(‘li’); log_list_item.appendChild(log_message); message_list.appendChild(log_list_item); [...]

How to resize a Image based on screen Resolution

Posted by James Categorized Under: JAVASCRIPT one Commented

Introduction: Sometimes we has a issue like,assign a web parts based on user screen resolution.In this article,i explained with simple examble “how to resize image based on screen Resolution”. Main: The Javascript pre-defined properties screen.width and screen.height helps to capture user screen resolution, Check this below simple examble, <SCRIPT language="JavaScript">   if ((screen.width>=1024) && (screen.height>=768)) [...]