Custom Form Handler parm

I have a drop-down form box.
I have checked "Send to other" in the Forms Properties.
In the action field, I do not want to enter a literal (specific page file).
I want to enter the field from the drop-down box.
The values in the drop-down box contain filenames so when one is selected, I want the action to act on the value of the field rather than the literal. Since the value of the field will be a filename, it will run that file.

When I use the POST method, it places the literal expression in the URL and therefore does not find the page.
When I use the GET method, I can see the value of the selection but a bunch of other stuff is concatenated with it.

I looked at the HTML of this. It seems like I should be able to use some other syntax around the name of the variable for the form selection so it uses its value for the ACTION rather than the literal.

Does anyone know that particular syntax or a way to solve this?

Thanks in advance for all the help
mpulse24Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hhammashCommented:
Hi,

The Form Action comes before the form submit.  So,  the best solution is to create a redirect page.

Now on your form you have a dropdown box named MyFile.  OK.

1- Right Click the form
2- Properties
3- Send to Other
4- In the action put DirectingPage.asp

Save the form again

Now,  create a new page, click save and save it with the name DirectingPage.asp.

Open the page in HTML view and there erase everything from the page and make it blank, then, put this code.

<%
Dim varLocation
varLocation=Request.form("MySite")
response.redirect varLocation
%>

Save the page

Now when you submit the form it will go to the page and it will read the file name then take you  to the page.  Note that you will feel nothing and this DirectingPage.asp does not appear at all.

Best regards
hhammash
0
hhammashCommented:
Hi,

NOTE:
-----

In the Drop Down Box:
Put the option as descriptive name and in the value put the full path.

Regars
hhammash
0
mpulse24Author Commented:
Hi -
I assumed "MySite" in the HTML was the name of the drop-down box in the first page.

Upon submit, the Directingpage.asp comes up and displays the following:

<%
Dim varLocation
varLocation=Request.form("MySite")
response.redirect varLocation
%>

Is there a setting I need to choose to get the value of MySite to be entered?

(I have placed actual filenames in the values under the choices of MySite.)
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

hhammashCommented:
Hi,

The code is right,  but you have to save this page as ASP. Go to file Save as DirectingPage.asp.

Best regards
hhammash
0
mpulse24Author Commented:
Hi - I saved it as Directingpage.asp

?
0
hhammashCommented:
Hi,

Are you posting your form to DirectingPage.asp?

hhammash
0
hhammashCommented:
Hi,

Are you sure that your IIS is running?

To make sure:

1- Open Internet Explorer
2- In the Address bar Type:
http://localhost/iishelp
Then Press go. You should be taken to:
http://localhost/iishelp

If you see a page title IIS documentation that means your IIS is running,  if you see a white page (page can not be displayed) that means your IIS is not running and the page will show the code instead of the result of the code.
 
Let me know please
hhammash
0
mpulse24Author Commented:
Hi -
My site is with a hosting service.
I have other ASP pages on my site that are functioning properly so my guess is that all is in working order.

I am not sure how to enter the address you mention to test it. I tried it from the root of my domain and it says the page cannot be found. But could it be that the host has blocked iishelp and other things that are not essential to IIS operating properly?

Thanks-
0
hhammashCommented:
Hi,

Are you testing my code on your PC locally or Live on your Website.

If you are trying it locally and it can not display it that means IIS is not working on your PC.

Try this:
1- Press Start/Programs/Accessories/NotePage
2- Notepad will open a new window
3- In NotePad select File/Save
4- Give the document a name Test.asp
5- Save it on your desktop

Go to your desktop and look at the Icon that is created.  Is it an ASP icon or a white icon with Microsoft Logo. If white page that means your PC does not have IIS running locally.

Take my code and try it on your Website on the Internet Live.  It will work.

The code is 100% correct.

Please try and let me know
hhammash
0
mpulse24Author Commented:
I have been trying the code on the internet live.
You can try it:
go to www.palmhaven.info/mapsterqq.htm

Click submit for 1913 - it has a file associated with the value.
You will get the directingpage.asp that displays the code.

0
hhammashCommented:
Ok,

Go back to your page and earse the whole code.  Then go to my code in the post above,  then copy it.  Open NotePad and paste it in NotePad then copy it again from notepad and post it in your DirectingPage.asp.

The matter is that you copied the code from my post here to your ASP page directly.

Regards
hhammash
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mpulse24Author Commented:
You are the king!
Many thanks - this was a key item for me to proceed on the site.

A bonus would be to have the page being retrieved pulled up in a frame coexisting on the same page with a frame containing the form.

So visually, the form and various information are seen at the top of the page in a frame. The user selects things in that frame and the retrieved pages show up in the frame below.

I am guessing this is simply a matter of placing your page & associated code in the frame holder, right?

Thanks again!
0
hhammashCommented:
Hi,

Thank you,  you are welcome any time.

Quote:
A bonus would be to have the page .....

Yes that can be arranged with no problem.

Regards
hhammash
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.