- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1167 Articles
George John
144 Views
The parent object provides a reference to the main window from the child.The following is the parent code. The directive below triggers the iFrame to send a message to the parent window every 3 seconds. No initial message from the main window needed!var a= window.addEventListener ? "addEventListener" : "attachEvent";// here ... Read More
George John
111 Views
Facelets is an open-source Web template system for JavaServer Faces (JSF). The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.Facelets is a XML based view technology. ... Read More
George John
392 Views
Html2Canvas is a JavaScript library that can take screenshot of the whole web page or specific part. It doesn’t take the screenshot but creates the view based on the page information.ExampleBelow given is an example code. Here, html2canvas.js script is included at the . The html2canvas() method is called. Returns ... Read More
George John
3K+ Views
To disable web browsers’ back button, try to run the following code. This is the code for current HTML page, Example Disable Browser Back Button Next Page ... Read More
George John
2K+ Views
A JavaScript function can have an optional return statement i.e. it’s optional to return a value. This statement should be the last statement in a function.For example, you can pass two numbers in a function and then you can expect the function to return their multiplication to your calling program.ExampleTry ... Read More
George John
1K+ Views
The parseInt() method in JavaScript converts a string into a number. The method returns NaN if the value entered cannot be converted to a number.ExampleYou can try to run the following code to convert a string into an integer − Live Demo Check ... Read More
George John
272 Views
The imagecolortransparent() function is used to set the color of a transparent image.Syntaximagecolortransparent ( img, color )Parametersimg: Create image with imagecreatetruecolor() function.color: Color identifier created with imagecolorallocate().ReturnThe imagecolortransparent() function returns the identifier of the new transparent color. The return value is -1 if color is not specified and the image ... Read More
George John
56 Views
The imagecolorsforindex() function gets the colors for an index.Syntaximagecolorsforindex ( img, index )Parametersimg: Creates an image with imagecreatetruecolor()Index: Set the color index.ReturnThe imagecolorsforindex() function returns an associative array with red, green, blue and alpha keys that contain the appropriate values for the specified color index.ExampleThe following is an example Live DemoOutputThe ... Read More
George John
30 Views
The imagecopymergegray() function is used to copy and merge part of an image with gray scale.Syntaximagecopymerge ( dst_img, src_img, dst_x, dst_y, src_x, src_y, src_w, src_h, pct )Parametersdst_im Set destination image link resource.src_im Set source image link resource.dst_xSet x-coordinate of destination point.dst_y Set y-coordinate of destination point.src_x Set x-coordinate of source point.src_y Set y-coordinate of source ... Read More
George John
39 Views
The imagecolorclosest() function gets the index of the closest color to the specified color.Syntaximagecolorallocatealpha (img, red, green, blue)Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentReturnThe imagecolorclosest() function returns the index of the closest color, in the palette of the image.ExampleThe following is an ... Read More