PDA

View Full Version : I am newb


Pace
10-07-2002, 09:35 PM
can someone tell me how to make a button to turn background music on and off?

i think i got the onClick part right, but what's the object name for background music?

-Pace

btw, cool forums.

inkedmn
10-07-2002, 10:00 PM
are you able to start the music playing? i'd be willing to guess that it's probably the same object...

if it's not too long, post your code here so we can have a peek...

Pace
10-08-2002, 09:48 AM
<form>
<input type="button" value="click here" onClick="bgsound='music.mp3'">
</form>

that's what i have now. I really have no idea what to put in onClick=" "

nothing plays now, but before i had:

<body bgsound="music.mp3"> and it would play, but i want to have the option of turning it on or off.

-Pace

Halide
10-08-2002, 10:21 AM
oh, some javascript hmm

the onClick html tag contains the actual javascript, and I don't think you can start/stop it like that... unless you use the embedded sound player with the play/stop buttons... :D (btw, hi pace)

gish
10-08-2002, 11:17 AM
you will need to do this...
-----------------------------------------

<script language="javascript">
funtion music(){
// code to play music here;
}
</script>

<form>
<input type="button" value="click here" onClick="music()">
</form>

Pace
10-08-2002, 07:05 PM
wow i should've been able to figure that out :rolleyes:

thanks :>

-Pace

gish
10-08-2002, 07:07 PM
no prob......

Pace
10-08-2002, 07:13 PM
fast reply :]

how i make clickable links on my sig?

-Pace

gish
10-08-2002, 07:25 PM
[u_rl]address in here[/_url]
take out the _ in each tag

Silver_Coder
01-22-2004, 07:13 PM
Wow I came in to help and I find Gish on top of things? Well maybe you could help me as well?