About Blank

liunx

Guest
Dose anybody have the code for opening up windows in a new box?<!--content-->New box? you mean a pop up?<!--content-->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.<!--content-->What designer are you using? you can make the target _new and it will open it up in new window<!--content--><a href=http://www.webdeveloper.com/forum/archive/index.php/"www.yoursite.com" target="_new">The name of the link</a><!--content-->Try this code to see if this is what you mean:<br />
<br />
<script type="text/javascript"><!--<br />
<br />
NewWindow = window.open("", "NewWindow", "width=200,height=150");<br />
document.write('<html><head><title>Hi!!!</title></head><body>');<br />
<br />
NewWindow.document.write('Page content goes here.');<br />
<br />
NewWindow.document.write('</body></html>');<br />
<br />
//--></script><!--content-->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.<!--content-->hey lava, think thats a bit confusing for her, the other one will work just as well<!--content-->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.<br />
<br />
Anyway, not trying to step on you're toes or anything, here's my code:<br />
<br />
First have all of the usual stuff:<br />
<br />
<html><head><title>Hi!!!</title><br />
<br />
and then have this:<br />
<br />
<script type="text/javascript"><!--<br />
<br />
function playmusic(name,file_type){<br />
<br />
playmusicwin = window.open("", name, "toolbar=no,status=no, width=200, height=200");<br />
playmusicwin.document.write("<html><head><title>"+name+"</title></head><body>");<br />
playmusicwin.document.write('<embed src=http://www.webdeveloper.com/forum/archive/index.php/"'+name+'.'+file_type+'" width="100%" height="100%" autoplay="false">');<br />
playmusicwin.document.write("</body></html>");<br />
playmusicwin.document.close();}<br />
<br />
//--></script><br />
<br />
don't change any of the above code, you won't need to (unless you wanna experiment a little with js).<br />
<br />
and then have:<br />
<br />
</head><body><br />
<br />
All of you're content, and then:<br />
<br />
</body></html><br />
<br />
<br />
now where ever you want a link to a music file have this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onclick="playmusic('123','mp3');return false;">Play 123.mp3</a><br />
<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"#" just means that the link does nothing (unless js is not-enabled in which case it will still appear to do nothing).<br />
<br />
the onclick is what you need to worry about, inside the onclick this is what you have:<br />
<br />
playmusic('123','mp3');return false;<br />
<br />
playmusic(); just refers to a function created in the head that opens a pop-up window.<br />
<br />
'123' is the name of the music file you want to open, so you might have 'Daniel Beddingfield - Gotta Get Through This'.<br />
<br />
'mp3' is the file type, so you might have 'wav' or 'mid' etc.<br />
<br />
return false; you don't need to worry about.<br />
<br />
<br />
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.<!--content-->let me know how this works....<br />
<br />
<!-- m --><a class="postlink" href="http://www.geocities.com/link96surviver">http://www.geocities.com/link96surviver</a><!-- m --><!--content-->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?<!--content-->hahaha it's an mp3.. DJ Santana... veiw the source<!--content-->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<!--content-->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?<!--content-->He's using the bgsound element, not an embed.<!--content-->looks like he exceed his limit, whats the code to puyt it in the background?<!--content--><bgsound src=http://www.webdeveloper.com/forum/archive/index.php/"music.mp3" loop="n"><br />
<br />
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.<!--content-->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...<!--content-->hey lavalamp....<br />
<br />
why'd you get shut down?<br />
(i was looking forward to hearing the tune that Baby Jai was going-off about :( )<br />
<br />
(and by the way Baby Jai... your brother is adorable. Too young for me... but he's a heartbreaker :) )<br />
<br />
not yet ready to resume work-mode...<br />
;) k<!--content-->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).<br />
Anyway it wasn't me that had the song on my website, (I had crap jokes), it was Link96s's site, (amazing song).<!--content-->Anyway it wasn't me that had the song on my website oh<br />
(my bad)<br />
<br />
anyway....<br />
I went to Link's site...<br />
didn't see (or hear) any music.<br />
(I guess I'm left out of this party :( )<br />
<br />
probably a Moz thing :rolleyes: ...<br />
;) k<!--content-->what kind of browser do you have khaki??<!--content-->Originally posted by khaki <br />
Moz <br />
<br />
mozilla.<br />
<br />
I'm in Opera and I get 'shall we play a game' and that's it. I'm currently Download <!--more-->ing the space.mp3 which I presume is the bgsound you're refering to - it exceeds 4megs.<br />
<br />
Not surprised you exceeded your bandwidth with that in there!!<!--content-->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.<br />
<br />
RE: Space.Mp3, But once it Download <!--more-->s 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.<br />
oops thats why it's XE... <br />
-pozer-<!--content-->Opera and Mozilla are just two different browsers, I've Download <!--more-->ed Opera 7 and that's OK but I'm waiting for Mozilla 1.4 to come out before I Download <!--more--> that.<br />
<br />
By the way, what do you mean when you say:<br />
oops thats why it's XE...<!--content-->dislexia... the new mp3's up :)<!--content-->Originally posted by lavalamp <br />
I'm waiting for Mozilla 1.4 to come out before I Download <!--more--> that. <br />
<br />
Wait no longer<br />
<br />
<!-- m --><a class="postlink" href="http://www.mozilla.org/">http://www.mozilla.org/</a><!-- m --><!--content-->Thanks for that, the last time I checked it was only up to RC 3.<!--content-->
 
Back
Top