?
Solved

Custom Form Handler parm

Posted on 2003-03-10
13
Medium Priority
?
198 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:mpulse24
[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
  • 8
  • 5
13 Comments
 
LVL 14

Expert Comment

by:hhammash
ID: 8112112
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
 
LVL 14

Expert Comment

by:hhammash
ID: 8112122
Hi,

NOTE:
-----

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

Regars
hhammash
0
 

Author Comment

by:mpulse24
ID: 8113469
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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 14

Expert Comment

by:hhammash
ID: 8113633
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
 

Author Comment

by:mpulse24
ID: 8114133
Hi - I saved it as Directingpage.asp

?
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8114158
Hi,

Are you posting your form to DirectingPage.asp?

hhammash
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8114182
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
 

Author Comment

by:mpulse24
ID: 8114236
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
 
LVL 14

Expert Comment

by:hhammash
ID: 8114302
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
 

Author Comment

by:mpulse24
ID: 8114393
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
 
LVL 14

Accepted Solution

by:
hhammash earned 400 total points
ID: 8114437
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
 

Author Comment

by:mpulse24
ID: 8114516
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
 
LVL 14

Expert Comment

by:hhammash
ID: 8114601
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
Suggested Courses

771 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