pratik8613 Posted December 20, 2012 Share Posted December 20, 2012 Hello Friends, I want to design a registration form for online test which appears on the online test page link.This form should appear in form of a pop up by shadowing background test page contents with grey colour. When user submits the data, this pop up form should validate the data and send the data to database and then the background test page content should be available for the user. If user cancels the form pop up then background page should show an error.(ie the test page link should be available to those who register themselves through form). Thank you. Link to comment Share on other sites More sharing options...
thescientist Posted December 20, 2012 Share Posted December 20, 2012 sounds good. have fun with your project, I guess? Link to comment Share on other sites More sharing options...
ReGA Posted December 20, 2012 Share Posted December 20, 2012 Hey, I googled a little and found this (I didn't make this):http://jsbin.com/owawuq/2/edit Try to change some styles, and you'll be able to get your wanted gray background. Link to comment Share on other sites More sharing options...
pratik8613 Posted December 21, 2012 Author Share Posted December 21, 2012 Hey, I googled a little and found this (I didn't make this):http://jsbin.com/owawuq/2/edit Try to change some styles, and you'll be able to get your wanted gray background. The given link is helpful but I want that form should appear as soon as the page loads. On your link I have to click on "CLICK HERE" to get the form. Link to comment Share on other sites More sharing options...
pratik8613 Posted December 21, 2012 Author Share Posted December 21, 2012 I found something that this type of form requires overlay() function. Link to comment Share on other sites More sharing options...
ReGA Posted December 21, 2012 Share Posted December 21, 2012 On your link I have to click on "CLICK HERE" to get the form. Just use the onload event for the body element to show the box.Then it won't be called when clicking the text "CLICK HERE", but it will be called when the page loads. Link to comment Share on other sites More sharing options...
pratik8613 Posted December 22, 2012 Author Share Posted December 22, 2012 Finally I have created the form. But I have got a new problem. After submitting the form, the user redirects to the "contact.asp" page which is the action of the form.On contact.asp page, I have code for sending the form data to server. But I want user to remain on the same page which contains the form even after executing form action="contact.asp". i.e. when user clicks on submit button, the form should send the data to server and the content of the page should be available to the user. Link to comment Share on other sites More sharing options...
thescientist Posted December 22, 2012 Share Posted December 22, 2012 with some simple if logic, you should be able to make contact.asp the same page as the form. so the form submits to itself, which is contact.asp, have an if statement to check if the form was submitted, process the form submittion. but outside the if statement, you can always have contact.asp output the form. Link to comment Share on other sites More sharing options...
pratik8613 Posted December 22, 2012 Author Share Posted December 22, 2012 with some simple if logic, you should be able to make contact.asp the same page as the form. so the form submits to itself, which is contact.asp, have an if statement to check if the form was submitted, process the form submittion. but outside the if statement, you can always have contact.asp output the form. Can you provide me the code or any example? Link to comment Share on other sites More sharing options...
thescientist Posted December 25, 2012 Share Posted December 25, 2012 (edited) well, I'm not sure how it goes for ASP, but in PHP, when a user submits a form, you can test for the values in $_POST or $_GET depending on the method dictated in the forms action property. If a submit button is present, you can test for it ahead of time. i.e.*contact.php* <?phpif(isset($_POST['submit'])){ //form processing here};?><form action="contact.php" method="post">// form stuff in here<input type="submit" name="submit" value="submit"/></form> there's lots of implementations depending on how you want to do the form processing and form handling, and this example is just off the cuff. Edited December 25, 2012 by thescientist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now