Confirmation fields on a results page? (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


pmagas -> Confirmation fields on a results page? (10/3/2003 22:43:05)

I'm using DRW (thank you, Spooky - your tutorials have helped immensely!!) and I have the results on a page separate from the search. I'd like to be able to show at the top of the results page what their search criteria was. I tried using confirmation fields, but that didn't work. [:(]

The search page is at Search1

The form properties on this page are "Send to Other: Custom ISAPI.... ASP Script" and under Options, it has "Action: results1.asp" and "Method; POST"

Thanks for any suggestions you might offer. I appreciate all your help!




Long Island Lune -> RE: Confirmation fields on a results page? (10/3/2003 23:45:53)

What is the name of the search variable that you are passing to the result page?




pmagas -> RE: Confirmation fields on a results page? (10/3/2003 23:56:28)

I have several. They are as follows (please pardon the lack of originality.)

From
To
Bathrooms
Bedrooms
Area

Thanks for your help.... Would it be easier to keep the results on the same page as the search? The reason I moved it off is because when the page refreshed with the results, it left the default values in the search forms and I felt it was confusing. Is there an easy way to keep the search values in the search form? (Boy, I hope this makes sense!! [&o])

Thanks much!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 0:06:55)

Well, a little tricky understanding...

What I meant in my question was...

1): You have a page that lets the user type-in their search criteria?

2): Then you pass their search criteria to a page that contains your DRW that goes into your database and looks up values that match the search criteria?

Am I correct, or off base?

Have a link that we can look at?

If I am correct, then you passed the search criteria to the second page in a variable. The variable being the name of the text box where they typed in their search criteria. No matter what they typed into the text box, it will be passed as a variable using the name of your text box. What is that name?

In your post it looks like your showing me the values of the search, not the variable name of that text box.

In any event, YES it would be easier to keep the results on the same page as the search.
If I understand what your talknig about.

That's why you should post a link to these pages. [;)]




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 0:26:27)

Hmmm.... yes, it's all rather tricky and it's complicated by the fact I'm tired. sorry...

Yes, the visitor enters the search criteria here - http://www.wesellstlouis.com/test/search3.asp (newer page than the one I gave you before.) It might help if I told you they're searching for homes for sale. [8D] (oops - forgot that before.) Most are pull-down choices; the only ones not pull-down are the price range amounts - 'From' and 'To' (yep - those are my variable names.) Believe it or not the variable names are those in my earlier post:
From (number)
To (number)
Bathrooms (pull-down)
Bedrooms (pull-down)
Area (pull-down)

[;)] They're not very original variable names but sometimes I'm a simple person. [sm=lol.gif]

The results should come up in http://www.wesellstlouis.com/test/results3.asp when you submit. (If you want to use the default values, it should give you some results so you can see what's there so far.)

Is there a simple way to get the values that the visitor enters to stay in the search box when it brings up the results? When I had them on one page (originally), after pressing submit, my results came up OK but the search box reverted to the default values and I thought it would confuse my visitors. (Many of our visitors aren't very 'techie' yet.)

Thanks for your help!!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 0:45:43)

I went into your results page and found the code.
I added some asp lines to your existing lines.
Here it is...
Find this area of your page and replace the existing code with this:


<tr>
<td width="562"><!--mstheme--><font face="Verdana, Arial, Helvetica">
<p style="line-height: 100%; margin: 0">From: <%=Request.Form ("From")%> To: <%=Request.Form ("To")%>
</p>
<p style="line-height: 100%; margin: 0">
Bedroom: <%=Request.Form ("Bedrooms")%></p>
<p style="line-height: 100%; margin: 0">
Bathrooms: <%=Request.Form ("Bathrooms")%></p>
<p style="line-height: 100%; margin: 0">Area(s): <%=Request.Form ("Areas")%>
 <!--mstheme--></font></td>
</tr>




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 0:51:46)

quote:

Is there a simple way to get the values that the visitor enters to stay in the search box when it brings up the results? When I had them on one page (originally), after pressing submit, my results came up OK but the search box reverted to the default values and I thought it would confuse my visitors. (Many of our visitors aren't very 'techie' yet.)


Do you mean once a search has completed and your ON the RESULTS page, and you want to go back to the SEARCH page?




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 0:55:53)

quote:

Find this area of your page and replace the existing code with this:


If you can't find this code, you'll have to email me the entire page.




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 15:55:12)

