Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Verify input

Posted on 2002-06-03
8
Medium Priority
?
152 Views
Last Modified: 2010-04-09
I have a cgi enabled webpage that allows a user to enter data into a database. I would like to add the following ability:

When a user hits submit it echos back the input data and asks the user something like " You entered xxxx, is this correct" . A yes would submit teh data, a no would bang back to the previous page.
Thoughts
0
Comment
Question by:MatthewF
  • 3
  • 3
  • 2
8 Comments
 
LVL 18

Expert Comment

by:bruno
ID: 7051784
you want this in something like a javascript popup, or just on it's own page?


page1 submits to page2 submits to page3.


page1 has the form.  page2 grabs the info from the form, and shows whatever message you would like shown....if the user clicks "accept" page2 already has all the form values from page1 in hidden fields, and submits the form values to page3.  page3 does your processing.  

if on page2 the user clicks "no" then page1 is reloaded, either with or without the values from the form being populated back into the fields.



OR


if the data is a lot smaller (1 field??) then i think you can throw it into a javascript popup with "OK" and "CANCEL" buttons that will fire onsubmit of the form on page1.  if the user clicks ok, they are then brought to page3 which does the processing.  no more need for page2.


BRUNO
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7051787
<FORM name='myform' action='whatever.cgi' method='post'
   onSubmit='return(confirm("You entered: " + this.myInput.value + ", is this correct?"));'>

  <INPUT name='myInput' value=''>

</form>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7051790
Sorry Bruno, we were typing at the same time ...
also, I left out the submit button in the form:

<INPUT type='submit'>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:bruno
ID: 7051850
knight,

no worries, as i was just posting thoughts not actual code...


:-)
0
 
LVL 12

Accepted Solution

by:
lexxwern earned 300 total points
ID: 7053138
well that can be done in perl itself, /

let confirm.cgi be the file the input comes too,

this file can just show the entered data, and have another form like this ..

print qq(

..show actual data..



<form method="post" action="actual.cgi">
<input type="hidden" name="myname" value="$perlvar"/>
...so so...
...so so...
...so so...
<input type="submit" value="Confirm"/>

);


this would be more reliable as compared to non javascript browsers, and be better for you as you can avoid not learning a new thing...now is this good or bad ? ;)
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7053547
grade B ?
0
 
LVL 18

Expert Comment

by:bruno
ID: 7053648
an no feedback to anyone....
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7056992
update: Ct changed graade on request.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question