Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Passed from MultiPart Form or from Hyperlink?

Posted on 2004-08-13
1
Medium Priority
?
226 Views
Last Modified: 2010-04-01
I have a page that can be opened either by the submission of an "enctype=multipart/form-data" form or by the click of a hyperlink.
When I get to the page from the form, I want to use the oReilly MultipartRequest, but when I get to the page through the hyperlink, then there has been no form submission, and I need to NOT use the oReilly MultipartRequest.

So how can I know at the top of the page if I am getting there through a form submission or a hyperlink?
Is there a variable that I can read in that will tell me if there was a form submitted?

Thanks in advance,
0
Comment
Question by:mderbin
[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
1 Comment
 
LVL 3

Accepted Solution

by:
alskdj80 earned 1000 total points
ID: 11795916
you can do this by putting a hidden field in your form, eg:
...
<form name="myform" action="wherever" method="post">
<input type="hidden" value="Form" name="Form">

//other form things

<input type="Submit" value="submit" name="submit">
</form>
...


then, in your next page, you can check if there is a parameter called "Form":
...
String isForm = request.getParameter("Form");
if ( isForm.equals("") ) {
    //not a form
} else {
    //is a form
}
...

hope this helps
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 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