Re: passing values into javascript [message #179871 is a reply to message #179870] |
Sat, 15 December 2012 02:52 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 12/14/2012 8:03 PM, richard wrote:
> <script type="text/javascript">AudioPlayer.embed("audioplayer_1",
> {soundFile: "http://mroldies.net/mp3/[value1]-[value2].mp3"})</script>
>
> Given this line of script which is from the wordpress standalone
> audioplayer, how could I pass a value from page one to page two so that the
> two values in brackets are replaced with the proper information?
>
>
> http://mroldies.net/1960/all60.html
>
> What I am looking at doing is, linking each song name to one php page.
>
> So that I only have to have one line of code per artist.
> Rather than having a single script per song.
>
> I don't care to read your flames on the page showing an under construction
> page for most of the links. I have it that way for a reason. Or any of your
> other trite little flames that you do just to harass me with.
>
PHP runs on the server, and doesn't know anything about javascript
(which runs on the client). The only way PHP can "pass values" to
javascript is to generate the data in the data which is sent to the client.
But since you're asking about how to do it in wordpress, I would highly
recommend you ask din a wordpress support group. They know their code
better than anyone else, and will know better than anyone else what you
have to do to get it to work in their environment.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|