escaping special characters in jQuery selector

jQuery is a very powerful javascript library that We use all the time. It’s simple to use, yet easy enough to do very advanced things. Anyone who has used jQuery knows that you can do quite a lot with selectors. One of the caveats that I found is using a selector for a DOM element that contains special characters.

Read More

Valid values for the id attribute in HTML elements

This post is a sum up of when creating the id attributes for HTML elements, what rules are there to follow for the value of id? According to HTML4 specifications: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (“-“), underscores (“_”), colons (“:”), and periods (“.”).

Read More

Multiple forms on one page / controller and form validation

Sometimes it’s required to place two forms on one page in codeigniter like displaying login form and register form on same page. Although the views may be different but you can face conflict while displaying validation errors if the form actions are not separate (aren’t calling different methods in controller). Here is a workaround to validate one form at a time while placing multiple forms on one page in codeigniter.

Read More

Keep checkbox checked after form submit in Codeigniter

The set_value(‘field name’) function in codeigniter allows us to retain the value of input field in form during form submission but it’s not applicable to keep checkbox checked if it was checked while the form was submitted or during postback submit refresh. Here to keep checkbox checked after form submit in Codeigniter, the set_checkbox() function plays the role.

Read More

Working with Date in Yii 2.0

Yii is a powerful framework where a lot of things happen automagically but learning curves are more complex as compared to any other PHP MVC framework. The first part (before ‘but’ in first line) attracts beginners to learn and experience it while the later part makes them stressed. So I tried here in article Working with Date in Yii 2.0 to simplify the concept by taking ‘Date’ as point.

Read More

Embed base64 encoded images

Most modern desktop browsers such as Chrome, Mozilla, Internet Explorer supports images encoded as data url. But there are problems displaying data URLs in some mobile browsers like Android Stock Browser.

Here we are presenting that how we can embed base64 encoded images in various platforms.

Read More

[ Page 2 of 4 ]