vijayjoshi.org - php | javascript | ajax | and all things web

Archive for the ‘FAQ’ Category

Comment box not visible on a page/post in WordPress 3.2.1

October 21st, 2011 | Posted by Vijay Joshi | 1 Comment
First of all I will congratulate you on upgrading to wordpress 3.2.1. Having latest version means your site is updated and safe. Now coming to the point, some of you might ...

How to create excel files in PHP?

December 15th, 2009 | Posted by Vijay Joshi | 12 Comments
Some time ago I found a class on phpclasses.org by Harish Chauhan which makes it incredibly easy to generate simple excel spreadsheets from PHP. I found it useful so I ...

Getting and setting value of html elements using jQuery

December 9th, 2009 | Posted by Vijay Joshi | 4 Comments
If you have started using jQuery recently and you  are used to DOM methods of getting and setting values for form and html elements, this article is for you. Using jQuery ...

Quick PHP Tip: How to parse CDATA sections using SimpleXML

September 22nd, 2009 | Posted by Vijay Joshi | 3 Comments
Applies to:  simplexml_load_string and simplexml_load_file Problem : SimpleXML does not parse text inside CDATA tags in an XML. Consider the XML below: $str = ''; $str.='some text goes here'; $str.=''; To parse it we use following ...

FAQ(Javascript) : User confirmation on close button of browser

July 7th, 2009 | Posted by Vijay Joshi | 2 Comments
Problem: On clicking the close button of browser ask for user confirmation with a custom message Solution: Use the window.onbeforeunload method. This method expects a string value. This string will be ...

PHP – Turn register globals on off using htaccess

June 5th, 2009 | Posted by Vijay Joshi | 1 Comment
Problem: My application is hosted on a server where php has register_globals set to on in php.ini. But using register_globals = on makes code error prone and is dangerous to use. I ...