Jump to content

please help ..only 1 error to go ..


Str

Recommended Posts

Hi all.I figured out most of my errors in the attemp to have a Xhtml site but cant figure out my last error ..I inserted a script that shows how much users are on my site the script works but I gat a error if I try to validate my site ..the script that works is <script src="online.php?so=1"></script>I figured out that I would need to add<script type= but can't get the right combination to get the script to work AND get my site to be xhtml valid I got this ...<script type="text/src"src="online.php?so=1"></script>My site is valid with this ..but the script dosent work any help would be greatly appreciated thanks

Link to comment
Share on other sites

I got it how it works (sincerely I never used to insert PHP files like this), the PHP file returns a javascript code, so<script type="text/javascript" src="online.php?so=1"></script>should work.

Link to comment
Share on other sites

I got it how it works (sincerely I never used to insert PHP files like this), the PHP file returns a javascript code, so<script type="text/javascript" src="online.php?so=1"></script>should work.

Is this for real :) I've never heard of it either...
Link to comment
Share on other sites

Javascript code? thats is weird

  I got it how it works (sincerely I never used to insert PHP files like this), the PHP file returns a javascript code, so<script type="text/javascript" src="online.php?so=1"></script>should work.
I wonder If asp workd the same way? vbscript code?
Link to comment
Share on other sites

Well it should. What the "type" attribute in the <script> does is to tell the browser what content the file has. Scince server side scripts are processed on the server and the browser gets a client side script code, the browser should be aware what is the content it sees... it our case JavaScript, but it could be VBScript as well.

Link to comment
Share on other sites

Boen is right, you can have any server-side script produce any output you want. Just because the script is a PHP script doesn't say anything about what the output is. Keep in mind that even though you execute a PHP script and typically get back HTML doesn't mean that PHP only outputs HTML, if you tell it to echo javascript code then that's what it does. It does whatever you tell it. Here's an example of a PHP script, but instead of outputting textual data it fetches an image and streams that instead (not always quickly):http://www.outpostmultimedia.com/gurasich/...g.php?imgID=341Using this as an image src works perfectly fine:

<img src="http://www.outpostmultimedia.com/gurasich/view_img.php?imgID=341">

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...