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


Groups > comp.lang.javascript > #21935

Re: Using html5 data attribute

Message-ID <1472452.mSG3TjeU6D@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-11-08 18:37 +0100
Subject Re: Using html5 data attribute
Newsgroups comp.lang.javascript
References <167ecvxd9ci26$.dn66xn5j59bv.dlg@40tude.net> <0.5ee22dfa29786aa02d1a.20131108170431GMT.87r4aqvn8g.fsf@bsb.me.uk>

Show all headers | View raw


Ben Bacarisse wrote:

> richard <noreply@example.com> writes:
> <snip>
>> <a class='aplay' href='#' data-src='http://mroldies.net/200/6020.mp3'
>> data-info="6020">
>>
>> Problem is, I have seen dozens of sites discuss the recovery of the
>> attribute. But then, they leave out how you use it.
>> Such as the simple act of printing that information.
> 
> It's not at all clear that you want to do this.  You've posted other
> fragments here and in a PHP groups that provide enough information that
> I think the problem is not *how* to x, y or z, what *what* to do.
> 
> I don't think you have worked out the design yet -- you seem to be try
> one thing and then another.  If I were you, I'd post in a very general
> group like alt.html to talk about the design.  That way you can settle
> on what parts need server-side code and what parts need client-side
> code.

No need to leave the Big8, though; there is 
comp.infosystems.www.authoring.html.  In this case, the “very general group” 
would be comp.infosystems.www.authoring.misc.

However, keep in mind that this particular OP has a long newsgroup history 
of not RTFM, RTFFAQ, of ignoring any advice, and getting nasty when being 
told that this approach is a Bad Idea, which does not bode well for the 
future.  Like many nice and knowledgable people before you, you might be 
wasting your precious free time with this one.  You have been warned.
 
>> The php page contains the full array so there is no database involved.
>> I want to match photos with the current playing song.
>> The way I have it set up, photo names abd song names are equal.
>> i.e. 6020.mp3 will pair with 6020.jpg.
>>
>> So how do I do this?
> 
> I would not use a client-side script.  I'd make the "play" link to be a
> server-generated page that has the song and the pictures in it.

With XHR you can have both.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


Thread

Using html5 data attribute richard <noreply@example.com> - 2013-11-08 09:26 -0500
  Re: Using html5 data attribute Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-08 17:04 +0000
    Re: Using html5 data attribute Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-11-08 18:37 +0100
      Re: Using html5 data attribute Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-08 18:36 +0000
      Re: Using html5 data attribute John Harris <niam@jghnorth.org.uk.invalid> - 2013-11-09 09:59 +0000
  Re: Using html5 data attribute Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-08 17:49 +0000

csiph-web