Autofill Text Box from Hyperlink

E

Erin

I am creating a survey and on the welcome page I want to automatically fill
in a text box with text hidden in the hyperlink.
Here is an example of one sent to me from another company.
http://quicktake.morningstar.com/fund/portfolio.asp?Country=USA&Symbol=MEIAX

I have tried to replace Country for example with Name and had it equal a
persons name such as Mary.

Error said it couldn't find the page.

I'm using FrontPage. I created a Form and added the form fields, etc.
The page was an ASP page.

Help Me Please!
 
C

Chris Leeds, MVP-FrontPage

on the page you've got to get the variables out of the query string and into
the form field.

so it'll require a little server side coding.

what is the url of this site?

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
 
C

Chris Leeds, MVP-FrontPage

you can send them to the page with a the values in the url:
form.asp?key=username

get the info from the link like:
<% key=request("key") %>

and then write it in the value into the form field:
<%= key %>

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
 
E

Erin

Chris, Just a little bit more detail on where to put this.
I added ?key=username to the end of the URL
I added the default value in the form field: <%= key %>

My problem is where do i put "Get info from the link".
I went to Form Properties, Advanced and put it in as a hidden field. And
then assiciated that hidden field with corresponging field in database.

It does put a comma into my database into the proper place but that's it.
 
E

Erin

Hi Chris. Just a little more detail please.
I added the ?key=username at the end of my URL(replaced username with an
actual name)

I put <%= key %> into the default value of the particular form field.
(exactly as typed) - ?should I create a hidden form field and put this value
in and associate it with database field instead? I do want to hide it from
the visitor.

I am not sure where to put the "get informatio from the link" coding.
Could you tell me more specifically.

Sorry to be a pain. But I truly appreciate your effort.
Erin
 
C

Chris Leeds, MVP-FrontPage

put this:
<% key=request("key") %>
above where you need to "write" the value into the field.


--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
 
E

Erin

Thank you chris for all your help.
So... for everyone who is curious here is what I did and it worked
successfully.
On my submission_form.asp the text box properties has the name of SNumber
and the Initial value is: <%= request("snumber")%>

On my sumbission_form.asp in the Form Properties, Options, Saved Fields, I
made sure that my form field (Snumber) matched the appropriate corresponding
database column.

at the end of my hyperlink I added ?snumber=****
Example:
/submission_form.asp?snumber=65890

The form field is automatically filled in and when Submit is clicked then it
feeds back to the database and I have my confirmation page display.
Yee Ha!
Thank for your help
 

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