Tagged with " script"
Jan 17, 2009 - JavaScript, PHP    5 Comments

JavaScript: Div & Element hide & show cross-browser script solution

Hello Guys,

Today I was working in a project where I had to add element hide and show depending on the condition. For example, if the client wants to contact by phone, the phone DIV element or area appears. If not, the phone DIV element hide quickly. I was writing scripts for this. But to my surprise, I noticed that none of them are cross-browser supporting. When one scripting working in few browsers, the same script is not working in other browsers. So, I struggled to come up with the cross-browser solution and at last, I succeeded. You can use this code in your form whenever you need to show and hide elements dynamically in JavaScript. This script is a kind of Contact Us form.

So, what am I gonna do? I am going to share my small script so that you can save your time I you find my this article by Google search or any other search.

OK!
No more introduction. Let us start.

Download:

I suggest you first download the script and take a look.
http://www.tanzilo.com/demo/code/hide_show/hide_show.zip

Features:

  1. It is a totally CSS-based and table-less scripting
  2. I have used phpMailer version 2.3 and it works for PHP 5 and/or 6 version
  3. JavaScript used as you already know

CSS Code:

HTML Code:

JavaScript Code:

PHP Code:

Once again I would like to remind you that you first download this small script from the above download link and take a look at the whole script.

That is all for now, Dude!

Thank you for reading.

Mar 29, 2008 - PHP    13 Comments

PHP script to print all the GET & POST variables

Variables are one of the core powers of programming. As PHP programmers, we oftern may find that a $_GET or $_POST variable is not performing properly or the way we expected. This may occur for several reasons such as we made a mistake in the variable name. Sometimes this kind of problem take so much time that lots of time is wasted to correct a single variable!

So, you can use the scripts I have written below and use in your code whenever you suspect that there may be a problem with the variables. These scripts helps you by showing the details of each and every $_GET and $_POST variables in the script.

This is very easy and actually 3 (three) lines of code required.

Below is the code to print all $_GET variables:

Click here to see the demo here.

To print all the $_POST variables, we need to change only one line:

OK.
You can do it in another way too. It is simple also.

Or,

So, print your $_GET and $_POST variables whenever you think required.