Jump to content

Recommended Posts

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 post
Share on other sites
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 post
Share on other sites

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 post
Share on other sites

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 post
Share on other sites
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 post
Share on other sites

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 by thescientist
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...