..


Sponsored Links

A floating button for feedback

Article written by Horace Maico
Page 1 of 2

Know the opinion of visitors to our site is a very important thing. He is an amateur site and even more in the sites of a commercial nature, because only by knowing the thoughts of our users we can really improve our service.

It is not uncommon, therefore, be found within the websites that carry links to contact pages where users are invited to leave the proportional feedback.
The limit of a simple link in this circumstance is rather obvious: very often these types of links can be found in the footer of the page and has poor visibility. The way to fix is ​​quite simple: we try to make it clear how to send feedback.

An effective and minimally intrusive would be to show a floating button, a button that remains intact regardless of the page scroll. In our case, put the button "pasting" to the top of the page.
To make it even nicer, when you click on our button will dynamically appear in the feedback window with a nice slide effect (from top to bottom).

We see a screenshot of the button before and after the click:

To do this we need a scripting language to send feedback (in my case I used PHP ), a few lines of CSS to style elements on the page and a bit 'of JavaScript (jQuery will use the library) to create special effects.

To begin with we open our editor and create a new PHP page. First we write the code for sending the feddback to our inbox:

 



 <? Php







 $ Result = "";







 if (isset ($ _POST ['feedbackSubmit']) and $ _POST ['feedbackSubmit']===' submit') {



  



 $ To = "webmaster <info@dominio.it>";



  



 $ From = $ _POST ['email'];



  



 $ Subject = "Feedback from website Dominio.it";



  



 $ Body = stripslashes ($ _POST ['msg']);



  



 $ Headers = "From: User Internet <". $ From .">";



  



 if (mail ($ to, $ subject, $ message, $ headers)) {



    



 $ Result = "Sorry but there was a problem sending the feedback."



  



 Else {}



    



 $ Result = "Feedback sent successfully!";



  



 }







 }







 ?>

 
As you can see we have verified that the form has been processed, if so we valorizzatole variables for sending email and using the native email, we have carried out the feedback is giving video confirmation.

In the same category ...
E-Learning
CSS (Course) CSS (Course)
Web Design and Accessibility according to W3C CSS and XHTML. Starting from 29 €.
Web Design (Course) Web Design (Course)
Design Web Sites with HTML, CSS and Dynamic HTML. From 39 €.
Webmaster Advanced (Course) Webmaster Advanced (Course)
Become a professional Webmaster. From 39 €.
Sponsored Links