Click to See Complete Forum and Search --> : Form placement to re-submit new data to same page


Poppy2
10-05-2006, 05:11 AM
Good day All

I have written a little page that allows users to vote in a poll. I have two buttons on the page "Submit" and "View".

At the moment when the user clicks on "Submit", their selection is saved to a text file. When the "View" button is clicked the data from the text file is displayed below the Opinion Poll.

I would like for the results to be displayed when the user clicks either "Submit" or "View". I know that it all depends on the placement of my Form event.

If I'm not making sense perhaps this might help:

Opinion Poll
Do you luv the ASP Free Forum?

Yes (radio button with label yes)
No (radio button with label no)
Maybe (radio button with label maybe)
Not Sure (radio button with label NSure)

Submit View (submit buttons)

Poll Result
Yes ---------- 67% [10]
No - 7% [1]
Maybe --- 20% [3]
Not Sure - 7% [1]



Currently data displays only when "View" is clicked, I want the Poll Results to display in place of the Opinion Poll when Submit or View is clicked.

Hope you can help me.

Kind Regards

jvanamali
10-05-2006, 11:53 AM
Try to call the code writen in View button once you have submitted sucessfully

Presently you might have writen code only to send data to text file, after completion of that just write code just retrieve that and display

if don't want the earlier radio buttons to be displayed when the you are results then send a variable in querytring say "pagetype=view"

When displaying data display either radio buttons of view details according to that query string

For Example :

<%IF request.Querystring("pagetype")<>"view" then%>
<p>Radiobutton1</p>
<p>radiobutton2</p>
..
<%Else%>
Show view details here
<%Endif%>

Poppy2
10-06-2006, 07:07 AM
Thanks for all your help jvanamali.

Kind Regards