Get Mouse Position in JavaScript for all browsers

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags with Leave a comment on Get Mouse Position in JavaScript for all browsers

 

Get Mouse Movement in Javascript
Get Mouse Movement in Javascript
function mouseXPos(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
return evt.clientX + (document.documentElement.scrollLeft ?
document.documentElement.scrollLeft :
document.body.scrollLeft);
else return null;
}

function mouseYPos(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
return evt.clientY + (document.documentElement.scrollTop ?
document.documentElement.scrollTop :
document.body.scrollTop);
else return null;
}

To use above function, just pass the mouse event.

Live Demo

XML Parsing Error: no element found

Author posted by Jitendra on Posted on under category Categories ASP.NET, Tech Tips and tagged as Tags , with 3 Comments on XML Parsing Error: no element found

Few Days ago, i found strange error like “XML Parsing Error: no element found“.

I was unable to find the exact root cause. Most of the times it happens if you are missing any closing tag in your ASPZ application. I checked my complete page and reconfirmed but error still persist.

somehow i found that ASP.NET treat the response of page as XML document and that’s why we receive XML Parsing Error: no element found error.

so explicitly i set the response type of my page as text/HTML. Response.ContentType = “text/HTML”.

And this line tells the ASPX that page is HTML, not XML.

Display author name in wordpress

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , with 1 Comment on Display author name in wordpress

Look in the default theme’s index.php file for the proper template tag:


<code><?php the_author() ?></code>

and a good place to put it.

Display Author’s ‘Public’ Name

Displays the value in the user’s Display name publicly as field.

<p>This post was written by <?php the_author(); ?></p>

Get Author link


<p>Written by:
<?php echo get_the_author_link(); ?></p>

The Author’s Post

<p><?php the_author(); ?> has blogged <?php the_author_posts(); ?></pre>
</div>
<pre>posts</p>

The Author’s Post Link

<p>Other posts by <?php the_author_posts_link(); ?></p>

for more info check below URL
http://codex.wordpress.org/Template_Tags/the_author

Install the OS on CD/DVD/Flash/Pen Drive

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags with 3 Comments on Install the OS on CD/DVD/Flash/Pen Drive

Pocket PC..

This article will show you how to install Windows XP on your CD/DVD/USB Pen drive/ Flash Drive/ thumb Drive.

Procedure:-

1) Make sure that your system ( to be booted ) has about 500MB of free disk space!

2) Download the latest PE Builder version (self-installing package) and install it. Follow me to Download.
3) Start PE Builder (pebuilder.exe). When you start PE Builder for the first time it will ask if you agree with the license agreement.

4) Now PE Builder will ask to search for windows installation files. If you don’t have your windows XP setup/installation files on your system you must insert the original Microsoft WIN XP installation/setup CD . Click “yes” to start searching. PE Builder will now search all fixed- and CD-Rom drives for Windows installation files. This will take some time. When more than one valid location is found, a dialog will appear where you can select which location you want to use.

5) For making Bootable CD/DVD :

At the main PE Builder dialog, select the “Burn to CD/DVD” option. When you are using an erasable medium, make sure that the “AutoErase RW” option is enabled. The “burn using” option should be set to “StarBurn”. Select your CD writer device from the Device list.

Click on  “build” button. PE Builder will now ask you to create a BartPE directory, answer with “yes”.

The license for your Microsoft Windows XP product is shown. Read it and agree to it to continue.

PE Builder will now start building BartPE. This will take a few minutes.
You will see a lot of files getting copied and/or decompressed, the ISO image build and the data recorded to your CD/DVD writer.
If the data verify was correct and there where no errors reported you can boot the CD/DVD!

6)For making bootable Pen Drive:

Follow the above instructions and copy the files to the pen drive.

Enjoy your new preinstalled XP environment and use it for system Rescue Purposes…

Install OS From Your Flash/Pen Drive.

Author posted by Jitendra on Posted on under category Categories Tech Tips with Leave a comment on Install OS From Your Flash/Pen Drive.

Simple way to take your Desktop PC into your pocket via USB.

Most PC users have got very much habituated in installing Windows Operating system on their computer using the Windows Installation CD’s, but what if a user does not have a CD-ROM to read them and if he has a option of only using a Pen Drive? Then here is a small tutorial on how to get started and install a complete Operating System using the Pen Drive as Booting Medium and a drive to Store the Setup files.

