Skip to main content

Posts

Showing posts from March, 2013

Google Conversion Tracking Using Contact Form 7 Without Redirection

I was searched for the problem at least a day and found nothing that works Cool. All the solutions to set a Google Conversion Tracking for wordpress suggest to redirect the user to a "thank-you.html" page , and to put there the actual Javascript code for Google Coversion Tracking. Some suggested to use an iFrame while displaying "Successful Form submission", and this sparked the idea to set the actual Google Conversion Tracking Javascript code to the field where we set Thanks-giving message. Here is my Google Conversion tracking code Script that I have to fire after successful submission of contact-form-7.  I just append this code to the input box where we use Successful Form Submission message. i.e. (Thanks. We will contact you soon. < Google Conversion tracking code Here >)    As the response msg generated through contact form 7, it also runs the google script containing code for Adsense. This is working cool for me. Share your valuable comments

How to switch between two CSS files on a page

The basic idea for changing applied CSS is to tells the browser which one is to be used. For the purpose we have to do 3 things : 1. Use 2 CSS files in our page as given below (with title tag, we will later recognize these files through title): 2. Change the applied CSS file so theme can be changed. we can set two buttons somewhere on page so we can switch theme when we click on any of them. Light Dark 2. Tells browser to memorize , what is our current CSS , so it would render the right one for the user. For this we are using javascript and doing 3 things here : to set Cookie and a function to switch the current CSS applied to other one, and a method to read cookie to get current CSS applied during page loads function setActiveStyleSheet(title) { var i, a, main; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute(&

How to change background color of selected text

I was willing to see how some of websites have beautiful colors when we select text on the pages. Just searching for the trick and got that its a simple CSS property to override default behaviour of browsers. You have to just apply background color and its done, more over if you want to change the text color also you can apply color in CSS. This simple CSS class will do it all for you. ::-moz-selection{ background:#66b0e6; } ::selection{ background:#66b0e6; } Fiddle : (select the text below)