?
Solved

Verify input

Posted on 2002-06-03
8
Medium Priority
?
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

764 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