Link96s
07-05-2003, 01:08 PM
Dose anybody have the code for opening up windows in a new box?
|
Click to See Complete Forum and Search --> : About Blank Link96s 07-05-2003, 01:08 PM Dose anybody have the code for opening up windows in a new box? Baby Jai 07-05-2003, 01:12 PM New box? you mean a pop up? Link96s 07-05-2003, 01:16 PM no there's a code so that when you go to a link it opens it up in a new window instead of chagings the browers address. Baby Jai 07-05-2003, 01:21 PM What designer are you using? you can make the target _new and it will open it up in new window Baby Jai 07-05-2003, 01:23 PM <a href="www.yoursite.com" target="_new">The name of the link</a> David Harrison 07-05-2003, 01:46 PM Try this code to see if this is what you mean: <script type="text/javascript"><!-- NewWindow = window.open("", "NewWindow", "width=200,height=150"); document.write('<html><head><title>Hi!!!</title></head><body>'); NewWindow.document.write('Page content goes here.'); NewWindow.document.write('</body></html>'); //--></script> Link96s 07-05-2003, 01:46 PM I'm just using geocities advanced editor on internat exploer, but my fraekin data transfer just went down, I knew that was goin happen I guess I just gotta wait to up grade, what I'm doin is broadcasting mp3's 'one at a time' for promotional use only, I need my links to open up in new windows so that, the song stays on. Baby Jai 07-05-2003, 02:09 PM hey lava, think thats a bit confusing for her, the other one will work just as well David Harrison 07-05-2003, 03:51 PM Perhaps you're right, it's just that about:blank was mentioned and by creating a new window on demand with js it saves creating a lot more windows by hand. Anyway, not trying to step on you're toes or anything, here's my code: First have all of the usual stuff: <html><head><title>Hi!!!</title> and then have this: <script type="text/javascript"><!-- function playmusic(name,file_type){ playmusicwin = window.open("", name, "toolbar=no,status=no, width=200, height=200"); playmusicwin.document.write("<html><head><title>"+name+"</title></head><body>"); playmusicwin.document.write('<embed src="'+name+'.'+file_type+'" width="100%" height="100%" autoplay="false">'); playmusicwin.document.write("</body></html>"); playmusicwin.document.close();} //--></script> don't change any of the above code, you won't need to (unless you wanna experiment a little with js). and then have: </head><body> All of you're content, and then: </body></html> now where ever you want a link to a music file have this: <a href="#" onclick="playmusic('123','mp3');return false;">Play 123.mp3</a> href="#" just means that the link does nothing (unless js is not-enabled in which case it will still appear to do nothing). the onclick is what you need to worry about, inside the onclick this is what you have: playmusic('123','mp3');return false; playmusic(); just refers to a function created in the head that opens a pop-up window. '123' is the name of the music file you want to open, so you might have 'Daniel Beddingfield - Gotta Get Through This'. 'mp3' is the file type, so you might have 'wav' or 'mid' etc. return false; you don't need to worry about. I've uploaded the entire example source so that you can see it all in one go, (it's shorter that it seems), rather than spaced out like it is here. Link96s 07-06-2003, 12:24 PM let me know how this works.... http://www.geocities.com/link96surviver Baby Jai 07-06-2003, 12:31 PM Oh man! whats up!!!!!!!!!!!!!!!!!!!!! Im dancing all over the joint in my chair! uuuuuuuuuughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. That beat is hot, Louie Devito? How did you embedd it with no player? Loving it, i love it so much i didnt even wantt o click another link! Is that a mpeg or midi? Link96s 07-06-2003, 12:57 PM hahaha it's an mp3.. DJ Santana... veiw the source David Harrison 07-06-2003, 03:12 PM I listened to that song, it's amazing. You upload more stuff like that and your site'll be the most popular on the web.:D :D :D Baby Jai 07-06-2003, 03:17 PM dont see it in the source. But i have over 1000 songs of hard house, and just one of them would take forever for someone to load, and what if they dont want to listen to it! Hmmm, got me thinking, did you change the bitrate so its a smaller file? David Harrison 07-06-2003, 03:21 PM He's using the bgsound element, not an embed. Baby Jai 07-06-2003, 03:51 PM looks like he exceed his limit, whats the code to puyt it in the background? David Harrison 07-06-2003, 04:19 PM <bgsound src="music.mp3" loop="n"> although I think it's IE only. For n you can have any positive whole number to make it play that many times, or -1 or infinite to make it loop infinitely. Link96s 07-07-2003, 08:33 AM yea it's just a simple tage ?BGSound="filename.mp3" loop="true"? and then just open up all your windows target= _"new" so that the music stays on... :) thank yall, next I need to add a BBS any advice for that? just so that other people can post links to there mp3's... khaki 07-07-2003, 09:11 AM hey lavalamp.... why'd you get shut down? (i was looking forward to hearing the tune that Baby Jai was going-off about :( ) (and by the way Baby Jai... your brother is adorable. Too young for me... but he's a heartbreaker :) ) not yet ready to resume work-mode... ;) k David Harrison 07-07-2003, 09:34 AM I didn't get shut down, I shut it down. Severe lack of interest. If you're really interested, (which if you are you're in a minority), you can go to it and type in /index2.html (couldn't be arsed deleting it). Anyway it wasn't me that had the song on my website, (I had crap jokes), it was Link96s's site, (amazing song). khaki 07-07-2003, 09:41 AM Anyway it wasn't me that had the song on my website oh (my bad) anyway.... I went to Link's site... didn't see (or hear) any music. (I guess I'm left out of this party :( ) probably a Moz thing :rolleyes: ... ;) k Link96s 07-07-2003, 11:31 AM what kind of browser do you have khaki?? DaveSW 07-07-2003, 11:44 AM Originally posted by khaki Moz mozilla. I'm in Opera and I get 'shall we play a game' and that's it. I'm currently downloading the space.mp3 which I presume is the bgsound you're refering to - it exceeds 4megs. Not surprised you exceeded your bandwidth with that in there!! Link96s 07-07-2003, 12:04 PM hmm, funny I've never heard of MOZ or Opera I just trying to attrack your average hey I got a pc and I wana surf the net and see whats out there.... so I am only supporting what is at my finger tips whiich is MS Internet Explorer and Window 98 on a Clone, but eventually I want to switch over to MAC whats the difference in the Mark up Language? Or is Opera and Moz just some business class thing. RE: Space.Mp3, But once it downloads I'm just the que, and it should play as soon as the site opens up. I'm gonan a upload a new one a little later. oops thats why it's XE... -pozer- David Harrison 07-07-2003, 01:14 PM Opera and Mozilla are just two different browsers, I've downloaded Opera 7 and that's OK but I'm waiting for Mozilla 1.4 to come out before I download that. By the way, what do you mean when you say: oops thats why it's XE... Link96s 07-07-2003, 01:36 PM dislexia... the new mp3's up :) DaveSW 07-07-2003, 03:20 PM Originally posted by lavalamp I'm waiting for Mozilla 1.4 to come out before I download that. Wait no longer http://www.mozilla.org/ David Harrison 07-07-2003, 03:47 PM Thanks for that, the last time I checked it was only up to RC 3. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |