passing variable

  • Thread starter Thread starter Edwin Steinberg
  • Start date Start date
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
 
-----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) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
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
 
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.
==============================================
 
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.
==============================================
 
Any idea why MS created the asp page instead of just adding the
functionality to htm pages?
 
Jim and Thomas
Thanks. It worked when I placed the code on the form using
Insert/AdvancedControls/HTMLMarkup.
Ed
 
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) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Back
Top