Home » Tag Archives: javascript

Tag Archives: javascript

Difference between ajax and jQuery and Javascript

Javascript is a client-side (in the browser) scripting language. jQuery is a library/framework built with Javascript. It is very popular because it (nearly universally) abstracts away cross-browser compatibility issues and it emphasises unobtrusive and callback-driven Javascript programming. AJAX (Asynchronous Javascript XML) is a method to dynamically update parts of the UI without having to reload the page – to make ...

Read More »

How to Check Expired Sessions using jQuery Ajax and PHP

We can achieve using the php and ajax.The following ajax call execute in every 10 seconds to check the status of session.If it expired the user redirected to seesionout page. Ajax call in every 10 seconds   var check_current_session; function CheckForCurrentSession() { var strSession=”check_current_session=true”; jQuery.ajax({ type: “GET”, url: “check_current_session.php”, data: strSession, cache: false, success: function(result){ if(result== “Y”) { alert(‘Your session ...

Read More »

Html Textarea auto resize using javascript

  <script> var observer; if (window.attachEvent) { observer = function (element, event, handler) { element.attachEvent(‘on’+event, handler); }; } else { observer = function (element, event, handler) { element.addEventListener(event, handler, false); }; } function init (maximumHeight) { var text = document.getElementById(‘text’); var maxHeighter=maximumHeight; var olderHeight=  text.scrollHeight; var newerHeight; function resize () { text.style.height = ‘auto’; newHeight= text.scrollHeight; if(newerHeight>olderHeight && newerHeight>maxHeighter  ) ...

Read More »