FP alters my vb script

C

Chris

FP keeps altering my script! How do I make it stop
thinking it knows what I want better than I do?

I'm using FP2002 and when I enter the following:

<iframe id="datamain" src="
<%
week=request.form("choose_week")
if week="next" then
response.write "nextweeklyschedule.htm")
else
response.write("weeklyschedule.htm")
end if
%>
" align="right" width="300" height="500" marginwidth="2"
marginheight="0" frameborder="1" scrolling="yes"
name="schedulebox">

FP alters it to read this:

<iframe id="datamain" src="%20%20%20%20<%
week=request.form("choose_week") if week="next"
then response.write("nextweeklyschedule.htm")
else response.write("weeklyschedule.htm") end
if %>%20%20%20%20" align="right" width="300"
height="500" marginwidth="2" marginheight="0"
frameborder="1" scrolling="yes" name="schedulebox">

How do I make it leave my code alone?

Thanks!!!
 
T

Thomas A. Rowe

Write the script in way that FP understand it...

Such as:

<%
week=request.form("choose_week")
%>
<% if week="next" then %>
<iframe id="datamain" src="nextweeklyschedule.htm"" align="right"
width="300" height="500" marginwidth="2"
marginheight="0" frameborder="1" scrolling="yes" name="schedulebox">
<% Else %>
<iframe id="datamain" src="weeklyschedule.htm"" align="right" width="300"
height="500" marginwidth="2"
marginheight="0" frameborder="1" scrolling="yes" name="schedulebox">
<% End If %>


or use the insert HTML component.



--

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

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

Thomas A. Rowe

Here is another way to accomplish this so that FP understand it:

<%
week=request.form("choose_week")
%>

<iframe id="datamain" src="<% If week = "next" then
%>nextweeklyschedule.htm<% Else %>weeklyschedule.htm<% End If %>"
align="right" width="300" height="500" marginwidth="2" marginheight="0"
frameborder="1" scrolling="yes" name="schedulebox">

Note: On my first example, I have a typo, two double quotes after
nextweeklyschedule.htm, which should only be one.

--

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

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

Thomas A. Rowe

It is not less efficient, just a way keep your ASP code separate from the
HTML output, which is a better approach overall.

However, see my second post and example.

--

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

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

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