First of all you need to make sure that you have got a Pen Drive with a total capacity of minimum 256Mb for the storage of the Setup Files though you can opt for the higher capacity drives and you need to make sure that the format of the Disk is correctly set before the installation process. Hence here we are going to use a tool  HP USB Disk Storage Format Tool for Formatting a USB Drive into the right File System which can be downloaded (Open Source Software- HP USB Disk Storage Format Tool – v2.1.8 ). Since most BIOS wont accept any drive and would only accept FAT File System you need to make sure that you have formatted the USB Flash Drive using this tool.

Follow this link To download the USB Format Software

Boot menu may vary.
Modal Boot Page

Next you need to get ready loading the OS files into the Flash Drive, following which you need to setup the Boot Device in the Advanced BIOS Features. The new version MotherBoards would have a option called “˜USB-HDD’ before the Hard Drive option and if you dont find this available you need to update your BIOS. If you find it, you need to change the order of booting and make sure that the USB-HDD is in the first option. Next save the BIOS settings and restart the computer.

There can be other names also listed for these Pen Drives which can be likely Removable Device, Removable Storage Device etc whom you need to select and make sure they are in the first position in the Boot Device Priority Section as that we do during booting xp from CD drive..

Regards–

Nikhil Naoghare.

Windows 7 theme in XP

Author posted by Jitendra on Posted on under category Categories Tech Tips with Leave a comment on Windows 7 theme in XP

First,  download some of the themes you like to your Windows XP or Vista desktop.

dowload windows 7 themes

These files have a unique .themepack extension which is just another zip format containing all of the elements of a theme including the background images, Aero glass colors, sounds, cursors, icons, screen savers, etc.

To use these files on an older version of Windows, you first need to extract them as only Windows 7 can natively understand the themepack format. You can either change the file extension of the Windows 7 theme file from .themepack to .cab and then extract the files with a right-click, or install the free 7 zip  utility as 7-Zip can automatically hand the themepack file format.

windows 7 themepack file Extract themepack with 7-Zip Rename to CAB and extract in Explorer

Once extracted, your theme files will now be in a new folder that has the same name as your original themepack.

Most Windows 7 themes consist of multiple background images and Windows 7 will automatically change your desktop background at periodic intervals using one of the images from the themepack. Windows Vista and XP do not support desktop slideshows, but you can easily bring that feature use the excellent and free John’s Background Switcher program.

To create a desktop slideshow, click the add button and choose “A folder on your computer.” Now select the Windows 7 theme folder that contains all the background images. The program allows lot of tweaking but you can skip that because the default settings are very similar to what you need for simulating Windows 7 behavior on your XP or Vista computer.

Add folder containing Windows 7 wallpapers Choose your Windows 7 Theme Folder

However, John’s Background Switcher by default shows the name of the image in the top right hand corner of the picture.  To remove this, click the “More…” button that has a gear icon on it.  Uncheck the box beside the 3rd entry which says “Show picture info on the top-right corner of the screen.”  Now click Ok, and then click Ok in the main window, and your desktop slideshow is all ready.

How to change the Meta Tag link in WordPress

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , with Leave a comment on How to change the Meta Tag link in WordPress

How to change the Meta Tag link in Wordpress

Edit /wp-includes/default-widgets.php file at line 296

Old code:

<?php wp_register(); ?>

<li><?php wp_loginout(); ?></li>

<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”http://wordpress.org/” title=”<?php echo esc_attr(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>

<?php wp_meta(); ?>

New Code:

<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”https://www.jitendrazaa.com” title=”<?php echo esc_attr(__(‘Powered by Shiva, the supreme solution.’)); ?>”>ShivaSoft</a></li>

Change the Login Image of WordPress in Simple steps

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , , , with Leave a comment on Change the Login Image of WordPress in Simple steps

Change the Login Image of WordPress in Simple steps

Hi,

Follow below steps to change the login image and tooltip of the wordpress.

for this hack, you will require following Two files :

/wp-login.php
/wp-admin/login.css

in wp-login.php page search for the “powered by” and replace that tooltip as per your convenience / requirement.

Now open login.css and search for the logo image. normally its in tag h1 a.

So you can change image like :

h1 a{background:url(../images/ShivaLogo.png)

where “ShivaLogo.png” is your new image name.

New Blog from Jitendra Zaa (formerly ShivaSoft)

In this every minute changing world, knowledge is the only key to success and sharing your knowledge with others is the best way to enhance your skills.

This is the technical blog which will update you every day on changing technologies and News.

If you got any technical query or any problem then ask at : https://www.jitendrazaa.com