/* is the beginning of a multi-line comment
*/ is the end.
This is the standard comment used in C and its derivative
languages. // is
the single-line comment in those languages
> <%
> If Not IsLoggedIn Then Response.Redirect
"ClubsAdminLogin.asp"
> %>
is part of an ASP page written in VB Script (VBS). The
single quote comment
is Basic so is applicable to VBS.
<% and %> are used to start and end the actual VBS
code within the page. In
this case, the code is a single-line IF statement.
> '<%
> 'If Not IsLoggedIn Then Response.Redirect
"ClubsAdminLogin.asp"
> '%>
is probably incorrect. You should only have a single
comment line - on the
IF statement itself.
> <%
> 'If Not IsLoggedIn Then Response.Redirect
"ClubsAdminLogin.asp"
> %>
As you have it, the first quote is probably being sent to
the generated
page; the second quote will be used to comment out the line;
the third quote
will be starting a comment that is actually empty and ends
at the %>.
If you want to separate the ASP out, so you can look at the
rest, display
your generated page in your browser in the normal way, then
do a "view
source". This will show you what the browser gets
(without the server-side
ASP stuff) - and you'll see any JavaScript code that might
be in there.
The book is probably fine. Your choice of a source file to
look at is what
is causing confusion. Look at HTM or HTML pages from the
Internet that
interest you (again, use "view source", or simply
grab them from the
temporary internet files area).
Regards, Dave S
----- Original Message -----
From: "Robin Chapple" <robinski mymail.net.au>
To: <JavaScript_Official@yahoogroups.com>
Sent: Friday, January 26, 2007 6:46 AM
Subject: [JavaScript] Beginner learning
>I know nothing about JavaScript hence the questions.
>
> I use a code generator to produce ASP pages for my
website. It works
> well and has been in use for fifteen months.
>
> I am attempting to start understanding the code that is
used and
> purchased " JavaScript in Easy Steps" to
provide some basic information.
>
> i am conversant with VBA used in Access to establish
that i am not
> new to code but still far from a guru.
>
> My first confusion is the use of a comment.
>
> My book shows:
>
> /* as a multi line comment
>
> and
>
> // as a single line comment.
>
> As an example of my confusion:
>
> My generated code produces code which includes:
>
> <%
> If Not IsLoggedIn Then Response.Redirect
"ClubsAdminLogin.asp"
> %>
>
> If I need the page to be free of password I use a
single quotation as
> a comment:
>
> '<%
> 'If Not IsLoggedIn Then Response.Redirect
"ClubsAdminLogin.asp"
> '%>
>
> This is not mentioned in the book.
>
> Equally I cannot find a reference to the
"<%" and ">%" code. What
> part does that play? Even Google can't supply an
answer.
>
> Am I reading the wrong book?
>
> Many thanks,
>
> Robin Chapple
>
>
>
>
> Visit http://aiaiai.com
for more groups to join
> Yahoo! Groups Links
>
>
>
>
Visit http://aiaiai.com for
more groups to join
Yahoo! Groups Links
<*> To visit your group on the web, go to:
ht
tp://groups.yahoo.com/group/JavaScript_Official/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/JavaScript_Official/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:JavaScript_Official-digest@yahoogroups.com
mailto:JavaScript_Official-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
JavaScript_Official-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|