FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to transfer value to iframe?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to transfer value to iframe? [message #183128 is a reply to message #183126] Thu, 10 October 2013 04:01 Go to previous messageGo to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
On Thu, 10 Oct 2013 14:20:56 +1030, David Robley wrote:

> richard wrote:
>
>> On Thu, 10 Oct 2013 13:43:42 +1030, David Robley wrote:
>>
>>> richard wrote:
>>>
>>>> http://mroldies.net/200/audiox.php
>>>>
>>>> First, the sound will work only in firefox.
>>>> So don't go bashing me for that.
>>>>
>>>> I have it set up so that a shuffled array will be displayed any time the
>>>> page is loaded. Hopefully.
>>>> What I want to do is to ensure that item one in the menu list will match
>>>> what is in the iframe.
>>>>
>>>> $_get[] relies on the values being transferred via a link.
>>>
>>> Not so - it uses the query string -
>>> https://en.wikipedia.org/wiki/Query_string - which may be passed via a
>>> clickable link, or as part of a URL
>>>
>>>> At this point, no link has been clicked on to set the value.
>>>> So how do I properly set the intitial value?
>>>
>>> <iframe id="x1" src="audiox1.php?a=foo&b=bar&c=baz"
>>> name="alpha"></iframe>
>>>
>>> Simply pass the value(s) you need to utilise in the iframe
>>
>> I tried this
>>
>> <iframe id="x1" src="audiox1.php?asong=songid" name="alpha"></iframe>
>>
>>
>> Assigining songid as $songid=$play[0];
>>
>> Retrieving value through
>>
>>
>> $number=$_GET["asong"];
>>
>> echo $number;
>>
>>
>>
>> Results in "songid" being printed.
>
> Not surprisingly, because that is what you have set as the value for asong
> in the iframe link. If you want to pass a value contained in a variable, you
> should use the variable, not a string. Look closely at what you are doing
> when calling the iframe.
>
> <iframe id="x1" src="audiox1.php?asong=songid" name="alpha"></iframe>

so my question kind of still stands.
how do I make asong=?????? as the given initial value of the shuffled
array?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: please unsubscribe me
Next Topic: Can't change upload_max_filesize
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:54:05 GMT 2024

Total time taken to generate the page: 0.04539 seconds