asp in html

T

Thad

ok...I can use an asp file to load my whole html page, no problem. The
problem is getting the asp file to print my menu within a table cell which
is already created by an html. Is there something wrong with the following
code? I may have the code right but my server is not allowing my use of the
asp file. Please let me know.

asp file: test1.asp

<html>

<body>

<dl id="menu">

<dt class="btn"><a href="carflags.html">Car Flags</a></dt>

</dl>

</body>

</html>

-----------------------

Part of my html:

<td id="topa">
<b>Items Menu</b>
<%
<p><!-- #include file="test1.asp" --></p>
%>
</td>
 
A

Adrienne Boswell

ok...I can use an asp file to load my whole html page, no problem. The
problem is getting the asp file to print my menu within a table cell
which is already created by an html. Is there something wrong with
the following code? I may have the code right but my server is not
allowing my use of the asp file. Please let me know.

Do you have asp on the server? What kind of OS do you have? If you
have IIS6, ASP is not enabled by default and you have to enable it. See
your server documentation for details.
asp file: test1.asp

<html>

No DocType? New pages should be HTML Strict.
<body>

<dl id="menu">

<dt class="btn"><a href="carflags.html">Car Flags</a></dt>

</dl>

This looks a little strange, too. Usually, for a definition list, there
is a term (dt) and a definition (dd). You probably want ul and li.
Further, there is probably no reason on include class="btn" if you style
the ancestor element correctly, that being the dl element in the above
case.
Part of my html:

<td id="topa">
<b>Items Menu</b>
<%
<p><!-- #include file="test1.asp" --></p>
%>
</td>

Okay, so your REAL markup is:
<td id="topa">
<b>Items Menu</b>
<p>
<dl id="menu">
<dt class="btn"><a href="carflags.html">Car Flags</a></dt>
</dl>
</p>
</td>

In the first place, tds very rarely have an id - that's because an id
can only be used once in one document, where a class can be used many
times in the same document. Oh wait! You're abusing tables for
positioning, aren't you?

<div id="menu">
<ul>
<li><a href="somepage.html">Some Page</a></li>
</ul>
</div>

You may want to look at alistapart's on taming lists.


Includes are processed before any other server side script, so you want
to also look at the HTML the asp script produced. If you see just
<p><!-- #include file="test1.asp" --></p>, then your server is not
processing the include directive at all.
 
J

Jonathan N. Little

Thad said:
ok...I can use an asp file to load my whole html page, no problem. The
problem is getting the asp file to print my menu within a table cell which
is already created by an html. Is there something wrong with the following
code? I may have the code right but my server is not allowing my use of the
asp file. Please let me know.

asp file: test1.asp

Well if your server is the one that you are hosting

http://www.imagedgifts.com/

on then the problem is simple, that server is running Apache and not
M$'s IIS! ASP runs on Microsoft's server. With Apache if you have
server-side scripting you probably have PHP. to check create a text file

enter:

<?php phpinfo(); ?>

save and call it 'test.php'

upload to server and try it, if you have PHP it will list all the
settings...

Including with PHP is just:

....
<td id="topa">
<b>Items Menu</b>
<?php include('test1.php') ?>
...
 
T

Thad

Jonathan N. Little said:
Well if your server is the one that you are hosting

http://www.imagedgifts.com/

on then the problem is simple, that server is running Apache and not M$'s
IIS! ASP runs on Microsoft's server. With Apache if you have server-side
scripting you probably have PHP. to check create a text file

enter:

<?php phpinfo(); ?>
Yes, the server has php. The above php command will render me a blank page
since the server has deactivated that command to "make things safer for the
users". Oh jeeperz. I assumed I had asp capabilities on the server. Feel
like fool real bad. Well, now I know I can write something in php. Whether
or not it is correct is a different story...Thanks all for your help.
Probably be back later with php problem if no php news group is available.
:)

Thanks Jonathan.
 
T

Thad

Adrienne Boswell said:
Do you have asp on the server? What kind of OS do you have? If you
have IIS6, ASP is not enabled by default and you have to enable it. See
your server documentation for details.


No DocType? New pages should be HTML Strict.


This looks a little strange, too. Usually, for a definition list, there
is a term (dt) and a definition (dd). You probably want ul and li.
Further, there is probably no reason on include class="btn" if you style
the ancestor element correctly, that being the dl element in the above
case.
Yes, ul or li may work just fine. Believe it or not, that was an expansion
of a sample from a book. Go figure. :)
Okay, so your REAL markup is:
<td id="topa">
<b>Items Menu</b>
<p>
<dl id="menu">
<dt class="btn"><a href="carflags.html">Car Flags</a></dt>
</dl>
</p>
</td>

In the first place, tds very rarely have an id - that's because an id
can only be used once in one document, where a class can be used many
times in the same document. Oh wait! You're abusing tables for
positioning, aren't you?
Abusing, I don't think so...but using, yes. My page is tabled into three
cells left to right. To align the text and pictures I had to use id in the
td section of the table. Yes there may have been another way to do it but
this worked for me. Thanks tho. :)
<div id="menu">
<ul>
<li><a href="somepage.html">Some Page</a></li>
</ul>
</div>

You may want to look at alistapart's on taming lists.



Includes are processed before any other server side script, so you want
to also look at the HTML the asp script produced. If you see just
<p><!-- #include file="test1.asp" --></p>, then your server is not
processing the include directive at all.
Feeling like a fool at the moment. My server most likely does not support
asp for us users. I'm going to have to use php. Sorry for the confusion
here.

Thad
 

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

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top