Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird characters showing up on a server side include page

Status
Not open for further replies.

Maven4Champ

Technical User
Jun 16, 2004
154
Greetings,

I currently have 4 server side includes in my website.

The odd thing is that on my last one that I added, it returns the page but in front of where the content starts, it has the following weird characters:


Page is visible here:

First question - is there a limit to the number of server side includes you can have?

If not, what else could be the problem.

The html for the ssi page returning the error is below:

Code:
<!-- Begin Advertisements -->
<a href="#top"><img border="0" src="../images2/advertisehere.jpg" width="151" height="600" alt="BringTheBlitz.com - Advertise Here" /></a>
<br />
<br />
<a href="[URL unfurl="true"]http://bringtheblitz.com/community/"><img[/URL] border="0" src="../images2/banner.jpg" width="151" height="381" alt="BringTheBltiz.com Forums" /></a>
<!-- End Advertisments -->

What could be causing this. It's almost as if (should there not be a limit) that there are hidden characters or something. No other errors that I can tell.

Here is also a portion of the code for the index.shtml page:
Code:
			<td class="column1" valign="top"><div align="center"><!--#include virtual="advertise.shtml" --></div>
			</td>
 
Been there, done that.

W3C is attempting to validate my javascript which kicks back several errors but I have already done that and none of the errors are indicative of what is wrong with the server side include.

W3C was my first thought...A week ago...

Any other suggestions guys?
 
As a trial and error thing, here's what I'd try.

1. Remove the comments from the SSI.
2. Make the href in the anchor something other than a string that contains a #
3. Instead of include virtual, use include file.

I'm of the opinion that for some reason the comments are the problem, (at least the starting comment).

By the way, cool looking site, you spelled "advertise" incorrectly though in "adverise here"[shock]



[monkey][snake] <.
 
Have you sorted it, the chrs no longer appear in IE6.
I don't do much Javascript but find it surprising that the validator doesn't ignore code within script tags.
Could that be a DOCTYPE issue?


Keith
 
The code within the script tags is supposed to be CDATA commented out to avoid validation parsing.

[monkey][snake] <.
 
I like the look of your site, I usually avoid black backgrounds but yours works. You knew there was a criticism coming didn't you, not really a criticism but older guys like me don't see as well as we used to. The small red links are hard to read especially as they are underlined.
Other wise your site is eye catching.

Keith
 
I got the advertisements to work by doing an iFrame - not the way I wanted to do it.

Now however, in my header include it's doing the same thing. I was using Expression Web as a WYSIWYG editor with my partner to quickly add stuff like advertisements, etc. into the header file and now it's kicking back those characters too. Again, they don't show in the original html but do show once the page is published.

I tried include file instead of include virtual - same contents appear but still has the odd characters.

I have also added the CDATA comment so the javascript code doesn't parse.

P.S. Thanks for liking the site design - I've been working on it with a partner for a LONG time and this is my first real attempt at doing a css based design (trying to stray away from html designs and inline css for that matter) and use an external stylesheet for easy updating.

Is there a bug anyone knows about with invisible characters in Expression Web or general errrors that would cause this behavior?
 
Just to spread the love, I have found out how to fix it...

To fix it you have to manually open all pages ‘pieced-together’ by php or whatever SSI you use in Notepad, and then proceed to save them as “ANSI” files instead of unicode.. Then get back to work.


Thanks guys. What a bummer - Expression Web is already failing on so many levels with these bugs...
 
WYSIWYG's are good tools for learning HTML syntax but there comes a time to break away from them and do the coding by hand. It is much more flexible. At least you have solved that problem and so you are ready move on to the next one.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top