Creating a link to another page using a form

M

Matt_librarian

Is it possible to create a form function that adds the user-entered data on
the end of a pre-determined url? (Then, when the submit button is clicked it
will go to the url of the address ending with the user-entered data.)
 
R

Ronx

Change the form method to GET, example:
<form method="get" action="mypage.asp">
.....
</form>
This can be done in Code view or Form Properties.
The total length of the URL produced must be less than 2048
characters, including page address, form field names, data, and field
and data separators. Using POST as the method the limit to the length
of the form (if any) is imposed by the form handler.
 
M

Matt_librarian

Thanks for the hints, but when I use that method, I am just getting the URL
in the action without the word typed into the text box by the user. the url I
am using is http://www.linccweb.org/catalog?lib_code=flcc1000&index=K&query=
and the word(s) the enduser places in the textbox should be added to the url
after the = sign at the end. The result would be a page that loads and
includes the text in the url. Can I do this with a FP form, or do I need to
resort to Java? Thanks in advance.
Matt
 
R

Ronx

To generate that URL from a FrontPage form you will need some hidden
fields:

<form method="get" action="catalog">
<input type="hidden" value="flcc1000" name="lib_code">
<input type="hidden" value="K" name="index">
<input type="text" name="query" width="20">
<input type="submit" value="Submit">
</form>

When this is filled in and submitted, the URL generated will be
http://www.linccweb.org/catalog?lib_code=flcc1000&index=K&query=whatever+is+typed+into+the+text+box

Note that spaces are converted to + or possibly %20 - a correctly
written form handler will reconvert to spaces.
An example of a form similar to this is at the top of the page at
www.rxs-enterprises.org

Do not use Java - many Windows XP installations do not have Java.
JavaScript may be used to change the values in the hidden fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top