Include file in another included file

V

Vojma

I have a problem

At my site I have designed a framework with tabs as below

(tabs_1.asp)
+----+ +------+ +-------+
| MC | | Cars | | Boats |
+ +-------------------------

then, into tabs_1.asp I include another page

(tabs_1_2.asp)

--------+ +--------------
| New | | Used | | Crasched |
+-----+ +------+ +----------+

Works fine so far... Here comes the problem...

The file tabs_1_2.asp has an included page (data.asp) witch doesnt
appear...

When I look at the sourcecode from the webbrowser it seems to have
been included but nothing is visible.

Is it inpossible to make several includes in the way I described?

/Stefan - Sweden
 
K

Ken Schaefer

You can nest includes (one include includes another file), but I don't think
it's a great idea.

Better to create routines/classes, and put them in separate includes.
Include all the files you need (rather than having one file include another,
as you may eventually have collisions if two files include the same third
file etc).

Cheers
Ken

: I have a problem
:
: At my site I have designed a framework with tabs as below
:
: (tabs_1.asp)
: +----+ +------+ +-------+
: | MC | | Cars | | Boats |
: + +-------------------------
:
: then, into tabs_1.asp I include another page
:
: (tabs_1_2.asp)
:
: --------+ +--------------
: | New | | Used | | Crasched |
: +-----+ +------+ +----------+
:
: Works fine so far... Here comes the problem...
:
: The file tabs_1_2.asp has an included page (data.asp) witch doesnt
: appear...
:
: When I look at the sourcecode from the webbrowser it seems to have
: been included but nothing is visible.
:
: Is it inpossible to make several includes in the way I described?
:
: /Stefan - Sweden
 
R

Roji. P. Thomas

Is it inpossible to make several includes in the way I described?
Yes.
The problem must be with your code in data.asp.
 
V

Vojma

At this point I havbe changed strategy and made the second "include"
as a framed page instead - whitout success...

Here comes the code:

3_medlem.asp (tabs_1.asp in previous post)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<tr>
<td width="15" background="images/background_light_blue.jpg">&nbsp;</td>
<td colspan="15">
<%
subside = Request.Querystring("subside")
IF subside <> "" THEN
SELECT CASE subside
CASE 1
%><!--#include file="inc_medlem_1.asp"--></td><%
CASE 2
%><!--#include file="inc_medlem_2.asp"--></td><%
CASE 3
%><!--#include file="inc_medlem_3.asp"--></td><%
CASE 4
%><!--#include file="inc_medlem_4.asp"--></td><%
CASE 5
%><!--#include file="frames_guestbook.asp"--></td><%
END SELECT
ELSE
%><!--#include file="inc_medlem_1.asp"--></td><%
END IF
%>
<td width="15" background="images/background_light_blue.jpg">&nbsp;</td>
</tr>

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

frames_guestbook.asp (tabs_1_2.asp in previous post)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

<frameset rows="26%,*" borders=false>
<frame name="top" src="inc_medlem_5.asp">
<frame name="bottom"
src="http://www.independentcommerce.com/Guestbook/Guestbook.asp?ID=xxxx">
</frameset>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

When viewing "frames_guestbook.asp" as it is, it shows what I want but
when viewing it as an include-file nothing shows. When looking at the
source from the web-browser, the right code is there...

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

<tr>
<td width="15" background="images/background_light_blue.jpg">&nbsp;</td>
<td colspan="15">
<frameset rows="26%,*" borders=false>
<frame name="top" src="inc_medlem_5.asp">
<frame name="bottom"
src="http://www.independentcommerce.com/Guestbook/Guestbook.asp?ID=xxxx">
</frameset></td>
<td width="15" background="images/background_light_blue.jpg">&nbsp;</td>
</tr>

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

.... but NOTHING SHOWS...

WHY???

Got a tip to make it into functions but since I'm kind of newbe in ASP
I dont think I would fix it.

IF anyone wants I can mail the entire code to him/her for
errorseeking.

/Stefan - Sweden
 
A

Aaron Bertrand [MVP]

<td width="15"
background="images/background_light_blue.jpg">&nbsp; said:
<td colspan="15">
<frameset rows="26%,*" borders=false>

This is a basic HTML problem. Do you want frames, or do you want tables?
You can't put a frameset inside of an HTML table. Framesets have to be at
the top level...

A
 
S

Stefan Lundberg

My mistake... Of course...

I would rather have the page "tabeled" than framed but in a desperate
state I had to try the impossible...

Anyone???

/Stefan - Sweden
 

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
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top