|
Posted by Tedd on 10/11/06 18:59
On Wed, 11 Oct 2006 12:21:51 -0400, Harlan Messinger wrote...
>
>Nospam wrote:
>> "Jonathan N. Little" <lws4art@centralva.net> wrote in message
>> news:dc5b3$452c454e$40cba77e$21351@NAXS.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.
Wouldn't the src file in the <iframe> be its own separate document? If so you
can try accessing the http://www.example.com/script1.php address directly and
see if it loads correctly. Like you mentioned though it's only outputting an
<img> tag so it's missing the other HTML components. If you just need to
dynamically display a graphic you can do that with PHP without using iframes.
Tedd
--
Help a Community by Participating in Ours
We donate your subscription fees to the charity you choose
100% of your first month, 10% thereafter.
http://newsguy.com/charity.asp
[Back to original message]
|