I'm having some trouble with my script tag. I'm trying to include a
piece of PHP text via the script tag by doing so:
<script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
This produces nothing, but I don't know why. I've even gone so far as
to make it as simple as putting a simple HTML string inside
Scripts.php, which it refuses to print out. Yet, this refuses to print
anything out.
I've gotten some sample code from some 80s toy site, and the string
they use which works is:
<script src="http://www.seibertron. com/news/include_news.ph p"></script>
I have no clue what the difference between these two strings is, and
it's infuriating. Does anybody know? Is there a PHP switch or
something? 14 3394 li************* **@yahoo.com (Liam Gibbs) wrote: I'm having some trouble with my script tag. I'm trying to include a piece of PHP text via the script tag by doing so:
<script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
This produces nothing, but I don't know why.
Browsers don't ordinarily know how to execute PHP. Even if they did,
you would have to *tell* them that the script is going to be PHP by
using the SCRIPT tag's TYPE attribute. If you're using a browser that
doesn't disqualify the SCRIPT tag altogether for omitting the required
TYPE attribute, it expects Javascript when no type is given
explicitly.
I've even gone so far as to make it as simple as putting a simple HTML string inside Scripts.php, which it refuses to print out. Yet, this refuses to print anything out.
I've gotten some sample code from some 80s toy site, and the string they use which works is:
<script src="http://www.seibertron. com/news/include_news.ph p"></script>
What site? URL?
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Liam Gibbs wrote: I'm having some trouble with my script tag. I'm trying to include a piece of PHP text via the script tag by doing so:
<script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
PHP is a server-side language interpreter.
I suppose you could try giving a "type" value, something like
type="text/php". I have no clue what the difference between these two strings is, and it's infuriating. Does anybody know? Is there a PHP switch or something?
Do you know what PHP is?
--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)
Liam Gibbs wrote: I'm having some trouble with my script tag. I'm trying to include a piece of PHP text via the script tag by doing so:
<script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
You appear not to know what PHP is. http://www.php.net/tut.php http://www.php.net/manual/en/
--
Mark.
Liam Gibbs wrote:
<snip> <script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
<snip> <script src="http://www.seibertron. com/news/include_news.ph p"></script>
If you enter:-
view-source: http://pinata.no-ip.org/~altmarvel/Scripts.php
- and:-
view-source: http://www.seibertron.com/news/include_news.php
- into the location/address bar of a web browser to view the material
actually being sent to the browser you will find that the first is
returning a fragment of HTML, while the second is returning valid
javascript source code.
The second works because the browser's javascript interpreter is able to
understand and execute javascript source code, while its interpretation
of an HTML fragment will be as a series of javascript syntax errors, and
it will terminate its attempt to execute the script at the first it
encounters.
Richard.
"Liam Gibbs" <li************ ***@yahoo.com> a écrit dans le message de
news:62******** *************** ***@posting.goo gle.com I'm having some trouble with my script tag. I'm trying to include a piece of PHP text via the script tag by doing so:
<script src="http://pinata.no-ip.org/~altmarvel/Scripts.php"></script>
This produces nothing, but I don't know why.
What are your exacts needs ?
If you want to include text produce by another web page, then <script
src...> is one of the solutions. Please read the recent thread
"Templates/inclusion in the new age" : http://www.google.fr/groups?hl=fr&lr...com%26rnum%3D1
If you choose to use script, then your php page should send to the browser
correct mime type and javascript code (document.write (...) )
Pierre Goiffon wrote:
<snip> ... , then your php page should send to the browser correct mime type and javascript code (document.write (...) )
There is no correct mime type for client-side javascript source.
Browsers appear to ignore content type headers sent in the context of
script elements.
Richard. li************* **@yahoo.com (Liam Gibbs) wrote in message news:<62******* *************** ****@posting.go ogle.com>... I'm having some trouble with my script tag.
You're unclear about the differences between server-side and
client-side scripting.
PHP is server-side only. <script> is client-side only.
_If_ your PHP code's function is to _make_ a client-side script
(sometimes called "meta-scripting"), then you might have a client-side
<script> that refers to a piece of server-side PHP. But what the
<script> element is referring to is the _output_ of the PHP script,
not its source code.
Ahhh.... I'm starting to see now. I was familiar with PHP, but not
with the SCRIPT tag. What I thought it would do is run the PHP on my
server, my server would spit the output to that page, and.... then a
whole bunch of stuff I was unclear about. I guess I have more muddling
to do now with JavaScript and so forth.
And I was unaware of the view-source thing. I'll also try that type
value.
Thanks all! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike Daniel |
last post by:
I am attempting to use document.write(pageVar) that displays a new html page
within a pop-up window and the popup is failing. Also note that pageVar is
a complete HTML page containing other java scripts.
Being a javascript newbie and after significant testing, I suspect that the
document.write fails after finding a </script> within pageVar.
Does a trick exist that enables one to slightly alter pageVar whereby
enabling...
|
by: bayouprophet |
last post by:
Cant get menu script to to put linked page in the same frame. I am
new to Java
and I am wondering what am I doing wrong? below are my java applet
file, frame.html file, and my text file and one of my link file that
should load next to the menu on the same page. And Thank You in
advance.
Here is my menu applet:
<html>
|
by: Allen |
last post by:
I am trying to add an additional photo/hyperlink to the company web
site (I didn't create it) without any luck. The mouseover feature
'highlights' pics by swapping them with another pic using this command
in some type of array. I added the mailbox in the lower left corner
(see link below)http://www.aamechanical.com/indextemp.htm
but I cannot get it to swap. Here is the code for the page:
Thanks for your help in advance
|
by: Water Cooler v2 |
last post by:
Questions:
1. Can there be more than a single script block in a given HEAD tag?
2. Can there be more than a single script block in a given BODY tag?
To test, I tried the following code. None of the script gets executed.
Can someone please give me a direction as to what I may be missing?
Thanks.
|
by: bilaribilari |
last post by:
Hi all,
I am using Tidy (C) for parsing html pages. I encountered a page that
has some script as follows:
<script>
....
var abc = "<script>some stuff here</" + "script>";
....
</script>
| |
by: thisis |
last post by:
Hi All,
i have this.asp page:
<script type="text/vbscript">
Function myFunc(val1ok, val2ok)
' do something ok
myFunc = " return something ok"
End Function
</script>
|
by: rsteph |
last post by:
I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop down menu to work.
If I put text between the <div id="datetime"></div> tags, the text shows up, but the javascript output being sent to those some divs doesn't seem to want to work. It should be showing up in the middle of the content pane, just below the first table box. (set by .css)
Here's...
|
by: Angus |
last post by:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of html is:
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
|
by: imtmub |
last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted.
Check this page for reference.
http://www.marco.com.cn/web-content/marco_re10.html
--------------------------------------------------------------
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Marco</title>
<!-- InstanceEndEditable -->
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script.
What You Need
Any recent...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |