Any Website Makers here? Question... - by 37637598
Nameless Voice on 9/9/2008 at 16:28
No, I don't think I quite made myself clear.
I prefer server-side code to client-side because it doesn't require the client to have JavaScript enabled. That's a moot point here, though, because the flash player will need JavaScript anyway.
I have nothing against JavaScript in itself, I just prefer to avoid using it for essential site functionality if possible.
addink on 9/9/2008 at 17:21
I got that, I just responded to your "it's messy IMO" comment.
I myself try to avoid javascript dependency whenever possible. Being able to serve those who disabled javascript is just a small bonus, though, how many people have javascript disabled nowadays? Even modern screenreaders have hardly any issue with javascript.
I mainly try to avoid javascript dependency for spiderability. Which indeed might be a feature 37637598's playlist page could benefit from, come to think about it.
Nameless Voice on 9/9/2008 at 17:28
I know at least two crazies who purposefully disable JavaScript in their browser unless they need it for a site. Not quite sure why I should bother catering for such people, but it's still good practice to avoid relying soley on JS.
For the playlist page, a server-side script would be cleaner anyway, since the method you described would need an AJAX request - an extra request to the server every time the page is loaded - and would slow down load time because of it. (On the other hand, the initial page would load quickly and you could have a nice 'loading playlist' animation.)
addink on 9/9/2008 at 17:59
Agreed, but download speed of a short textfile hardly impacts display speed, probably will be comparable with the wait time involved with the download of an external css.
Also it doesn't need to be asynchronous. The data file could be loaded synchronously in the header.
But, anyway, whatever method 37637598 ends up using, the very first version best be developed with a static hardcoded list. No need to complicate before the core function is in place.
37637598 on 9/9/2008 at 19:26
I don't need the list to load from the txt file when a user visits the page, I just need it to load from the text file one time... The only time I will need it to load from the text file, is when I add a song in which case I will manually re-load it from the text file and upload the updated HTML to the website. The text file won't evenm need to be uploaded on the server because when I add a song, I'll update it on my computer.
37637598 on 13/9/2008 at 17:58
Anyone with basic PHP and Flash knowledge willing to help me out through messenger or e-mail? It would be much appreciated! I'll list your name as one of the coders on my web site so you can put it on your portfolio as well.
37637598 on 15/9/2008 at 19:04
Okay, I figured most of it out so far, if anyone is interested in how, I can explain by request.
I have however run into a new problem. I cannot get a simple line of code to work:
okay that should work
Code:
a href="javascript:;" onClick="document.GetElementByID('MediaPlayer1').URL='ALONEINSHAME.mp3',">Alone In Shame</a
This line of code should make 'MediaPlayer1' load the new URL, 'ALONEINSHAME.mp3' but when I click it in my browser, nothing happens on the page, but the status bar says 'Error on page'.
I'm wondering if there is an MM_ script that I HAVE to use in dreamweaver in order for this to work... Any ideas?
BEAR on 15/9/2008 at 19:16
Whatever you put into the previous post fucked up the tables a little bit, gotta be careful posting HTML directly in forum messages. Try using a code box instead.
Code:
Surrund your code with code and /code tags, or select the text and click the # button in the post screen (next to the <> icon)
37637598 on 15/9/2008 at 19:32
my bad, I had code boxes but I used a \ instead of a / to end it so... It should all be fixed now.
Nameless Voice on 15/9/2008 at 23:20
There is no function GetElementByID. You need getElementById (lowercase 'd').
Secondly, you should be testing this in Firefox or Opera, not IE - they give much better error reporting.
You can still get a better description of the error by double-clicking on the "errors on page" icon in IE.