Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Script problem

New Here ,
May 09, 2006 May 09, 2006
Whenever I try to execute an asp page it displays the actual code or at best html and empty strings as in...

Hello <%=strName> !

displays...

Hello !

Any ideas???
TOPICS
Server side applications
454
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2006 May 10, 2006
Is strName empty? Pop in a second % symbol before the closing >

Hello <%=strName%> !

Just in case it's a bigger problem like server issues, the following should
return hello. If not, there's something seriously wrong.

Hello <%
strName = "there"
Response.Write strName
%>

HTH,
Piers


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2006 May 10, 2006
LeeMc

How are you populating the strName variable?

Brendan
______________________________________________
Rate your experiences with your UK and Ireland builders at
http://www.ratethebuilder.co.uk
=========================================


"LeeMc" <webforumsuser@macromedia.com> wrote in message
news:e3r1n7$art$1@forums.macromedia.com...
> Whenever I try to execute an asp page it displays the actual code or at
best html and empty strings as in...
>
> Hello <%=strName> !
>
> displays...
>
> Hello !
>
> Any ideas???


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2006 May 10, 2006
I wrote this form just to test again...Please check!

<HTML>
<BODY>

<B>Please enter your name and hobby:</B><BR>

<FORM METHOD=POST ACTION="namehobby.asp">
Your name: <INPUT TYPE=TEXT NAME=Name>
<BR>

Your hobby: <INPUT TYPE=TEXT NAME=Hobby>
<P>
<INPUT TYPE=SUBMIT VALUE="Submit!"
</FORM>
</BODY>
</HTML>

Here's namehobby.asp...

<%@ Language=VBScript %>
<% Option Explicit %>
<%

'Declare and set form variables
Dim strName, strHobby
strName = Request.Form("Name")
strHobby = Request.Form("Hobby")

%>
<HTML>
<BODY>

Hello <%=strName%> <BR>
Your Favorite hobby is <%=strHobby%>

</BODY>
</HTML>

This is what the browser displays...

Hello
Your Favorite hobby is
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2006 May 10, 2006
The obvious one is that the page is saved with an extension other than .asp.
If that is not the case then the second option is that you server doesn't
support asp.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"LeeMc" <webforumsuser@macromedia.com> wrote in message
news:e3r1n7$art$1@forums.macromedia.com...
> Whenever I try to execute an asp page it displays the actual code or at
> best html and empty strings as in...
>
> Hello <%=strName> !
>
> displays...
>
> Hello !
>
> Any ideas???


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2006 May 10, 2006
Hi Paul,

I funny thing is that my server did crunch code a few months ago...just recently when I try to run pages that worked before my machine is displaying the code or empty stuff like the above?!?!?!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 11, 2006 May 11, 2006
LATEST
Sound like it's a server problem.

Maybe time for some re-installing... :-(

Piers


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines