The substr() method returns the characters in a string beginning at the specified location through the specified number of characters. Syntax, parameters, examples of substr() in Javascript are as below.

Read More

substring() is one of the main string function which is mostly used in javascript. The substring() method extracts the characters from a string, between two specified indices, and returns the new sub string.

Read More

Many developers confused with the Attr and Prop keyword in jQuery. So We are describing here the difference between Attr and Prop in jQuery. The segregation of attr() and prop() should help alleviate some of the confusion between HTML attributes and DOM properties.

Read More

For jQuery 1.6 or above there is prop() function and lower jQuery versions have attr() function which can be used to disable or enable an input field. Further more DOM object’s disabled property also works with any version of jQuery to disable or enable an input field.

Read More

If you already have database tables and you just want to apply foreign keys for record on those table then you can apply foreign key in phpMyAdmin using database query also.

I have already written a tutorial ‘Setting up foreign key in phpMyAdmin‘ with example images and I prefer to write database query to set up foreign key in existing database tables as queries allow me to accomplish all required steps in once go.

Read More

Many developers fail in placing Yii form and submit button in bootstrap 3 modal popup in right way so either they compromise with the appearance of the modal or complaint that the submit button isn’t working.

Taking a login form as an example if everything is done in right manner then the buttons will appear in modal footer and the modal itself inside form tag and you will see a working form same as illustrated below:

Read More

[ Page 20 of 32 ]