• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

At my wits end

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been looking for help everywhere on this, and can't find an answer.

I'm trying to set the value of an object's parameter, so that it will change based on a button the user clicks, which gives the url for a .mp3. So far, I've tried this:



With this as the object:



When the alert comes up, it gives the correct string, and the flash-mp3-player thingie gets the very first file, and can play it. However, all the parameters for the colors, etc., aren't there, and it will only play the first .mp3, no others, and doesn't change. So something is wrong.

I'm willing to just create this object each time from scratch, but I don't know how to do that either.

Help.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

This is JavaScript, not Java. JavaScript is something totally different than Java, despite the similarity in names.

We do have a forum about HTML and JavaScript here, I will move your question to it.
 
Jeffrey Ellis
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah. Moved. Thanks.
 
Jeffrey Ellis
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesper--

I've been asking this question everywhere, and no one seems to know the answer. Am I stating it incorrectly, or is it just impossible to do, or... what am I missing?
 
Jeffrey Ellis
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nm. Got it. Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you care to share your solution?
 
Jeffrey Ellis
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure.

Basically, I realized that you could just put all the param's in data, just like any other object. So I constructed a var with all the different attributes I wanted/needed, and then just put it all into .data, and got rid of the param's all together.

Hence:


This works perfectly.




 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic