Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Executing Scripts Without Include() Function, php function to execute a script w/o showing html markup
snlildude87
post Apr 19 2005, 04:39 AM
Post #1


Moderator
***************

Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Hi guys. I have another newbish PHP question. laugh.gif

Today, I decided to make a new navigation bar for my site. It doesn't look good because I just started learning Flash today, so I was basically feeling my way around the application. Anyways, if you use Flash and you try to validate your site at http://w3.validator.org, you get a lot of errors for some weird reason. So I was thinking about separating the markup for embed Flash from the rest of the site's source code.

The problem with that is that I don't know a PHP function that will include, or execute a file, without showing the HTML of the included file. The only function I can think of is the include() function, but that shows the markup.

Another alternative would be to make a JavaScript include. The problem with this is that some users have their JavaScript turned off because JS can do some pretty annoying stuff. If JS is turned off, there would be no navigation, and my precious users will be left in the dark (kind of like I was today with Flash). laugh.gif

Any suggestions?

Thanks smile.gif
Go to the top of the page
 
+Quote Post
Spectre
post Apr 19 2005, 06:13 AM
Post #2


Privileged Member
*********

Group: Members
Posts: 874
Joined: 30-July 04
Member No.: 246



Unless I've misunderstood what you're asking, it's impossible. From what I gather, you want to actually execute a file from within PHP - now whilst that in itself is possible, it will only occur on the server, so the visitor won't even know it's happened (unless an error or other output is returned).

If you want to use Flash within a web page, then yes, you do have to have the markup to inform the browswer you want it displayed and where.

Anyway, although the validator is certainly a useful resource, your HTML (or XHTML or whatever you're using) doesn't have to be strict. The average web browser is much, much more forgiving than W3 is.
Go to the top of the page
 
+Quote Post
karlo
post Apr 19 2005, 08:45 AM
Post #3


Privileged Member
*********

Group: Members
Posts: 618
Joined: 30-October 04
From: Philippines
Member No.: 2,049



QUOTE(snlildude87 @ Apr 19 2005, 12:39 PM)
Hi guys. I have another newbish PHP question. laugh.gif

Today, I decided to make a new navigation bar for my site. It doesn't look good because I just started learning Flash today, so I was basically feeling my way around the application. Anyways, if you use Flash and you try to validate your site at http://w3.validator.org, you get a lot of errors for some weird reason. So I was thinking about separating the markup for embed Flash from the rest of the site's source code.

The problem with that is that I don't know a PHP function that will include, or execute a file, without showing the HTML of the included file. The only function I can think of is the include() function, but that shows the markup.

Another alternative would be to make a JavaScript include. The problem with this is that some users have their JavaScript turned off because JS can do some pretty annoying stuff. If JS is turned off, there would be no navigation, and my precious users will be left in the dark (kind of like I was today with Flash). laugh.gif

Any suggestions?

Thanks smile.gif
*


please be more specific about your question in php. and also, don't use the font tag.
Go to the top of the page
 
+Quote Post
snlildude87
post Apr 19 2005, 11:26 AM
Post #4


Moderator
***************

Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



QUOTE(karlo @ Apr 19 2005, 05:45 AM)
please be more specific about your question in php. and also, don't use the font tag.
*


The only reason I used the font tag is because the Code tag breaks the line, so using it only for a small line of code is not efficient at all. I'll give you an example:

[quote]Okay, recently, I tried the
CODE
<a>
tag with HTML, but I don't know all the attributes. I know there is the
CODE
href
attribute, but are there more? Will the
CODE
title
attribute work at all? Can you use the
CODE
<embed
tags nested in the
CODE
<a>
tag as well?[/code]

See what I mean?

And Spectre, thanks for your input. smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. where did you learn html from?(86)
  2. Some Php Good Scripts(6)
  3. Does Anyone Know Where I Can Get A Free Html Maker(15)
  4. Web Surfing- Script Needed(2)
  5. Delay X Seconds In Flash(1)
  6. Verifying Email Addresses(9)
  7. Watermark Your Image With Simple Php Script(35)
  8. Wanting To Touch Up/learn My Html Again(27)
  9. Psd --> Editable Html(3)
  10. Php Scripts And Website Templates(7)
  11. Where Is There A Good Site To Learn Web Html?(20)
  12. Php Downloads Script(4)
  13. What Is The Best Free Html Editor?(20)
  14. Guessing Php Script(2)
  15. Add Flashing Inbox To Invisionfree Forum(2)
  1. PHP Function To Add Previous and Next Page Feature(2)
  2. Php Guest Online Script(3)
  3. How To Make Php Newsletter Script(3)
  4. Making A Picture Viewer Website(3)
  5. Sitepoint: The Ultimate Html Reference(0)
  6. Html, Xhtml, And Css, Sixth Edition (visual Quickstart Guide) Review(0)
  7. Html Based Emails On Hotmail(0)
  8. Flippingbook Html Edition(0)
  9. Browser Compatibility Problem With Firefox - Javascript + Css(3)
  10. Seeking Help With Javascript(1)
  11. Free Php Scripts(1)
  12. Create Dynamic Html/php Pages Using Simple Vb.net Code(1)
  13. Some Questions On Html(6)


 



- Lo-Fi Version Time is now: 7th September 2008 - 03:43 AM