Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI feedback form 3

Status
Not open for further replies.

cian

Technical User
Oct 11, 2001
1,383
Hi guys,

I want to include a small feedback form with SSI. It's no problem including the form but I also need it to re-direct (or display the thank you message) in the same spot, NOT the full page.

Do you think I need a custom script? Or is there a better way to include a form and get it to redirect in the same box?
I presume it would be easy enough with an iframe, but i'd prefer not to if possible?

Any advice appreciated!! Thanks!!


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
Hi Nick,

nice suggestion, problem is this feedback form will be on all my pages (30) so I would need a corresponding thank you page for each! It would be fine for 1 page, but not in case.
I could re-direct all to a single page but it sort of defeats the purpose of what i'm trying to do.

Thx for the suggestion though, i didn't think of that!


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
Ok, maybe this could be the solution:

pass the form to the same page that it is on, with a variable in the command line telling it that the form has been processed i.e.

<form action=&quot;thispage.asp?mode=processform&quot;>

Then, have either an if statement or a select statement within each page that checks the url for the mode variable. Depending on whether it exists either show the form or the thankyou message within the same page. i.e.

If Request.QueryString(&quot;mode&quot;) = &quot;processform&quot; Then
%> Thankyou for submitting the form <%
Else
%> <form blah blah.....

....</form>
<% End If

Hope you can follow this! Nick (Web Developer)


nick@retrographics.co.uk
 
Hi mate,

I am not totally sure exactly what you are trying to do here so if this is incorrect, then let me know and I will try to help more.

<!--#set var=&quot;formsub&quot; value=&quot;$QUERY_STRING&quot; -->

<!--#if expr=&quot;$formsub = /processed/&quot; -->
Processed form output here.
<!--#else -->
Original Form Contents Here.
<!--#endif -->

Then to show the form output, you need to call that same page with page.shtml?processed

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Nick, Thanks for that. It's a little bit over my head, i'm not sure how to work with that, but i'll look into it further.

Wullie, thanks mate. i'm not sure how i'll work that either but i'll try it and see if I can make it work!

Thx guys, I appreciate the help!!


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
Hi mate,

Can you elaborate a bit on what you are actually wanting and we will be able to help more?

After reading your post again, it seems like you are wanting to show this response without reloading the whole page again, if so then SSI will not work on it's own as it needs to send another request to the server so that it can update.

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Hi mate,

Yeah you got it!

Just something I wanted to try out. The user must be able to submit the form and the form must then reload in that position without the whole page reloading.
I have seen this a hundred times with voting scripts etc. I presume a custom script would do this (and then just call it with SSI) but I haven't been able to find a script like this.

Any ideas?


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
Hi mate,

You would need some kind of frame to accomplish this.

Because SSI is server side, it needs to send another request to the server, so unless you use frames then the full page will always reload.

Personally, I think this would end up as a lot more work than redirecting to a form and then showing the SSI includes above afterwards.

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
You will be able to do what you need with asp and using a response.form variable. all you have to do is have an if statement that includes the thank you text that will only show if the response.form <> &quot;&quot; .Have the forms action field call the same page it is on. I've done this numerous times and if you want to see some of my code for such an operation check this page. As you will see it's the same page calling itself but there's different text on it after the form is submitted. I'm sure you could do the same thing with Javascript using a cookie. Hope I'm understanding what you want to do and this helps.

 
glenmac,

Cian wants to only reload part of the page, not the whole thing.

The SSI code that I provided above will do the actual server side part but there would also need to be some sort of a frame so that only part of the page updates.

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Hmm well I'm sorry then guess I was under the impreesion he just wanted to show a thankyou text after the form was sumitted. Well I tried. I apologize for my ignorance.
 
Hi glenmac,

Thanks for your efforts! Much appreciated!

And thx again Wullie, i'll go with the frame idea and see how it works out! Might be the simplest option!


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top