Can we 'Send Keys' in FP2002?

M

Matthew

Well, can we?

When I was coding VB in some MS Office applications, I
learned of the Send Keys feature. I searched for the
subject in FP2002 Help, but found nothing.

In MyDatabase, there are records with a value for
MyVariable. I would like to open a web page, and pass
MyVariable for a user-selected record to the opened web
page's SearchFuction.asp, but I have had limited luck
using Insert>Hyperlink>Parameters to carry MyVariable.

What I have so far will carry MyVariable to the target
page, and I can get it to properly populate the Text Box,
where the user of that page should enter the variable to
search. Next however, the user must click the 'Submit
Search' control. How can I send a command to simulate
the Click of a Control, relieving my user of the extra
click?

From the target page's Source, I see that <input
type="image" name="CheckLicense"
SRC="../images/checklicense.gif" ALT="Check License">

That's the control I want to activate, so I use my
hyperlink to send values to the target submission text
box as follows:

http://www2.cslb.ca.gov/CSLB_LIBRARY/License+request.asp?
LicNum=<%=FP_FieldURL(fp_rs,"CSLBNumber")%>

Is this the right idea? Is Send Keys an option in this
case? Is there another (or a better) method?

Thank you for your support,

Matthew

=}
 
J

Jim Buyens

I read your post three or four times the first time you
submitted it, and now I've read it three or four times
again. And I still can't understand the question.

Are you trying to make hyperlinks in one Database Results
Region run a more detailed query in another page? If so,
you need to create a custom query that returns a column
of hyperlinks, such as

SELECT '<a href=dtlquery.asp?LicNum=' & [LicNum] & '>' &
[LicNum] & '</a>' AS LicNumLink, ...

and then, after the DRW finishes:
1. Right-click the column that displays the LicNumLink
field.
2. Choose Database Column Value properties.
3. Select Column Value Contains HTML and then click OK.

The dtlquery.asp page would then contain a DRW with a
criteria based on the LicNum form field. This query will
take off and run the first time the page appears. There's
no need to fake a mouse click on the Submit button.

As to SendKeys, no, you don't use that on a Web page.
There are, however, JavaScript commands that can
manipulate elements on the page. For example:
document.forms[0].txtLicNum.value = "123";
sets the value of a text box named txtLicNum, in the
first HTML form on the page, to 123. Also,
document.forms[0].submit();
submits the first HTML form on the page.

Is that even close to the answer you were seeking?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
M

Matthew

Yes, admitedly; it is a confusing question.

I have a site called MyWeb. My visitor conducts a search
in MyWeb/Directory.asp and receives a details page. One
of the details is a license number with the State. The
State provides StateWeb, with their own search feature
for licenses - let's say, LicenseSearch.asp.

I want to pass the license number I have in MyDatabase to
StateWeb/LicenseSearch.asp to populate the search text
box on their page. I also would like to activate that
search and produce results. It sounds as though I might
use

document.forms[0].submit();

to 'press' the SubmitButton object on the
StateWeb/LicenseSearch.asp page. Before I do though, do
I need to do anything special to make this Java deal
work? I know less about Java than I do about the Prime
Minister of Kazakhstan. Any help (with Java) is deeply
appreciated.

Happy New Year,

Matthew

=}

-----Original Message-----
I read your post three or four times the first time you
submitted it, and now I've read it three or four times
again. And I still can't understand the question.

Are you trying to make hyperlinks in one Database Results
Region run a more detailed query in another page? If so,
you need to create a custom query that returns a column
of hyperlinks, such as

SELECT '<a href=dtlquery.asp?LicNum=' & [LicNum] & '>' &
[LicNum] & '</a>' AS LicNumLink, ...

and then, after the DRW finishes:
1. Right-click the column that displays the LicNumLink
field.
2. Choose Database Column Value properties.
3. Select Column Value Contains HTML and then click OK.

The dtlquery.asp page would then contain a DRW with a
criteria based on the LicNum form field. This query will
take off and run the first time the page appears. There's
no need to fake a mouse click on the Submit button.

As to SendKeys, no, you don't use that on a Web page.
There are, however, JavaScript commands that can
manipulate elements on the page. For example:
document.forms[0].txtLicNum.value = "123";
sets the value of a text box named txtLicNum, in the
first HTML form on the page, to 123. Also,
document.forms[0].submit();
submits the first HTML form on the page.

Is that even close to the answer you were seeking?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
Well, can we?

When I was coding VB in some MS Office applications, I
learned of the Send Keys feature. I searched for the
subject in FP2002 Help, but found nothing.

In MyDatabase, there are records with a value for
MyVariable. I would like to open a web page, and pass
MyVariable for a user-selected record to the opened web
page's SearchFuction.asp, but I have had limited luck
using Insert>Hyperlink>Parameters to carry MyVariable.

What I have so far will carry MyVariable to the target
page, and I can get it to properly populate the Text Box,
where the user of that page should enter the variable to
search. Next however, the user must click the 'Submit
Search' control. How can I send a command to simulate
the Click of a Control, relieving my user of the extra
click?

From the target page's Source, I see that <input
type="image" name="CheckLicense"
SRC="../images/checklicense.gif" ALT="Check License">

That's the control I want to activate, so I use my
hyperlink to send values to the target submission text
box as follows:

http://www2.cslb.ca.gov/CSLB_LIBRARY/License+request.asp ?
LicNum=<%=FP_FieldURL(fp_rs,"CSLBNumber")%>

Is this the right idea? Is Send Keys an option in this
case? Is there another (or a better) method?

Thank you for your support,

Matthew

=}

.
.
 
S

Steve Easton

I'm thinking javascript.
You can't "write" to the form field
on the StateWeb page, but what you can do
I think:
View the source for StateWeb page and
copy the hyperlink and form info that opens their search
and paste it into your page, noting the form Name="formname".

Using javascript
1. set a global variable something like:
var license;
2. have javascript read your returned license number
and pass it to the global variable.
license = document.yourform.formname."";
3. use document.write to then write the variable
to the portion of the url that the StateWeb page uses
to launch the search function.
document.all.formname.innerHTML = "license";

this is far from being exact but it might give you an idea.


--
using 2k PRO but....95isalive
This site is best viewed............
........................with a computer

Matthew said:
Yes, admitedly; it is a confusing question.

I have a site called MyWeb. My visitor conducts a search
in MyWeb/Directory.asp and receives a details page. One
of the details is a license number with the State. The
State provides StateWeb, with their own search feature
for licenses - let's say, LicenseSearch.asp.

I want to pass the license number I have in MyDatabase to
StateWeb/LicenseSearch.asp to populate the search text
box on their page. I also would like to activate that
search and produce results. It sounds as though I might
use

document.forms[0].submit();

to 'press' the SubmitButton object on the
StateWeb/LicenseSearch.asp page. Before I do though, do
I need to do anything special to make this Java deal
work? I know less about Java than I do about the Prime
Minister of Kazakhstan. Any help (with Java) is deeply
appreciated.

Happy New Year,

Matthew

=}

-----Original Message-----
I read your post three or four times the first time you
submitted it, and now I've read it three or four times
again. And I still can't understand the question.

Are you trying to make hyperlinks in one Database Results
Region run a more detailed query in another page? If so,
you need to create a custom query that returns a column
of hyperlinks, such as

SELECT '<a href=dtlquery.asp?LicNum=' & [LicNum] & '>' &
[LicNum] & '</a>' AS LicNumLink, ...

and then, after the DRW finishes:
1. Right-click the column that displays the LicNumLink
field.
2. Choose Database Column Value properties.
3. Select Column Value Contains HTML and then click OK.

The dtlquery.asp page would then contain a DRW with a
criteria based on the LicNum form field. This query will
take off and run the first time the page appears. There's
no need to fake a mouse click on the Submit button.

As to SendKeys, no, you don't use that on a Web page.
There are, however, JavaScript commands that can
manipulate elements on the page. For example:
document.forms[0].txtLicNum.value = "123";
sets the value of a text box named txtLicNum, in the
first HTML form on the page, to 123. Also,
document.forms[0].submit();
submits the first HTML form on the page.

Is that even close to the answer you were seeking?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
Well, can we?

When I was coding VB in some MS Office applications, I
learned of the Send Keys feature. I searched for the
subject in FP2002 Help, but found nothing.

In MyDatabase, there are records with a value for
MyVariable. I would like to open a web page, and pass
MyVariable for a user-selected record to the opened web
page's SearchFuction.asp, but I have had limited luck
using Insert>Hyperlink>Parameters to carry MyVariable.

What I have so far will carry MyVariable to the target
page, and I can get it to properly populate the Text Box,
where the user of that page should enter the variable to
search. Next however, the user must click the 'Submit
Search' control. How can I send a command to simulate
the Click of a Control, relieving my user of the extra
click?

From the target page's Source, I see that <input
type="image" name="CheckLicense"
SRC="../images/checklicense.gif" ALT="Check License">

That's the control I want to activate, so I use my
hyperlink to send values to the target submission text
box as follows:

http://www2.cslb.ca.gov/CSLB_LIBRARY/License+request.asp ?
LicNum=<%=FP_FieldURL(fp_rs,"CSLBNumber")%>

Is this the right idea? Is Send Keys an option in this
case? Is there another (or a better) method?

Thank you for your support,

Matthew

=}

.
.
 
J

Jim Buyens

Matthew said:
Yes, admitedly; it is a confusing question.

I have a site called MyWeb. My visitor conducts a search
in MyWeb/Directory.asp and receives a details page. One
of the details is a license number with the State. The
State provides StateWeb, with their own search feature
for licenses - let's say, LicenseSearch.asp.

I want to pass the license number I have in MyDatabase to
StateWeb/LicenseSearch.asp to populate the search text
box on their page. I also would like to activate that
search and produce results. It sounds as though I might
use

document.forms[0].submit();

to 'press' the SubmitButton object on the
StateWeb/LicenseSearch.asp page. Before I do though, do
I need to do anything special to make this Java deal
work? I know less about Java than I do about the Prime
Minister of Kazakhstan. Any help (with Java) is deeply
appreciated.

This depends a lot on how the state wrote their LicenseSearch.asp
page. Can you post a real URL?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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

Similar Threads


Top