0

I want to create a user feedback form something like this:

When a user clicks on a link like:

Send Feedback

The box size 200 X 200 would open right under it where users can provide feedback and in that box when one clicks submit the same box displays like

"The feedback has been submitted"

And then they can click on a button "Close" to close that box. I dont want to open another page for the feedback. Can someone guide me in right direction on how to do this please.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by samarudge
0

This isn't such a crazy idea, its done all the time as a matter of fact.
I presume your familiar with javascript,
create a function that runs on the click of a link e.g.

<a href="#" onclick="form();">Contact</a>
<br/>
<span id="Contact">&nbsp</span>
function form() {
     return false;
     action = 'process.php'; //Where the form should go
     form = '<form action="'+action+'" method="post"><textarea style="width: 200px; height: 200px;">Hi</textarea><input type='submit' value="Send" /></form>';
}
     document.getElementById('Contact').innerHTML = form;
     
}

Now you would just need some AJAX to send the data and a similar function to change the contact span to whatever message you want
Regards,
Sam Rudge

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.