As you know, the user login box of the website contains the following fields username and password. Furthermore, most of them put the “Username” inside user name field and “********” inside password field to save the space within designing.In this post I’ll show you how to show “Password” text in the password field. It doesn’t actually does so but this tips will make it looks like so.
How it's done
When the user clicks the plain text field, the jQuery / JS code makes the plain text field hidden, the password field visible and puts focus on the password field. On blur, if the password field contains an empty value the plain text field is restored as the visible one to show the default value.
Download (Both jQuery type and js type)
You will get black background if you resize a transparent image. To fix it, You need set alpha channel imagecolorallocatealpha to 127. With imagecolorallocatealpha, it will allocate a color for an image.
int imagecolorallocatealpha ( resource image, int red, int green, int blue, int alpha)
From PHP manual:
imagecolorallocatealpha() behaves identically to imagecolorallocate() with the addition of the transparency parameter alpha which may have a value between 0 and 127. 0 indicates completely opaque while 127
indicates completely transparent. Returns FALSE if the allocation failed.
Before using it, you must set to false the blending mode for an image and set true the flag to save full alpha channel information.
$newImg = imagecreatetruecolor($nWidth, $nHeight);
$transparent = imagecolorallocatealpha($newImg, 255, 255, 255, 127);
imagefilledrectangle($newImg, 0, 0, $nWidth, $nHeight, $transparent);
imagecopyresampled($newImg, $im, 0, 0, 0, 0, $nWidth, $nHeight, $imgInfo, $imgInfo);
Another way to fix this issue:
phpThumb() - Resize images on the fly
Description: phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image.
1. unzip the folder and upload the content into the server
2. give the correct path of the phpThumb.php and image path as per the following syntax
<img src="../phpThumb.php?src=images/watermark.png&bg=FFFFFF&f=png" alt="">
<img src="../phpThumb.php?src=images/watermark.png&bg=FFFFFF&f=gif" alt="">
<img src="../phpThumb.php?src=images/watermark.png&bg=FFFFFF&f=jpeg" alt="">
where the bg=FFFFFF represents the bg color of your transparent image.
SimpleModal Jquery plugin helps you to create Ajax form with style pop up. It is very easy to setup in the web pages. It supports almost alkind of browsers. This download was written in php(contact.php).
This plugin uses "contact.php" where you need to change your email id.
Click this demo button to see the DEMO instantly
For Dot net developers need to change the contact.php according to their needs.
For more reference and Download link:http://www.ericmmartin.com/simplemodal/
Image zooming using JQuery
This Jquery helps you to integrate small magnifier window close to the image or images on your web page easily. It's the best way to display images in incredible detail. Users do not need to click anything - they just move their mouse over the image to see every detail of your product!
- Fast - the page loads as normal, then the high-resolution image downloads invisibly in the background.
- Easy - add it to your website in minutes.
- Customisable - change the size, position, colors to suit your website.
FOR MORE DETAILS AND DOWNLOADS: http://www.mind-projects.it/blog/jqzoom_v10