Great Gorilla God, I bow down to you. [sm=kiss.gif]

Thank you! Thank you! Thank you! It's wonderful!!! Now all I have to do is make some things on the page 'pretty' and then set up all my pages. I've been working on this off and on for months now but have just not taken adequate time to sit down all at once and work it out until now.

With your help, I'm just about there! I think I'll have this conquered by the end of the weekend.

I can't begin to thank you sufficiently!! I know - I could send you muffins!! [8D] hmmm... they might not do so well in the mail. [&:] Well, consider yourself hugged and kissed. [sm=kiss.gif] Thank you ever so much!

Cheers!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 17:28:55)

pmagas,

I'm glad everything worked out.
You are very welcome. [:)]

Cyber-muffens might be better. They never go stale. [;)]
I never turn down hugges and kisses - thanks. [;)]

If you need anymore help just continue this thread with another post.
Cheers. [:)]




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 18:34:04)

Hi again. I'm afraid I have a new problem. I can't get a form to work on the bottom of the results page - http://www.wesellstlouis.com/test/results3.asp

Is it a problem to have a FrontPage form on an .asp page? If so, then I'll have to come up with an alternative. In case that's not the problem, the code for the form is as follows:

quote:

<td width="562" bordercolorlight="#90B09C" bordercolor="#90B09C" bordercolordark="#90B09C"><form method="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<!--webbot bot="SaveResults" startspan
U-File="_private/homedetails.txt" S-Format="TEXT/CSV"
S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
S-Email-Format="TEXT/PRE"
S-Email-Address="penny@wesellstlouis.com"
B-Email-Label-Fields="TRUE"
B-Email-ReplyTo-From-Field="TRUE"
S-Email-ReplyTo="email"
B-Email-Subject-From-Field="FALSE"
S-Email-Subject="Homeowner Search Request"
S-Date-Format="%m/%d/%Y" S-Time-Format="%H:%M"
S-Builtin-Fields="REMOTE_NAME REMOTE_USER HTTP_USER_AGENT Date Time"
S-Form-Fields="ML1 ML2 ML3 email phone " --><strong>[FrontPage Save Results Component]</strong><!--webbot
bot="SaveResults" endspan -->
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300">Want
more details? Fill out this simple form:</font></p>
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300"><!--webbot
bot="Validation" S-Data-Type="Integer"
S-Number-Separators="x" B-Value-Required="TRUE"
I-Minimum-Length="6" I-Maximum-Length="6" --><input type="text" name="ML1" size="6" maxlength="6">
Listing
Number</font></p>
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300"><!--webbot
bot="Validation" S-Data-Type="Integer"
S-Number-Separators="x" B-Value-Required="TRUE"
I-Minimum-Length="6" I-Maximum-Length="6" --><input type="text" name="ML2" size="6" maxlength="6">
Listing
Number</font></p>
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300"><!--webbot
bot="Validation" S-Data-Type="Integer"
S-Number-Separators="x" B-Value-Required="TRUE"
I-Minimum-Length="6" I-Maximum-Length="6" --><input type="text" name="ML3" size="6" maxlength="6">
Listing
Number</font></p>
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300"><!--webbot
bot="Validation" B-Value-Required="TRUE"
I-Minimum-Length="7" --><input type="text" name="email" size="20">
Your
email address</font></p>
<p style="line-height: 100%; margin: 0"><font size="2" color="#333300"><!--webbot
bot="Validation" B-Value-Required="TRUE"
I-Minimum-Length="7" --><input type="text" name="phone" size="20">
Phone
number</font></p>
<p><font size="2" color="#333300"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></font></p>
</form>


I've used forms a lot using FrontPage (and love the feature.) But does the asp extension make them unworkable? Thanks for your help!!

Hope you're having a great day.... Cheers!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 18:51:35)

Uh Ohhhh. A new problem???

This is the error I see:

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '([Listing Price] >= AND [Listing Price] <= AND Bathrooms >= AND Bedrooms >= AND [Area Desc] = '' AND [Property Type] = 'RESI')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers


You CAN use a FP form on an ASP page.
No problem.
The problem is one of your values is missing...

This does not look like the same page I saw in the last problem.

Are you:
Page 1 - Excepting user SEARCH Input
Page 2 - Displaying the Results
Page 3 - Bringing them to another page after the results page.

If you are, you have to carry the values contained in your search fields to the third page.

OR..............

