Re: resolved?? Re: How to transfer value to iframe? [message #183189 is a reply to message #183176] |
Fri, 11 October 2013 23:04 |
Norman Peelman
Messages: 126 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 10/11/2013 11:39 AM, Denis McMahon wrote:
> On Thu, 10 Oct 2013 22:30:43 -0400, Norman Peelman wrote:
>
>> On 10/10/2013 07:43 PM, richard wrote:
>>> On Thu, 10 Oct 2013 18:13:30 -0400, Norman Peelman wrote:
>>>
>>>> On 10/10/2013 01:01 PM, richard wrote:
>>>> > On Wed, 9 Oct 2013 22:32:22 -0400, richard wrote:
>>>> >
>>>> >> http://mroldies.net/200/audiox.php
>>>> >>
>>>> >> First, the sound will work only in firefox.
>>>> >> So don't go bashing me for that.
>>>> >
>>>> >
>>>> > <?php $number=$numbers[0];
>>>> > echo '<iframe id="x1" src="audiox1.php?asong='.$number.'"
>>>> > name="alpha"></iframe>';
>>>> > ?>
>>>> >
>>>> > At least the first number is now displayed.
>>>> >
>>>> >
>>>> echo "<iframe id=x1
>>>> src='audiox1.php?asong=$number&name=$alpha'></iframe>";
>>>>
>>>>
>>>> No need to quote the *values*, they are sent as text. Not sure what
>>>> you're doing with -alpha-, I assume it is a variable as well...
>>>
>>> BULLSHIT!
>>> target="alpha" is a valid attribute, it is not a value. And there is no
>>> $ needed in the values section.
>>>
>>>
>> What in the world are you talking about? This has nothing to do with
>> the -target- attribute. You said 'At least the first number is now
>> displayed.' so I thought you would eventually substitute "alpha" with
>> some variable content so I suggested it that way, also fixing your URL
>> by adding the '&' between them.
>
> Norman, you've become confused by Richard's string quoting.
>
> His php strings are single quoted and he uses double quotes for his html.
>
> This means that php variable translation does not take place in the
> strings.
>
> In his initial example, name="alpha" was an attribute of the iframe, not
> part of the query string of the src url.
>
Yes, I actually see that now, but then again I usually keep my -id-
and -name- attributes together at the beginning of a tag. Is it required
no, but it sure does make for a bit of consistency when I'm looking for
bugs in the same typical places for the same types of data. It was a
misunderstanding on my part. As a general rule I shy away from doing a
lot of concatenation and "\" escaping as much as I possibly can. I also
try to sway others from it as well but, to each their own. It makes code
painful to debug.
--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
|
|
|