If you’ve used ChatGPT for even a little while, you probably noticed something right away. The way you ask it a question changes everything. Type in “write a blog post” and you’ll get something bland. Add details like the audience, tone, and purpose, and suddenly the response feels like it was written just for you. […]
Search: “javascript”
We found 189 results for your search.
Within the framework of a web project, web development is one of the processes that are constantly undergoing change and gets the latest fashions and technologies. This growth contributes to the enhancement of the user, streamlines work processes for web developers and enables companies to be competitive. As we get closer to the year 2025, […]
Your smartphone lets you shop your favorite products when you are traveling through the subway and even when you are in bed. It opens the vast world of entertainment to you just in a flash and, it also lets you do many serious tasks, such as ordering a medicine which isn’t available at local pharmacies. […]
Access iframe in jQuery
Sometimes it is very difficult to get content which is present in iframe. In this case normal javascript will not work. Here is a simple code to access iframe in jQuery: $(‘#frame1’).load( function(){ $(this.contentDocument).find(‘body’).html(‘This frame was modified with jQuery! Yay!!!’) });
JSON with Ajax
Ajax is Asynchronous JavaScript and XML for for asynchronous web applications. Using ajax data from a server asynchronously retrieved and display without reloading the page. So JSON with Ajax is no exception. JSON stands for JavaScript Object Notation. So, in simple terms JSON is a way of formatting the data. For, e.g., transmitting it over […]
Syntax of JSON
Basically Syntax of JSON is the subset of the JavaScript syntax. It has following notation: Data is represented in name/value pairs. The name/value pairs are separated by , (comma). Curly braces hold objects. Square brackets hold arrays. Below is a example of Syntax of JSON: {“students”:[ {“Name”:”Tim”, “Age”:”25″}, {“Name”:”John”, “Age”:”30″}, {“Name”:”Jane”, “Age”:”45″} ]} So,students[0].Name + […]
What is JSON?
JSON or JavaScript Object Notation is nothing but a text-based human-readable data storing and interchange. Douglas Crockford originally specified the this format.The media for this is application/json and the extension is .json.This is an easier-to-use alternative of XML. The below example shown an student object with an array of 3 records: {“students”:[ {“Name”:”Tim”, “Age”:”25″}, {“Name”:”John”, […]
jQuery search and highlight text
Using jQuery you can search and highlight text within a div from array of elements and wrap a highlight span around each word. Example to search and highlight text: <script type=”text/javascript”> var regex = /(Rubbish|Like|Rough|Raw|Doggie|Billy)/ig; $(‘#divID’).each(function() { var $this = $(this); var text = $this.text(); if (regex.test(text)) { $this.html( $this.html().replace(regex, ‘<span>$1</span>’) ); } }); </script>
jQuery uses $ as a alias or shortcut. So if you use another javascript library (like prototype, mootools etc) that uses same alias then you are in a jQuery conflicts situation. Use no-conflict mode to avoid jQuery conflicts: You have to use a new variable name to replace with jQuery $.For e.g. <script src=”jquery.js”></script> <script […]
Understanding MySQL LEFT JOIN
MySQL LEFT JOIN allows you to get result set from two or more tables for certain matches. Suppose you have two tables i.e. A and B. So if you join A to B using left join then all rows from the A tables will be displayed with matches a row from the B table. Example […]