passing variable

E

Edwin Steinberg

In FP2002, in default.asp I have buttons that hyperlink to
nursingform.htm, HTML code snippet is:

<a
href="nursing/nursingform.htm?WhereFrom=Button1Text">Button1</a></FONT></b></li>
<li><b><font face="Arial" size="2">
<a
href="nursing/nursingform.htm?WhereFrom=Button2Text">Button2</a></font></b></li>

I used EditHyperLink/Parameters to create these links.

How do I access these parameters in nursingform.htm so that when
Button1 in default.asp is clicked, I can display Button1Text on
nursingform.htm and when Button2 is clicked, I can display
Button2Text?

I've looked at some KB articles but it just didn't register with me.

TIA
Ed
 
J

Jim Buyens

-----Original Message-----
In FP2002, in default.asp I have buttons that hyperlink to
nursingform.htm, HTML code snippet is:

<a
href="nursing/nursingform.htm?
WhereFrom=Button1Text">Button1 said:
<li><b><font face="Arial" size="2">
<a
href="nursing/nursingform.htm?
WhereFrom=Button2Text">Button2 said:
I used EditHyperLink/Parameters to create these links.

How do I access these parameters in nursingform.htm so that when
Button1 in default.asp is clicked, I can display Button1Text on
nursingform.htm and when Button2 is clicked, I can display
Button2Text?

I've looked at some KB articles but it just didn't
register with me.

Regular htm pages can't receive query string values such
as nursing/nursingform.htm?WhereFrom=Button1Text. You
have to rename the nursingform.htm page to
nursingform.asp, and then put an expression like
<%=Request("WhereFrom")%> where you want Button1Text or
Button2Text to appear.

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

Edwin Steinberg

Jim:
Thanks much, After reading the KB stuff I had tried using
<%=Request("WhereFrom")%> so I guss the reason it didn't work was
because it was on an htm page.

Is there any downside to renaming all the pages from asp to htm? Is
there any reading or tutorials you can suggest?

Again, thanks a lot for your help.
Ed
 
T

Thomas A. Rowe

There is no downside to name your pages .asp, just make sure your site is
hosted on Windows IIS or if Unix/Linux that the host has installed ChiliSoft
ASP or similar ASP engine. However under Unix/Linux you would not be able to
Access.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
T

Thomas A. Rowe

If your current home page is default.asp then you should be ok.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
E

Edwin Steinberg

Any idea why MS created the asp page instead of just adding the
functionality to htm pages?
 
E

Edwin Steinberg

Jim and Thomas
Thanks. It worked when I placed the code on the form using
Insert/AdvancedControls/HTMLMarkup.
Ed
 
J

Jim Buyens

Edwin Steinberg said:
Any idea why MS created the asp page instead of just adding the
functionality to htm pages?

ASP code executes on the Web server, and the Web server needs a
special filename extension to make such processing available.

It would be a waste of server resources to process every htm page
looking for server-side code to execute.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| 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

Top