Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Custom Form Handler parm

Posted on 2003-03-10
13
Medium Priority
?
199 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

580 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