View Full Version : JavaScript.. need help.
empulse
09-15-2006, 03:53 PM
<p>I need help with some java script, I am working on a webpage for myself and want to add an XM Radio Player (For users with XM Online accounts) to my site, there are a few stand alone Yahoo Widget players, and I am/have removed the Widget part.</p><p>I want the player to open in a new window, i can do that , but i need the person to enter their username and pass everytime, which i don't know how to do. My thought was to maybe to use a cookie so they don't have to enter it everytime, but i am afraid that could be exploited somehow, and peoples user names and pass's could get jacked. </p><p>Any help would be greatly appreciated.</p><p> </p><p>emPulse</p>
jeffdwright2001
09-15-2006, 04:25 PM
<p>This is the only Java script I know and it's pretty dated (1980's I believe):</p><p>"Hi. We're here today at (insert name of restaurant), where we've switched these diners' regular coffee with Folgers Crystals. Let's see if they can taste the difference." </p><p><img height="151" src="http://www.listen-up.org/kitty/beads/tea/coffee.gif" width="91" border="0" /></p>
samnyc
09-15-2006, 04:30 PM
<p>My heart ... can't breath.</p><p> </p>
feralBoy
09-15-2006, 04:47 PM
Can we have the link to the website, or the code? Can't you use an HTML form to collect username and password?
empulse
09-15-2006, 06:20 PM
<p>i have read a little and i believe i need to embed it in a page that will open in a separate window, and to embed it i need to put the .JS files into a .JAR container..</p><p>here is a link to the working folder for the javascript.</p><p> </p><p>www.whowantscake.org/files/JSXMPlayer.rar</p>
<span class=post_edited>This message was edited by empulse on 9-15-06 @ 10:22 PM</span>
SatCam
09-16-2006, 09:01 AM
You'll probably need some sort of server-side scripting. Not sure what you want: are the usernames/pws unique to your site, or are they the XM login info?
I'm sure XM login info is sensitive so you'll have to know what you're doing. If you fuck up, you'll have a lot of angry people on your hands.
You can accept passwords using Javascript (very insecure), HTTP (using something like Apache's <a href="http://www.euronet.nl/~arnow/htpasswd/documentation.html">.htpasswd</a>) or through server-side scripting like PHP. Using PHP would be your best choice, but you really have to know what you're doing.
Again, if this is XM login info, you'll need to take extra care of it. Do not store an unencrypted password (and probably not even an encrypted password) in a cookie. Store it in a database.
Also, .jar files have to do with Java. I think you might be getting Java and Javascript confused. Java is the OOP programming language that has a web implementation called Java Server Pages (like PHP, ASP, CFM, etc...) whereas Javascript is a client-side language that can be seen by the client in the source of the webpage.
empulse
09-16-2006, 04:56 PM
<p>you are correct on just about all of it. yes i am going to have to get username and pass for XM ONline, that is who it is thru, just not using their player. I just have no/zero java/javascript knowledge (no i didn't know diff either). I have been reading up on it, i just need to pass the passwod to XM's service, and i would prefer not to even touch the users info if i can help it. I just know that this JS writes the username and pass when you first enter it, and creates a file to store it, i would like to remove that from the script, i thought about having it write a cookie to the user for storage so they wouldn't have to enter it everytime.</p><p>but, i would be happy with just a set session length for the script (AirAmerica has 3 hour limit, then u log back in..)</p><p>i will keep reading, i am not asking someone to do it for me, i would prefer to figure it out. that being said, if you know javascript and have an answer.... i wouldn't refuse it..</p><p> </p><p>thank u for your help.</p>
vBulletin® v3.7.0, Copyright ©2000-2025, Jelsoft Enterprises Ltd.