Training in Web Technologies Blog

what is jQuery connect?

Ans. It is a jquery plugin which enables us to connect a function to another function. It is like assigning a handler for another function. This situation happens when you are using any javascript plugins...

Can you give me a brief history of your programming days?

Ans. Although it’s a bit embarrassing, my first programming experience was trying to build a customized and skinnable mediaplayer with Visual Basic 6. This probably was around 1999 or so, and although the media player...

How to use jQuery library in our ASP.Net project?

Ans. Download the latest jQuery library from jQuery.com and include the reference to the jQuery library file in our ASPX page. <script src=”_scripts/jQuery-1.2.6.js” type=”text/javascript”></script> <script language=”javascript”> $(document).ready(function() { alert(‘test’); }); </script>

Delaying the Transition

Going back to our example, transitions can be delayed from the moment the trigger happens on screen. For example, let’s say we wanted the background transition to happen half a second after the link...

Removed Elements from HTML5

The following HTML 4.01 elements are removed from HTML5: <acronym> <applet> <basefont> <big> <center> <dir> <font> <frame> <frameset> <noframes> <strike> <tt>

HTML5 Browser Support Tips

Of course a big question is can and should you use these tags now. What kind of support exists in browsers for these new semantic tags? Not all browsers are supporting these tags, however you...

The Difference Between Sections and Articles

One of the things I’ve found confusing about these new structural tags is the difference between a section and an article and when to use each. The answer seems to be a matter of...

Article Element in HTML5

The article element represents a section of content that forms an independent part of a document or site. It represents a section of self-contained content. Can the content be syndicated as an rss feed?...

NAV Element in HTML5

The nav element represents a section of a document that links to other documents or to parts within the document itself. It’s a section of navigational links. It’s intended for major navigational information like a sitewide navigation...

Aside Element in HTML5

The aside element represents content that is tangentially related to the main text of a document. It aligns with what we think of as a sidebar. As with the other structural tags its not...

Footer Element in HTML5

Similar to the header, the footer element represents the footer for a section or document. Like the header tag there can be multiple footer tags in an html5 document. A footer is more than...

Header Element in HTML5

The header element represents the header of a section. It’s meant to be used as a container for a group of introductory content or set of navigational links. While most websites currently have one...

Section Element in HTML5

The section element represents a section of a document, typically one that includes a heading. It’s used to enclose a thematic grouping of content. It’s similar to a div though it carries more semantic meaning since...

Progress Element in HTML5

The progress tag is used to markup values in the process of changing Your download is <progress>55%</progress> complete It has 3 attributes value min max By itself it’s probably not that interesting, however when combined with...

Meter Element in HTML5

The meter tag is used to markup measurements, specifically a scalar measurement within a known range. 1 2 <meter>1 of 10</meter> <meter>2 of 7</meter> It could also be used to represent a fractional value like...

Time Element in HTML5

Time as you would expect is used to markup temporal information. It can be used for dates, times, or combinations of the two. 1 2 3 <time datetime=”14:00″>2pm</time> <time datetime=”2011-07-14″>July 14th, 2011</time> <time datetime=”2011-07-14T14:00″>2pm...

How to Use HTML5 Semantic Elements

HTML5 has several new layers, including a new set of semantic tags. While there is still some debate about whether or not we should be using and styling these tags I think at the very...

Progress Element in HTML5

States of progress bar: A progress bar can be in two states – indeterminate and determinate. 1. Indeterminate Indeterminate state of the progress bar in Chrome 29 on Mac OS 10.8 Based on your combination of browser...

PHP Interview Questions for freshers 05

What is meant by urlencode and urldocode? Urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode(“10.00%”) will...

PHP Interview Questions for freshers 04

How can we encrypt the username and password using php? You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD(“Password”); We can encode data using base64_encode($string) and can decode using base64_decode($string); What are the...

PHP Interview Questions for freshers 03

What is meant by nl2br()? Nl2br Inserts HTML line breaks before all newlines in a string string nl2br (string); For example: echo nl2br(“god bless you”) will output “god bless you” to your browser. What...

PHP Interview Questions for Freshers 02

What is the difference between mysql_fetch_object and mysql_fetch_array? MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array. What is the difference...

PHP Interview Questions for freshers 01

What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods? On the server side, the main difference between...

Extracting Substrings

Problem You want to extract the substring preceding or following a particular match. Solution Use the preg_split() function to split the original string into an array delimited by the match term, and then extract...

Replacing Patterns in a String

Problem You want to replace all/some occurrences of a pattern or substring within a string with something else. Solution Use a regular expression in combination with PHP’s str_replace() function (for simple patters): <?php //...

Counting Matches in a String

Problem You want to find out how many times a particular pattern occurs in a string. Solution Use PHP’s preg_match_all() function: <?php // define string $html = “I’m <b>tired</b> and so I <b>must</b> go...