Is this the RESULT page we were working on last time?

Just clarify first. I work on many problems... Sometimes it hard to remember what's what.




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 19:05:26)

I think the error you received is that I sent you straight to the results page instead of having you go to the search page first. If you go here - http://www.wesellstlouis.com/test/search3.asp - and hit submit (you can just use the default values) then it will go OK to the results page.

This is the same one we were working on early, but I've changed just a few things along the way.

I feel rather silly about the forms problem - I thought I could do those in my sleep. [&o] Apparently not.

Cheers!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 19:10:42)

pmagas,

Gotchya...


Okay, what do you want this form to do?

1): Save the contents in a file.
2): Jump the user to another page.

What is the problem?

1): Will not save?
2): Error on SUBMITT and will not jump to another page.
3): Values typed in are not being carried to the next page?




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 19:17:33)

I want it to:

email contents to me
save the contents to a file (backup in case there's a problem with the email)

In other forms I've created, it automatically goes to another page - I honestly don't care. I'd rather they stay on this page, but no big deal.

It's not giving me any errors, but it's not sending the email to me. :( It's not saving it to the file either, so apparently there's a disconnect somewhere. (I've posted to it a few times to test it.) However, it has created the file.... hmmmm... ???

Thanks!!

PS - this most recent test, it still doesn't send email but it does change the page such that I get an error message. I'm thinking I should have it go to a confirmation page - and I can have another search form in that page. That way it doesn't mess up my results page. What do you think??




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 19:35:43)

So you want it to:

1): Be saved in a file.
2): The contents emailed to you.

I'm looking into it now.

What version of FP are you using?




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 19:54:44)

I'm using FrontPage 2000. Thank you!!!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 19:58:06)

So am I.

One more question:
Have you ever saved files from a form on your site before? (like your trying to do now)?




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 20:02:18)

Yes - for almost all my forms. I have probably 6-8 forms on the site and for just about all of them, I save them into a file as well as having them emailed to me. I set this one up the same as the others (as far as I know. ) [&o] Some of them I have go to the default confirmation page whereas for others they go to a confirmation page I created. This one I have going to the default.

The only obvious difference I can think of is that this one is in an asp page instead of an htm page. It has me baffled.




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 20:05:32)

Okay. Good. Then your permissions are Okay.

Have to pop-out for dinner. Saturday night. But I will be back-on about 9:00 PM your time. I'll pick it up at that time again. [;)]




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 20:07:53)

I wonder.....

I have this going to a subdirectory because I'm trying to test it there before having it go live. I wonder if I need to put it in the root. I think I'll try that and see if it works there. I can just move these two pages over easily enough.

I'll let you know what happens when I do that.




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 20:11:14)

Okay.

That might help. Try the root.

And remember:
Permissions must be set for every directory that you want to write too. Many times sub's are not included even if you permit writing to the root.




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 22:30:46)

I've put both of those pages in the root - http://www.wesellstlouis.com/search3.asp and http://www.wesellstlouis.com/results3.asp (they're very ugly - I don't have any of the images loaded.)

The search works OK still, but no luck on the form. [:(]

Maybe I should try something other than a form... ????

I want a way for visitors who are searching to let us know which houses they like. Currently I have them using frames and the bottom frame has a form. But (among other things) I'm trying to get away from using frames.

Could I have them click somewhere for a pop-up window? Then they could fill out the pop-up with the information? If I have them click for it, will the pop-up blockers mess it up? (I don't want to have it automatically pop up 1) because it will annoy, and 2) the pop-up blockers will pose a problem.) What do you think?

How do you create a 'little' window for a pop-up like this? I know how to code it so that a link opens in another window, but how do I tell it to be 'small'?

Thanks for all your help with this. You know, if you get tired of helping me, I would certainly understand! [:)] I don't mean to monopolize your time. Maybe I should move this one to the Beginner's Forum? [:o]

Cheers!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 22:52:12)

Just got back.

I saw your latest post.
Many things.

1): You don't have to move your pages from their directory. If you want, you could put them right back where they were. It's where you tell the form to write your file too that is important. Most place them in _private. And as long as _private has permissions set to R/W/D, your fine.

2): I never use frames. AAMOF, I try to avoid them.

3): Putting the form in a pop-up window is not a bad idea. It will separate the form mechanics from the DRW mechanics on that page. Is this what you want to do?

You could place a button down near the buttom where it says; "Search Again" and that button could pop-up the window.

