Hyperlink w/ vbscript ?

S

SPG

Using FP 2003 and Access. Doing a page using vbscript. How in the heck to
you make a hyperlink using vbscript ?

Thanks,
Sam
 
S

Stefan B Rusynko

<%
Response.write "<a href='somepage.asp'>Some Page</a>"
%>




| Using FP 2003 and Access. Doing a page using vbscript. How in the heck to
| you make a hyperlink using vbscript ?
|
| Thanks,
| Sam
|
|
|
 
S

SPG

Stefan, thanks for the quick response. Yes, what you said does create a
hyperlink. What I failed to do was give you all of the required
information. Here it is:

This is a medical site that will allow the user to enter up to 5 symptoms.
The results will show what diseases have those
symptoms. The name of the diseases will be hyperlinked to the specific
disease page. If I was doing this with a DBRW "Results" page it would be
simple. The Access table consists of the name of the disease, 5 fields for
symptoms and a field for
the hyperlink info. If I was doing this as a stand-a-lone VB program I
would create dynasets to check the 5 possible symptoms. But, as far as I
can tell, I can't do this here. Since any symptom could be in any of the 5
fields, I have to check each field of each record, one symptom at a time.
Thus using an SQL is out of the question. What is available for VB in
general is not available for the website, thus I am using VBScript. What I
want to do: after each qualified record is selected
I want to pull the last field containing the hyperlink info and have it
apply to the field containing the disease. I know this may be asking too
much from VBSript, but I am looking to see if this is possible.

Thanks,

Sam
 
S

Stefan B Rusynko

The DBRW would not be able to do it (too complex)
There is no reason you can't and shouldn't be able to do this w/ VB script (Sql lookups) and a DB

Get your 5 symptom values as SymptonX then compare them to a DB w/ Symptoms/Diseases/Links
If all 5 of your symptoms all must be present use an AND comparison

IF Symptom=Symptom1 AND Symptom=Symptom2 THEN Disease=DiseaseY

If any of your 5 symptoms can be present use an OR comparison

IF Symptom=Symptom1 OR Symptom=Symptom2 THEN Disease=DiseaseY

