try something like this on ur document.ready event.. Remember to remove your href="javascript:popUp('sound.html')" from your anchor and replace it with "#". Untested, but this should get u in the right direction.
var on = false; $("#gomusic").click(function() { if(!on) { popUp("sound.html"); $(this).text("sound off"); on = true; } else { sound.close(); $(this).text("sound on"); on = false; } return false; }); On 7/5/07, tlob <[EMAIL PROTECTED]> wrote:
anyone? too simple? ;-) thx for the 1.1.3.1 btw.! On 4 Jul., 14:43, tlob <[EMAIL PROTECTED]> wrote: > Hey there > > I have a simple beginner problem. I have a link, that is opening a new > windows with flash sound in it.... the client wants that! hmpff...... > > After I clicked the link "sound on" the a href text should change to > sound off. also the link itself should change to > javascript:close.windowname; > > You can find my attempt herehttp://siggibucher.com/preview/soundtest.html > > 1. Hardcoded Link <a href="javascript:popUp('sound.html')" > id="gomusic">sound on</a> > 2. User KLICK (Popup opens) > 3. Link change to <a href="javascript:sound.close()" > id="gomusic">sound off</a> > 4. User KLICK (Popup close) > 5. Link change to <a href="javascript:popUp('sound.html')" > id="gomusic">sound on</a> > repeat from 2. > > got it? > > something is broken, and I think I am doing some basic > mistakes....beginner..... > can someone enlighten me? > > Thank you very much > Thomas