quote:


If I have them click for it, will the pop-up blockers mess it up?


Not sure. I guess it depends on if they have a pop-up blocker. If they do and it blocks the window, they will temporaily have to turn it off. At this stage, it's up to the user. If they want to convey additional info to you, they will have to turn it off.

You can have a window popup from a link, or button. Which do you prefer?




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 23:04:41)

Thanks for all your help! I hope you had a nice dinner. We had leftovers - busy day here for us, so it was convenient. [;)] I have my results going to _private and it seems to work - just not on this silly page.

The more I think about it, the more I like the idea of a separate page too. That way they can scroll around in the search results and find the homes they like - update the list on that separate page and just hit the submit button whenever they want.

I'm undecided on text links vs buttons. The buttons I've made in the past tend to look 'tacky' - my daughter's into graphics design so I could get her to make one that looks nice on the page. What are your thoughts - which do you think are most effective?




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 23:09:17)

Yes, nice dinner. We have the leftovers during the week!!!

Probably a button would work better. There more definable on a page than a link. But, the grey isn't the most appealing. You could start with one, and change to a graphic or a link at a later date.

Why don't you put it in a button for now.
I will provide the button for you in my code.

Are you ready for the Pop-Up code?




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 23:24:29)

I'm ready....

will we need to use javascript or is it just html? Thank you SOoooooooo..... very much. Where do I find that recipe for cyber-muffins? [:D]




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 23:26:43)

Javascript. Very simple. I'm sending it now.

P.S.:
I'll have to find a recipe for cyber-muffins. Yummmm!!! [;)]




pmagas -> RE: Confirmation fields on a results page? (10/4/2003 23:33:08)

[sm=icon_redface.gif] Oh dear!! I did a google search for cyber muffins - found some recipes for blueberry muffins, etc. But it said at the top, do you mean "cybermuffins"? I clicked on it and oh, my..... that's not what I meant!! I'm so very embarrassed!

So.... there's blueberry, strawberry, boysenberry (do they make muffins out of that or just pies), cinnamon, lemon poppyseed, of course banana, could even be pumpkin. Have I changed the topic sufficiently yet? [sm=ask.gif]

Thanks for everything!!




Long Island Lune -> RE: Confirmation fields on a results page? (10/4/2003 23:47:02)

Backup the results page first in case you ever change your mind, or there are problems, or until the system is in and working correctly.

--------------------------------------------------------------------------------------------

Cut and copy the following Java code snipit, then paste it at the TOP of the page that you want to launch your pop-up from (result page). Make sure this is pasted before the <html> tag on your page.

The Java Script code:
<script TYPE="text/javascript">
<!--
function popupform(myform, windowname)
{
if (! window.focus)return true;
window.open('MYpopupPAGE.asp', windowname, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no, width=420,height=628');
myform.target=windowname;
return true;
}
//-->
</script>


Notes:
1): Replace the MYPopupPAGE.asp page address (above) with the page you want to appear in the pop-up window. Your making a new page right? Create the page so you have the address, then insert the address of that page in place of MYPopUpPAGE.asp.

2): If you want to alter the size of the window that pops up, change the HEIGHT and WIDTH properties to reflect the size you want your window to be.

3): If you want scrollbars to appear in the pop-up, change the SCROLLBARS=NO to YES. The same goes for RESIZABLE, etc…



The Button:
The button code below can be pasted inside your html page. Make sure you change the “MypopupPAGE.asp” with the page you want to appear in the pop-up window. It should be the SAME as the name of the new page you just created (above).

<form method="POST" action="'MYpopupPAGE.asp'" name="In1" onSubmit="popupform(this, 'join')">
<input type="submit" value="Search Again" name="B1">
</form>


Place the code (above) near the bottom of your page where you have the "Search Again" form.

You can save the page and test it now.
Once it works nice, you can remove the old (non-working) form.

On your new page:
This will be the page that will appear in the pop-up window. Do a new form. I suggest not to cut, copy and paste the old form. There is something wrong with it. This is the only area where you will have to create from scratch again. Do it like you did with all your other forms that work correctly.

This is about all there is too it.

If you decide to later put a graphic in (from your daughter), let me know and I'll give you the code to link a graphic instead.

I will be online for another 30 minutes, then machine goes off.
Post if you can, if not, I'll check tomorrow afternoon to see how things went. [:)] [;)]




Page: [1] 2   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375