Category: jQuery

A fast, concise, library that simplifies how to traverse HTML documents, handle events, perform animations, and add AJAX.

How to save an image of the highcharts on the server?

Highcharts have a built-in option to export the current chart, it have the option to save the chart as PNG, JPEG, PDF or SVG. It doesn’t have option to save the image on the server, instead of downloading in browser (clinet). To save an image of the highcharts on the server, follow the steps: Step …

Continue reading

Permanent link to this article: https://blog.openshell.in/2014/08/how-to-save-an-image-of-the-highcharts-on-the-server/

How to use Jsonp method in JQuery

JSONP is JQuery(JavaScript) method used to request data from a server in a different domain, something prohibited by typical web browsers because of the same-origin policy. JSONP takes advantage of the fact that browsers do not enforce the same-origin policy on<script> tags. JSONP is a viable solution for cross-domain Ajax. JSONP does not work with …

Continue reading

Permanent link to this article: https://blog.openshell.in/2014/06/how-to-use-jsonp-method-in-jquery/

Use Number() instead of parseInt() in javascript

Recently I came across the issue in converting string to integer in Javascript(JS). I was used parseInt() method to convert string value into integer value. unfortunately, I was faced issue in chrome browser but all other browsers like firefox, ie and safari are worked fine. Its too hard time for me to find out the …

Continue reading

Permanent link to this article: https://blog.openshell.in/2014/01/use-number-instead-of-parseint-in-javascript/

How to remove special characters using jQuery ?

jQuery code can be used to remove special characters. [js] <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#input_field_name").keyup(function(event) { original_val = jQuery("#input_field_name").val(); rep_value = name.replace(/[^a-zA-Z 0-9.]+/g,”); jQuery("#input_field_name").val(rep_value); }); }); </script> [/js]

Permanent link to this article: https://blog.openshell.in/2013/12/how-to-remove-special-characters-using-jquery/

Submitting a form using jQuery AJAX

HTML form, that’s to be submitted by jQuery AJAX. [html] <form id=”employee” action=”employee.php” method=”POST” name=”contact”> <div>Name: <input id=”name” type=”text” name=”name” size=”30″ value=”" /></div> <div>Email: <input id=”email” type=”text” name=”email” size=”30″ value=”" /></div> <div>Phone: <input id=”phone” type=”text” name=”phone” size=”30″ value=”" /></div> <div><input id=”submit_btn” type=”submit” name=”submit” value=”Send” /></div> </form> <div id=”result”></div> [/html] Java Script code using jQuery AJAX …

Continue reading

Permanent link to this article: https://blog.openshell.in/2013/12/submit-form-using-jquery-ajax/

Dynamically create form in javascript on fly

To create a form dynamically using JavaScript on fly of the webpage. This which helps to create form and input controls dynamically. [javascript] /* To create form with javascript */ var form = document.createElement("form"); form.setAttribute(‘method’,"post"); // form method form.setAttribute(‘action’,"test.php"); // form action url form.setAttribute(‘name’,"frmName"); // form name form.setAttribute(‘id’,"frmId"); // form ID form.setAttribute(‘target’,"_blank"); // form target …

Continue reading

Permanent link to this article: https://blog.openshell.in/2013/12/dynamically-create-form-in-javascript-on-fly/

Window.open Not Working In IE

If you use window.open to open custom windows with JavaScript, you might encounter problems in Internet Explorer. Even though you can open new windows in other browsers, it doesn’t work in IE. The reason to this is it depends on how you name your JavaScript windows. IE doesn’t allow space here. window.open takes three parameters …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/07/window-open-not-working-in-ie/

PNG transparency problem in Internet Explorer 5.5 & 6

hi friends This plugin will fix the missing PNG-Transparency in Microsoft Internet Explorer 5.5 & 6. 1. download 2. Add jQuery and pngFix to the HEAD-Section of your HTML … <head>  …  <script type=”text/javascript” src=”jquery-latest.pack.js”></script>  <script type=”text/javascript” src=”jquery.pngFix.js”></script>  …  </head> 3. Activate pngFix on document.ready <head>  …  <script type=”text/javascript”>      $(document).ready(function(){          $(document).pngFix();      });  </script>  …  </head>

Permanent link to this article: https://blog.openshell.in/2011/03/pngfix-internet-explorer-5-5-6/

jQuery Traversing Tips

Just a quick review of tips available in jQuery to manage nodes (contents) near by the content / node which is triggered an event like click, hover etc Functions: find, parent, parents, children, first, last, closest Suppose you need to manage some nodes nearby a link or a button on an event. Say $(‘.button’).click(function(){ // …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/02/jquery-traversing-tips/

Flash Effect Image Loading with Jquery

Load images with flash effect using jquery. It is very useful script to loading images with nice effect on your web projects and also simple just seven lines of code. CODE <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script> <script type=”text/javascript”> $(document).ready(function() { var i = 0; $(‘#imagesdiv img’).clone().appendTo($(‘#imagesdiv’)); $(‘#imagesdiv img’).each(function() { var me = this; $(this).hide() var j = …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/flash-effect-image-loading-with-jquery/