HighDots Forums  

Re: Executing php code within an iframe

alt.html alt.html


Discuss Re: Executing php code within an iframe in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-10-2006 , 09:15 PM






Nospam wrote:

Quote:
Basically I have a php script that shows an image:

?php

echo "<img src='http://www.example.com/image1.jpg' width='60' height='60'>";

?

I also have an iframe that has this:

iframe src="http://www.example.com/script1.php"></iframe

However the image is not displayed at all (i.e the script is not run, but it
runs if I run it offline)

I am wondering what needs to be done for the script to run online
Why the IFRAME at all??? Just

<?php include('script1.php'); ?>

and be done with it!



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #2  
Old   
Nospam
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-11-2006 , 05:54 AM







"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote

Quote:
Nospam wrote:

Basically I have a php script that shows an image:

?php

echo "<img src='http://www.example.com/image1.jpg' width='60'
height='60'>";

?

I also have an iframe that has this:

iframe src="http://www.example.com/script1.php"></iframe

However the image is not displayed at all (i.e the script is not run,
but it
runs if I run it offline)

I am wondering what needs to be done for the script to run online

Why the IFRAME at all??? Just

?php include('script1.php'); ?

and be done with it!
I would like anyone viewing the page to be redirected to the php script
within the iframe (or directed still somehow on the same page, was told an
iframe could do this)




Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-11-2006 , 12:21 PM



Nospam wrote:
Quote:
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote in message
news:dc5b3$452c454e$40cba77e$21351 (AT) NAXS (DOT) COM...
Nospam wrote:

Basically I have a php script that shows an image:

?php

echo "<img src='http://www.example.com/image1.jpg' width='60'
height='60'>";
?

I also have an iframe that has this:

iframe src="http://www.example.com/script1.php"></iframe

However the image is not displayed at all (i.e the script is not run,
but it
runs if I run it offline)

I am wondering what needs to be done for the script to run online
Why the IFRAME at all??? Just

?php include('script1.php'); ?

and be done with it!

I would like anyone viewing the page to be redirected to the php script
within the iframe (or directed still somehow on the same page, was told an
iframe could do this)
I don't know what you mean by "directed" and "redirected". From your
previous message I assumed you meant that script1.php was the file that
contained the code you showed us that generates the IMG tag. So the
response from script1.php should be displayed inside the IFRAME. No
redirection is involved in that.

Besides that, a single IMG tag is not a valid HTML document. Technically
you can get along with just a DOCTYPE declaration and a TITLE tag in
addition to the IMG tag.

I agree with Jonathan: I still can't figure out what you're really
trying to accomplish or why you need an IFRAME to do it.


Reply With Quote
  #4  
Old   
Bergamot
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-11-2006 , 05:50 PM



Nospam wrote:
Quote:
I should have mentioned that the iframe should have two images, one the
initial image, and the second the redirected image contained in script1.php
You seem to be misusing the word "redirected", but nobody knows for
sure. Post a URL.

--
Berg


Reply With Quote
  #5  
Old   
Bergamot
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-12-2006 , 12:14 PM



Nospam wrote:
Quote:
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote in message
news:84322$452e2804$40cba7a4$24654 (AT) NAXS (DOT) COM...

post a URL...

This is what I am trying to accomplish:
Looks more like you are trying to fix the wrong problem. You've decided
on a solution before you've even figured out what the real goal is.

Don't post code, post a URL.

--
Berg


Reply With Quote
  #6  
Old   
I V
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-16-2006 , 12:40 AM



On Sun, 15 Oct 2006 21:36:01 -0400, Jonathan N. Little wrote:
Quote:
Whow guys, count to ten, take deep breaths or something! Just for
clarification in 4.01 strict the HTML, HEAD and BODY elements are all
optional
I don't think that's quite right. The HEAD _element_ is required,
but neither start nor end tags are required:

--- begin quote ---
<!ENTITY % html.content "HEAD, BODY">

<!ELEMENT HTML O O (%html.content -- document root element -->
--- end quote ---
(from http://www.w3.org/TR/html4/sgml/dtd.html#html.content )

Quote:
However if you use a TITLE, both opening and closing tag are required
and is to be within the HEAD.
http://www.w3.org/TR/html4/struct/gl...tml#edef-TITLE
The TITLE element is also required:

--- begin quote ---
<!ENTITY % head.content "TITLE & BASE?">

<!ELEMENT HEAD O O (%head.content +(%head.misc -- document head -->
--- end quote ---
(from http://www.w3.org/TR/html4/sgml/dtd.html#head.content )

And further:

--- begin quote ---
Every HTML document must have a TITLE element in the HEAD section.
--- end quote ---
(from http://www.w3.org/TR/html4/struct/gl...tml#edef-TITLE )

jojo is quite right here.



Reply With Quote
  #7  
Old   
jojo
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-16-2006 , 03:19 AM



I V wrote:

Quote:
Whow guys, count to ten, take deep breaths or something! Just for
clarification in 4.01 strict the HTML, HEAD and BODY elements are all
optional

I don't think that's quite right. The HEAD _element_ is required,
but neither start nor end tags are required:
[quote from from http://www.w3.org/TR/html4/sgml/dtd.html#html.content ]

Quote:
However if you use a TITLE, both opening and closing tag are required
and is to be within the HEAD.
http://www.w3.org/TR/html4/struct/gl...tml#edef-TITLE

The TITLE element is also required:
[quotes from (from http://www.w3.org/TR/html4/sgml/dtd.html#head.content
and from http://www.w3.org/TR/html4/struct/gl...tml#edef-TITLE ]

Quote:
jojo is quite right here.
Just for the ones who are interested in: a document without a <head> but
a <title> validates fine. A document with a <head> but no <title> or
with neither a head nor a title doesn't. Try it out:

<title> only:
http://validator.w3.org/check?uri=ww..._only.htm&ss=1

<head> only:
http://validator.w3.org/check?uri=ww..._only.htm&ss=1

neither <head> nor <title>:
http://validator.w3.org/check?uri=ww...r_nor.htm&ss=1


Reply With Quote
  #8  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Executing php code within an iframe - 10-16-2006 , 07:11 AM




Steve wrote:

Quote:
title is NOT required. learn w3c html 101 and get a fucking life...as well
as a fucking clue.
Your cluelessness about HTML is tautological with your abuse.

<plonk>



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.