Your problem will be data entry (users can enter symptoms with any text which would force you to use Like comparison
- best to use dropdowns for the 5 symptoms with fixed predefined terms from a DB



| Stefan, thanks for the quick response. Yes, what you said does create a
| hyperlink. What I failed to do was give you all of the required
| information. Here it is:
|
| This is a medical site that will allow the user to enter up to 5 symptoms.
| The results will show what diseases have those
| symptoms. The name of the diseases will be hyperlinked to the specific
| disease page. If I was doing this with a DBRW "Results" page it would be
| simple. The Access table consists of the name of the disease, 5 fields for
| symptoms and a field for
| the hyperlink info. If I was doing this as a stand-a-lone VB program I
| would create dynasets to check the 5 possible symptoms. But, as far as I
| can tell, I can't do this here. Since any symptom could be in any of the 5
| fields, I have to check each field of each record, one symptom at a time.
| Thus using an SQL is out of the question. What is available for VB in
| general is not available for the website, thus I am using VBScript. What I
| want to do: after each qualified record is selected
| I want to pull the last field containing the hyperlink info and have it
| apply to the field containing the disease. I know this may be asking too
| much from VBSript, but I am looking to see if this is possible.
|
| Thanks,
|
| Sam
|
|
| | > <%
| > Response.write "<a href='somepage.asp'>Some Page</a>"
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | > | Using FP 2003 and Access. Doing a page using vbscript. How in the heck
| > to
| > | you make a hyperlink using vbscript ?
| > |
| > | Thanks,
| > | Sam
| > |
| > |
| > |
| >
| >
| >
|
|
|
 
S

SPG

Stefan, thanks for the reply. I am doing as you have stated. Now, I come
back to the original problem: creating a hyperlink
for the disease name. Lets call the disease variable 'dd' and I am doing a
response.write to show the disease name and some
other info. I want to be able to link the disease name to the disease page
using the Link field data. I have tried a number of things, all which
causes the server to OOPS! Any ideas?

Thanks,

Sam


Stefan B Rusynko said:
The DBRW would not be able to do it (too complex)
There is no reason you can't and shouldn't be able to do this w/ VB script
(Sql lookups) and a DB

Get your 5 symptom values as SymptonX then compare them to a DB w/
Symptoms/Diseases/Links
If all 5 of your symptoms all must be present use an AND comparison

IF Symptom=Symptom1 AND Symptom=Symptom2 THEN Disease=DiseaseY

If any of your 5 symptoms can be present use an OR comparison

IF Symptom=Symptom1 OR Symptom=Symptom2 THEN Disease=DiseaseY

Your problem will be data entry (users can enter symptoms with any text
which would force you to use Like comparison
- best to use dropdowns for the 5 symptoms with fixed predefined terms
from a DB



| Stefan, thanks for the quick response. Yes, what you said does create a
| hyperlink. What I failed to do was give you all of the required
| information. Here it is:
|
| This is a medical site that will allow the user to enter up to 5
symptoms.
| The results will show what diseases have those
| symptoms. The name of the diseases will be hyperlinked to the specific
| disease page. If I was doing this with a DBRW "Results" page it would
be
| simple. The Access table consists of the name of the disease, 5 fields
for
| symptoms and a field for
| the hyperlink info. If I was doing this as a stand-a-lone VB program I
| would create dynasets to check the 5 possible symptoms. But, as far as
I
| can tell, I can't do this here. Since any symptom could be in any of
the 5
| fields, I have to check each field of each record, one symptom at a
time.
| Thus using an SQL is out of the question. What is available for VB in
| general is not available for the website, thus I am using VBScript.
What I
| want to do: after each qualified record is selected
| I want to pull the last field containing the hyperlink info and have it
| apply to the field containing the disease. I know this may be asking
too
| much from VBSript, but I am looking to see if this is possible.
|
| Thanks,
|
| Sam
|
|
| | > <%
| > Response.write "<a href='somepage.asp'>Some Page</a>"
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | > | Using FP 2003 and Access. Doing a page using vbscript. How in the
heck
| > to
| > | you make a hyperlink using vbscript ?
| > |
| > | Thanks,
| > | Sam
| > |
| > |
| > |
| >
| >
| >
|
|
|
 
S

SPG

OK Stefan, here is the solution on creating the hyperlink using vbscript:
First I will refer you to MS's KB205980,
dated 9/27/04. The only thing I did was to change the first field like the
article states under "Format Results of a Query
as a Hyperlink", ignored everything else. I kept my vbscript code the same
using 'dd' as the variable for the disease for the qualified record. So, in
the first field, where I had 'Disease1' I changed it to <a
href="disease1.htm">Disease1</a>. Now, when the Disease1 record is selected
it is displayed as Disease1 with it hyperlinked to the htm page, but shows
only Disease1 on the asp page that returned the results. Looks good and
works great.

Sam


Stefan B Rusynko said:
The DBRW would not be able to do it (too complex)
There is no reason you can't and shouldn't be able to do this w/ VB script
(Sql lookups) and a DB

Get your 5 symptom values as SymptonX then compare them to a DB w/
Symptoms/Diseases/Links
If all 5 of your symptoms all must be present use an AND comparison

IF Symptom=Symptom1 AND Symptom=Symptom2 THEN Disease=DiseaseY

If any of your 5 symptoms can be present use an OR comparison

IF Symptom=Symptom1 OR Symptom=Symptom2 THEN Disease=DiseaseY

Your problem will be data entry (users can enter symptoms with any text
which would force you to use Like comparison
- best to use dropdowns for the 5 symptoms with fixed predefined terms
from a DB



| Stefan, thanks for the quick response. Yes, what you said does create a
| hyperlink. What I failed to do was give you all of the required
| information. Here it is:
|
| This is a medical site that will allow the user to enter up to 5
symptoms.
| The results will show what diseases have those
| symptoms. The name of the diseases will be hyperlinked to the specific
| disease page. If I was doing this with a DBRW "Results" page it would
be
| simple. The Access table consists of the name of the disease, 5 fields
for
| symptoms and a field for
| the hyperlink info. If I was doing this as a stand-a-lone VB program I
| would create dynasets to check the 5 possible symptoms. But, as far as
I
| can tell, I can't do this here. Since any symptom could be in any of
the 5
| fields, I have to check each field of each record, one symptom at a
time.
| Thus using an SQL is out of the question. What is available for VB in
| general is not available for the website, thus I am using VBScript.
What I
| want to do: after each qualified record is selected
| I want to pull the last field containing the hyperlink info and have it
| apply to the field containing the disease. I know this may be asking
too
| much from VBSript, but I am looking to see if this is possible.
|
| Thanks,
|
| Sam
|
|
| | > <%
| > Response.write "<a href='somepage.asp'>Some Page</a>"
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | > | Using FP 2003 and Access. Doing a page using vbscript. How in the
heck
| > to
| > | you make a hyperlink using vbscript ?
| > |
| > | Thanks,
| > | Sam
| > |
| > |
| > |
| >
| >
| >
|
|
|
 

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