Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7803

Re: passing values into javascript

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: passing values into javascript
Date 2012-12-14 21:52 -0500
Organization A noiseless patient Spider
Message-ID <kagomk$o0$1@dont-email.me> (permalink)
References <14k13t3ghfii5.rtu07anokn7j$.dlg@40tude.net>

Show all headers | View raw


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@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

passing values into javascript richard <noreply@example.com> - 2012-12-14 20:03 -0500
  Re: passing values into javascript Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-14 21:52 -0500
    Re: passing values into javascript richard <noreply@example.com> - 2012-12-14 22:09 -0500
      Re: passing values into javascript Denis McMahon <denismfmcmahon@gmail.com> - 2012-12-15 13:10 +0000
        Re: passing values into javascript Tim Streater <timstreater@greenbee.net> - 2012-12-15 13:22 +0000
        Re: passing values into javascript Denis McMahon <denismfmcmahon@gmail.com> - 2012-12-15 21:36 +0000
    Re: passing values into javascript Allodoxaphobia <knock_yourself_out@example.net> - 2012-12-15 16:40 +0000
      Re: passing values into javascript Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-15 19:22 -0500
    Re: passing values into javascript richard <noreply@example.com> - 2012-12-15 23:39 -0500
      Re: passing values into javascript "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-12-16 06:21 +0000
        Re: passing values into javascript Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-16 09:12 -0500
          Re: passing values into javascript richard <noreply@example.com> - 2012-12-16 13:50 -0500
      Re: passing values into javascript "P E Schoen" <paul@peschoen.com> - 2012-12-19 18:30 -0500

csiph-web