Javascript

Programming in Javascript

Highcharts is a charting library written in pure HTML5/JavaScript. Without generating the image we can display the graph. I had a requirement to generate a multiple graph on a single page in a Drupal site. Read on to know how to implement multiple graphs on single page in Drupal using highchart.

Continue reading

One of our Drupal clients wanted to make the current image of the slideshow in a page as the background of other pages. It is possible to achieve this effect using a combination of jQuery and Ajax. Read on to know how to make the current image of slideshow in a page as the background of related pages in a Drupal site.

Continue reading

Are you looking for a way manipulate dom elements using javascript based on some values from PHP, then this article is for you. We had recently worked in a Drupal 6 site having the same scenario. Our requirement was to enable some checkboxes using javascript based on the values of some variables available in the backend, This was accomplished using Drupal.settings

Continue reading

Did you face a situation where you wished that you could edit JavaScript live on browser to make experimental changes in your code? Have your ever made modifications in JavaScript code without rewriting the file and reloading the web page see the changes in real time. Read on to know how to edit edit JavaScript code in your browser and see the changes in real time?

Continue reading
  • By nijo.lawrence on May 9, 2013 - 15:18
  • HTML
2

When developing a website we might often come across situations where we have to limit the entry into each text fields to a certain type. One of the common scenarios we run into when developing Drupal websites is to limit text fields to accept only numbers as its input. If you want to know how to limit a text field to accept only numbers as input then read on to find out more.

Continue reading
0

We need to develop websites for a variety of mobile devices along with regular desktop versions. To do this effectively we need to detect the mobile devices when they access the website which can be done through Javascript. Read on to know how to detect mobile devices using Javascript

Continue reading
  • By jiby.john on February 27, 2013 - 16:55
  • AJAX
0

AJAX is now widely used in web development to make the user interfaces simpler and faster. We may use AJAX to load images after page load in order to increase performance. However if you want to have a lightbox popup with the full image bound to an image loaded by AJAX then you might run into problems. You will find that even after linking the JS, CSS files and adding the rel="lightbox" attribute to the images it might not work.

Continue reading

Colorbox can be used to display content pop-ups. By default, the popup's height and width will be exactly the same as that of the original content. But there may be times, when you want to load the content as per the screen height. This can be done easily using jQuery.

The steps you may follow to achieve this are:

Continue reading

Suppose you have a checkbox in a Drupal webform that needs to be validated before submitting the form. You may be familiar with Drupal form validation but you can add validation using Javascript too. If you have a Drupal form in your Drupal website and want to know how to add Javascript validation to a checkbox to a Drupal form then read on

Continue reading

A large number of websites on the web today have some kind of slideshow in them and they are probably using a library like jQuery to create the slide effect. When there are 10 images cycling in a slideshow, you might want to shuffle the order of the slideshow a bit. If you have a slideshow in your Drupal website and want to know how to change the order of the slideshow on every pageload then continue reading to know more.

Continue reading

On one of the Drupal projects we had recently worked on, the client wanted us track the last active tab. We had used the Drupal Quicktab module to create the tabs. However we noticed that the quicktab cookie used to track the last active tab is not persisting after closing and reopening the browser. If you are facing the same scenario in your Drupal site and want to know the solution then continue reading.

Continue reading

We had come across many situations while developing Drupal based websites where we had to create Javascript popups without using third party Javascript libraries. Third party libraries often lead to dependency issues or conflicts with existing Javascript functionalities. If you want to know how to create a simple Javscript popup in your Drupal website without using third party Javascript libraries then continue reading.

Continue reading

A few Drupal users reported that a Javascript bug was preventing Colorbox from working on the home page. If you are facing the same issue with Colorbox on any of your pages in your Drupal site then read on to find out the solution.

Continue reading

The trick explained briefly

We are not actually going to theme the file upload field as it is presently nearly impossible to do that. Instead we are going to put an ordinary looking 'dummy' input text field over the file field. Next we proceed to make the 'original' file upload field invisible but accessible to the user via CSS. So when a user clicks on the dummy input text field they are actually clicking on the file upload field itself. To make it authentic we are going to copy the file path from the file upload field to the text input field via javascript.

Continue reading

We were testing our newly implemented modal popup for a login functionality. It was working pretty good in Firefox, Opera, and Chrome but not in IE8. When attempts to login by clicking on a login link the login modal was not appearing in IE8. Firebug said nothing, but jquery-1.7.2.min.js in IE showed the following error:

Continue reading
  • By jiby.john on June 26, 2012 - 23:08
  • Drupal
0

Have you ever wondered how that cool site you saw last day had those cool interfaces and you wished your Drupal site could have the same coolness? jQueryUI is your saviour here. jQueryUI is one of the most popular JavaScript libraries out there in the world of web development. jQueryUI allows you to add very cool user interface elements to your website without much effort.

Continue reading
  • By muhammed.fathima on June 5, 2012 - 23:56
  • CSS
0

We were trying to create a new theme for our Drupal site and we came across an issue. How to create div "left" to be the same height as div "right" which can be smaller or bigger?

Is it possible to have the "left" div height adjusts automatically according to the "right" div height?

Here is what saved us:

Continue reading

We were working on an online billing application for a small charity firm when we came upon this problem. The application was developed and tested under Firefox. However we got the error when we tested it on Internet Explorer 6 (6.0.2900.2180). There was a simple window.open javascript call to open a popup window. The window was opening fine but it remained blank and the parent window showed the javascript error

Error: Class not registered.

Continue reading