Warning: file(milov_entryform.tmpl.php) [function.file]: failed to open stream: No such file or directory in /home/milo/domains/milov.nl/public_html/class.template.inc.php(282) : regexp code on line 1

Warning: implode() [function.implode]: Invalid arguments passed in /home/milo/domains/milov.nl/public_html/class.template.inc.php(282) : regexp code on line 1
milov.nl: by category: coding

169-216 of 222 entries in category 'coding'
pages: 1 2 3 4 5


i.am/bald 100 - digital clock using css borders (IE5/IE6/NS6)

So I was planning on making nr. 100 into this whole retrospective thing, showing thumbnails and detailed descriptions of nr. 1-99, but that felt like too much work and would've been kinda weird anyway, so I decided to just see it as another number, forego the whole looking-back thing, and get on with making the next 100 entries. But feel free to celebrate this momentous occasion in your own way...

1. posted by jpk at 12:40 on February 09, 2002

congrats!

2. posted by karma at 13:10 on February 09, 2002

Works fine in IE5.5

3. posted by huphtur at 21:36 on February 09, 2002

100!

4. posted by rj at 20:21 on February 11, 2002

I was impressed by your one player pong, but this impressed me even more. I'm eating my heart out.

5. posted by branko at 22:34 on February 11, 2002

lovely. very nice!

check this one out:
http://yugop.com/ver3/stuff/03/fla.html

6. posted by alex conroy at 23:14 on December 16, 2003

lol yah verry good can you let me know wen you do somemore because i really enjoyed my stay at your site

love °A°
add a comment
How to extend the convenience of being able to shift-click links and open them in a new window to forms:

<form onsubmit="this.target=event.shiftKey?'_blank':'_self'">

Try it with the search-form (bottom of menu column): holding shift while submitting will open the search results in a new window.
Optimizing Javascript for speed - detailing some clever and interestingly named techniques: Loop Unrolling, Reverse Loop Counting, Loop Flipping and something called Duff's Device. [via scottandrew.com]
Wow, creating something interesting in under 256 bytes (for the 256b.htm compo) isn't easy... Here's one of the things I had to scrap: a random inkblot generator, way too big at 384 bytes... ;)

This one uses the XBM img src technique to generate a 2-bit image at run-time (example 1, 2). Could try rendering it with divs instead, but that'll probably cause quite the browser-freeze.

1. posted by huphtur at 18:35 on February 02, 2002

2. posted by iname.com,mrmessiah,mrmessiah at 02:42 on February 03, 2002

Hehe :) Well I only got mine to work by
absolutely *butchering* the correct
syntax... lots of illegal script and
html tags that IE fills in, but it
fails on just about every other browser
out there, not how I normally like to
code :)

3. posted by Tracy Hall at 00:43 on February 03, 2006

That's a nice little script you've got there. I've had an inkblot generator of my own on my page for years, but it only produces PostScript files. Coming across this page has inspired me to add a couple of .xbm-producing pages, using both my original inkblot algorithm and a modification of your idea of using a random walk.

http://www.math.berkeley.edu/~hthall/Fractal_Inkblot.html
http://www.math.berkeley.edu/~hthall/Brownian_Inkblot.html

Thanks!
add a comment
WildMag 256b.htm Compo - oh yeah! a web-art compo in 256 bytes or less! That's 1/16 the size of the web4096 compo limit and 1/20 of the 5K compo. Quite the challenge...

1. posted by mrmessiah at 16:34 on February 01, 2002

I submitted something yesterday, so
we'll see. :) You entering, Milo?

2. posted by milov at 01:28 on February 02, 2002

of course! looking to fill the 5 entries max easily :)
add a comment
Definitely one to try full-screen...
i.am/bald 99

Anybody up for a game of 755 byte Pong? (IE5.5+ required)
How to make playing Pong interesting for 1 player: use vertical mouse motion to control the right paddle, and horizontal motion to control the left. Also, the longer you play, the faster the dot moves.

And yes, i.am/bald 100 is going to be something special...

1. posted by jan at 00:01 on January 30, 2002

fyi: it doesn't work in opera 6.0 :)

2. posted by avoid.org,arjan,Arjan at 21:01 on January 30, 2002

En hij doet 't ook niet op MSIE5.00. Of bedoel je dat met IE5 ???

3. posted by milov at 21:27 on January 30, 2002

Only tested it in IE5.5 and IE6.

4. posted by rj at 10:00 on February 01, 2002

Nice, very nice. I'm very impressed by the size of the source. I'm eating my heart out.

5. posted by werk-x.com,stephan,Stephan at 01:08 on February 11, 2002

:-( The DHTML Pong does not run on Mac with IE 5.1 - Would it be possible? Please email me if you think it would not be a problem, thx.

6. posted by dupdup at 19:37 on April 24, 2002

for me to poop on

7. posted by 33king at 17:38 on August 14, 2002

I think my left side went gimp

8. posted by Jack at 19:28 on December 27, 2003

Nice Game

9. posted by BULLDOSER at 23:39 on February 21, 2006

It does'nt play on a Mozilla either, but anyway, goooood site.
add a comment
Another new thing: comments are now loaded by Javascript and appear inline in the current page. So you don't have to leave the page to read the comments for a particular entry (IE-only, right now).
Reference: PPK's Import XML Document tutorial.

1. posted by milov at 20:36 on January 25, 2002

See, here's one! (I hope this works...)

2. posted by milov at 20:37 on January 25, 2002

What I'm still working on is the ability to *post* a new comment without forcing a reload.

3. posted by pup at 20:38 on January 25, 2002

noice.

4. posted by Mypalce.com,Adam,Adjam at 22:19 on January 25, 2002

nice

5. posted by karma at 23:05 on January 25, 2002

sweeeet

6. posted by huphtur at 23:38 on January 25, 2002

milov: when ya gonna make yur cms available for download?

7. posted by milov at 00:54 on January 26, 2002

what cms? you mean the textarea's i've got hidden all over the place? :)

8. posted by huphtur at 01:26 on January 26, 2002

exactly! how much if i wanted to buy it? hehe

9. posted by 23JUL at 04:43 on January 26, 2002

>What I'm still working on is the ability to *post* a new comment without forcing a reload

- I think * posting * always requires some kind of reload, but what do you exactly mean by 'reload', the fact a script is redirecting??

- Another way of 'posting' without a reload is maybe to store the comment as a (-if javascript-) cookie which is being read&deleted as you run the script mentioned here above... ;-)

- Btw: since comments are not in a fixed font, can you use the same font-family in the style of the textarea I am now typing in.

- Later..

10. posted by milov at 09:38 on January 26, 2002

By 'reload' I mean the fact that you see the whole page being reloaded or jumping to another url. It should be possible to post a comment by submitting a form in a hidden iframe, or changing an image src, or indeed storing it as a temporary cookie (this sounds the most promising, actually).

11. posted by karma at 10:19 on January 26, 2002

you might want to get some inspiration from http://www.vcdn.org/Public/XMLRPC/ (a Javascript XML-RPC client)?. It sets up a http request itsself from javascript and then interpretes the answer. uses some activeX objects to do this though

12. posted by caster at 06:00 on January 27, 2002

bloody>nice>& >clean !
add a comment

1. posted by pup at 18:39 on January 23, 2002

hahaha

2. posted by [unknown] at 19:31 on January 23, 2002

nice :)

3. posted by mrmessiah at 23:54 on January 23, 2002

The earth moved

4. posted by Brent at 04:16 on January 24, 2002

rad.
add a comment

1. posted by Jeroen at 19:53 on January 22, 2002

da's interessant!
add a comment

1. posted by pup at 18:09 on January 16, 2002

rss 1.0 rss 1.0!!!

2. posted by karma at 18:31 on January 16, 2002

binnenkort milov in RSS?

3. posted by 23JUL at 02:28 on January 17, 2002

vervolg op RSI?
add a comment
:: 13thparallel :: - interesting DHTML 'zine. [via idontsmoke.co.uk]
"BLOGGER - How to use includes in a blog"
Aha, so that's why there are so many weblogs using easily exploitable php include() commands: it's featured on this Blogger tutorial page. Argh... Include() is dangerous, people!

1. posted by palla at 17:57 on January 12, 2002

I'm one of absent-minded man.
add a comment
Something interesting about this McAfee - AVERT page: the "This page current as of..." date is printed using Javascript, always showing the system date of the visitor's computer, providing no indication when the page contents were actually updated. That's real reassuring... [via RISKS Digest]
Impressive self-sorting DHTML table by svendtofte.

1. posted by huphtur at 02:03 on December 30, 2001

warez!!!
add a comment
Include the following at the top of your Javascript:
  cookies = [];
  for (c in C=document.cookie.split('; '))
  {cookies[(cs=C[c].split('='))[0]]=unescape(cs[1]);}
Now you can access your cookies like this:
  alert(cookies['myCookie']);

1. posted by mijnkopthee.nl,bob,Bob at 09:38 on December 21, 2001

Smooth!
add a comment
Wrap your head around this: Higher order programming in Javascript - using functions as values:
  arrayOfObjects.sort(
    function (x,y) {
      return x.date-y.date;
    }
  );
  [at w3future.com]
www.devshed.com/Server_Side/PHP/
This may come as a bit of a shock to you, but ...
You may not know this, but ...
You may never have heard of it before - but ...
So you know the theory behind OOP, but ...

'Hello World' in 114 programming languages. [via Metafilter]
The CSS equivalent of <nobr> is white-space: nowrap;
[via Wouterd]

1. posted by pup at 20:10 on November 09, 2001

excellent tip.

2. posted by google at 10:22 on April 15, 2005

Thanks, the first page on google now shows this in the description! so a 'css nobr' search found it at place 8 I think. Good work!

3. posted by john at 12:44 on June 27, 2005

Thanks for this! I waste some time with other websites that have the WRONG answer until I found this one. Other searches mentioned an extra hyphen between "no" and "wrap" which doesn't work on my browser (IE 6).

4. posted by studio fotograficzne at 21:21 on September 21, 2005

Great, thanks.

5. posted by Razvan at 13:51 on November 16, 2005

Hi,


It is working on Firefox and Opera on <td> tags:

<td class="nobr">...</td>

but it is not working in IE6 !
The div version seems to work on all browsers:

<div class="nobr">...</div>



Regards,
Razvan

6. posted by Razvan at 13:52 on November 16, 2005

Oooopps... I forgot to define the "nobr" class:

.nobr
{
white-space: nowrap;
}


Regards,
Razvan

7. posted by gmx.net,frontend,Andrej Becker at 14:15 on May 22, 2006

Only works for block level elements, specification says it won't work for inline elements.

8. posted by Frank Butcher at 12:22 on June 09, 2006

"Only works for block level elements, specification says it won't work for inline elements."

According to the W3C recommendations, it applies to block level elements only in CSS1. In CSS 2 it applies to all elements.

A case of trial and error for which browsers support it I guess.

9. posted by Mike at 18:27 on September 20, 2006

Google preved rodnoy!
<a href=http://apcserviceder.com>apcservicder </a>

10. posted by noid at 19:51 on May 31, 2007

nice... and easy to find in google.
thanks!

11. posted by aidan at 11:44 on February 09, 2008

I've been trying to get a header element and an input text box on the same line but none of these seem to work.
add a comment
If all goes well, the new weblogs.com should automatically be 'pinged' when I save this entry, indicating latest update...

Yay, it worked! I simply execute the following command along with the MySQL INSERT statement (haven't yet figured out all that XML-RPC stuff):

$ping = file('http://newhome.weblogs.com/pingSiteForm?name=milov.nl&url=http://milov.nl/');

1. posted by Raoul at 10:10 on November 08, 2001

and i see it in the blogrtracker kist.

2. posted by Low at 10:55 on November 08, 2001

Hmmm, have to tell Bob about this... Maybe he can implement it in Pivot.

3. posted by Bob at 09:50 on November 09, 2001

The forthcoming beta will have this feature. I also used the form trick, instead of figuring out how to do it the hard way.

4. posted by pup at 16:29 on November 09, 2001

it's not soap or xml-rpc and it's not as simple as milov's code, but here's how to do it in asp:

Sub pingWeblogs(name, url)
Dim objXML
Dim strURL
strURL = "http://newhome.weblogs.com/pingSiteForm "
strURL = strURL & "?name=" & name
strURL = strURL & "&url=" & Server.URLEncode(url)
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
objXML.Open "GET", strURL, False
objXML.Send
Set objXML = Nothing
End Sub

pingWeblogs("TastyLog", "http://www.tastylog.com/ ")

5. posted by pup at 16:30 on November 09, 2001

doh. watch taht wordwrap on the "CreateObject" line.

there's also a semicolon after the first strURL line as well. no idea why.

6. posted by pup at 16:41 on November 09, 2001

i'm also retarded. there's no parentheses on sub calls.

7. posted by milov.nl,milo,milov at 16:41 on November 09, 2001

that semicolon is werd. something to do with my url2link function, but i don't see how.
test: http://www.semicolon.com/

8. posted by milov.nl,milo,milov at 16:42 on November 09, 2001

9. posted by milov.nl,milo,milov at 16:52 on November 09, 2001

aha. semicolons were caused by my replacing " with &quot; - fixed for now...

10. posted by milov.nl,milo,milov at 20:53 on November 09, 2001

Here's an XML-RPC version for PHP (no extra libraries required):
http://www.yaysoft.com/pingweblogs.php
add a comment
Valid XHTML 1.0!

1. posted by pup at 19:27 on October 31, 2001

your comments pages are still not compliant, though. didn't check anything else.

2. posted by milov at 19:34 on October 31, 2001

They are now! (thanks pup)

3. posted by pup at 20:21 on October 31, 2001

werd. no problem.

4. posted by karma at 21:54 on October 31, 2001

Right now, an error shows up in the generated referers list (inside a nedstat link text: &amp&)

5. posted by milov.nl,milo,milov at 22:10 on October 31, 2001

beh... nasty amps. also fixed now. also thanks karma :)
add a comment
The full-version website of the Groninger Museum uses clever multiple chromeless-window scripting, to create an irregularly (=non-rectangular) shaped window. Rather annoying and unusable of course (definitely not something you would expect of a museum), but interesting nonetheless. [via microbians.com mailing list]

1. posted by huphtur at 23:25 on October 26, 2001

hrm.. its different thats for sure, filled up taskbar heh
add a comment
Couldn't get this to work in Mac IE5:
clip:rect(0 100 100 0);

Turns out I had to use 'px' unit indicators:
clip:rect(0px 100px 100px 0px);
bodytag.org - java/dhtml/vml experiments by glenmurphy.com. [via idontsmoke.co.uk]
idontsmoke.co.uk - great domain name. some neat dhtml experiments in minimalistic standards-compliant design. [submitted]

1. posted by 23JUL at 19:40 on September 21, 2001

Yar's Revenge
add a comment
I'm going on vacation, so no updates for a week and a half. In the mean time, why not entertain yourself with this:

http://milov.nl/linkthispage.php (Moz/IE5/IE6 req.)

Using a combination of PHP and Javascript-DOM-scripting, the structure on this page will grow in different directions depending on the number of referrers that link to it.

The referrers have to be unique, so there's no point in refreshing endlessly. Rather, spread the word and watch it grow when linked by more and more sites.

1. posted by ellen at 19:11 on September 09, 2001

jammer, hij doet het niet in IE op de mac (en geeft javascript error in netscape 4.7)

na wat processing messages, waarin ik urls voorbij zie komen, is er alleen een zwart scherm te zien

2. posted by wxs.nl,w.vanerve,Wouter at 20:07 on September 09, 2001

Leuk idee, ben benieuwd hoe groot het geheel zal worden!

3. posted by Roel at 20:24 on September 09, 2001

Mooi zeg. Postje op MeFi?

4. posted by reet at 21:31 on September 09, 2001

als dit allemaal mogelijk is...

5. posted by Remco at 22:10 on September 09, 2001

Het leeft!

6. posted by Owen at 23:30 on September 09, 2001

mooi stukje werk. veel plz op vakantie.

7. posted by maxdunn at 23:42 on September 09, 2001

Cool! The "web" is really living up to its name.

8. posted by verdana at 00:41 on September 10, 2001

hyperstrak

9. posted by pr0n at 07:17 on September 10, 2001

Errug leuk dit ;)

10. posted by Jako at 17:21 on September 10, 2001

Very, very cool!

11. posted by JISH at 18:10 on September 10, 2001

Awesome!

12. posted by Yardsale at 21:02 on September 10, 2001

Watch it go!

13. posted by c.r. at 07:01 on September 11, 2001

Página muito legal, Milo! Bárbara! Valeu o trabalho... [BR]

That's a helluva page, Milo! Way cool, thanks for the great job... [EN]

14. posted by Sleeper at 08:49 on September 11, 2001

That is some wicked coding there mate.

15. posted by cunt0r at 14:04 on September 11, 2001

Haha, erg goed dit!

16. posted by d a a f at 15:08 on September 11, 2001

Bijna een soort van artificial intelligence... errug goed!

17. posted by huphtur at 00:38 on September 13, 2001

anybody know where milov went for holiday? i hope he's ok with all that crap going on...

18. posted by 23JUL at 04:41 on September 13, 2001

I think he is on vacation?

19. posted by huphtur at 07:44 on September 13, 2001

yeah but where?

20. posted by low at 19:02 on September 13, 2001

Portugal. So he should be fine...

21. posted by huphtur at 19:13 on September 13, 2001

ok good...
this whole NY thing is scaring the shit out of me.

22. posted by daniel at 01:42 on September 17, 2001

milo v. you went away....
& it all went down...p.s
youv'e emailed me before,
this time....my friend ?....
i'm a designer/artist with commercial
& personal gain at heart.....
the majority will go to my personal network !(which is yet to be established !!!)please milo,,treat
me as special as you would like to
be yourself !!¬!!!a... fan...dan..uk

23. posted by diamond eternity wedding rings at 07:13 on October 09, 2006

In Oklahoma City no one may walk backwards downtown while eating a hamburger!
add a comment

1. posted by low at 17:33 on August 28, 2001

Just when i was sure tables are useless, something like this pops up! ;)

2. posted by edgar at 08:09 on December 23, 2006

i need help with lvl 9!!!!! im stck =\
add a comment
This image (at svendtofte.com) has a src-param not pointing to a file, but to a javascript: variable (view the source). Apparently, it's possible to use js to generate basic 2-bit images, in XBM-format. Interesting...

Another example, via Google: Dr. Clue's XBM Editor

1. posted by low at 14:25 on August 25, 2001

I think no. 93 is on its way ;)
add a comment
The Nokiko SVG Project - lots of links to SVG tutorials and samples. (SVG is an XML-based graphics format).
[via Camworld]

1. posted by Armand Datema at 14:34 on August 22, 2001

Hoi

Bedankt voor de link naar mn pagina. BTW interessante mouseover effecten./

Armand
the Nokiko Project

2. posted by milov.nl,milo,milov at 15:21 on August 22, 2001

heh, i had no idea you were dutch too... cool :)

3. posted by maxdunn at 09:23 on August 28, 2001

Yes that's a cool site, I keep meaning to link to it myself. SVG will take over the world. Somewhat like weblogs...
add a comment
DHTML hover effects - a little experiment in mouseover dynamic object manipulation I made last night.

1. posted by pup at 17:34 on August 21, 2001

that's freaking dope, man. i am inspired.

2. posted by elegia.nl,mark,mark at 21:45 on August 21, 2001

It doesn't work in Mozilla 0.9 :-(

3. posted by milov.nl,milo,milov at 23:14 on August 21, 2001

mark: i've been working on that. effects 1 and 3 now work in Mozilla, sort of.

a quick google search for moz event model info turned up this helpful site:
http://www.mikefoster.f2s.com/demos.html

4. posted by pOw at 23:28 on August 21, 2001

Bijzonder geinig, komt vast wel 's van pas... keep up the good work!!

5. posted by pOw at 23:46 on August 21, 2001

agos m'n overLIB werkt niet meer, puzzel de puzzel, enig idee?

6. posted by pOw at 00:00 on August 22, 2001

Al opgelost, blijkt met de volgorde van de scriptjes te maken te hebben :)

7. posted by low at 02:08 on August 22, 2001

@_@

8. posted by [unknown] at 05:13 on August 22, 2001

hover effect in Moz is funny
keeps shaking..
add a comment
Wow, the various indent styles commonly used in source code actually have names. Mine's Allman, definitely.

(Read lots more interesting stuff at The Jargon File).

1. posted by pup at 18:07 on August 15, 2001

i'm a k&r man. out of the 4 friends i polled, 3 are allman and 1 is k&r.
add a comment
Please don't spawn popup-windows like this:
<a href="javascript:window.open('foo.html');">

or this:
<a href="#" onclick="window.open('foo.html');">

rather, use:
<a href="foo.html" onclick="window.open(this.href);return false;">

benefits:
- statusbar still indicates where you're going
- non-js users (and search-engines) still end up at the correct page
- current page doesn't jump to top (faux-anchor '#' evil)
- shift- and right-click options still open the correct page

Update:
Apparently using return false; in the href can mess up some browser's popup-blocking, so watch out if you care about that (haven't noticed it myself, but then again, I almost never use popups). [via]

1. posted by Marza at 00:56 on August 14, 2001

Goede tip, meteen gewijzigd. Ik stoorde me al aan het niet met de rechtermuisknop kunnen klikken.

2. posted by David at 11:16 on August 14, 2001

Dit zocht ik. Bedankt!

3. posted by pup at 17:18 on August 14, 2001

excellent tip. i was looking for a nice backwards compatible way of doing this.

4. posted by Jim at 17:55 on December 28, 2001

great tip, i too was looking for something that would work with js turned off.

5. posted by Joe Clark at 21:40 on December 30, 2001

Yeah, except you have to duplicate mouse functions with keyboard functions for accessibility. It's onkeyDown, I think, but I'm not an expert at this. Keep all the onClick stuff-- just add the keyboard support.

6. posted by Norse at 21:57 on January 02, 2002

Het niet ik been zocht dit ik ik de met wheerholdenit.

7. posted by charles at 22:39 on January 04, 2002

How do I also add the no-address/ noscroll and other elements to that tag?

8. posted by matt at 18:01 on February 17, 2002

If you're just opening a new window with out specifying any properties (window size etc.) then you should really be using TARGET="_blank" instead of an onClick. That way even people with javascript turned of will get a new window.

9. posted by zachariah at 06:42 on March 21, 2002

matt - target="_blank" is not vaild xhtml which is the current verion of html

10. posted by Tim Scarfe at 21:39 on June 16, 2002

Great Tip.

I don't like inline behaviour in the HTML element of my documents though, How about making it have a class of "pop", and then having a seperate script run through the document at the end picking up all the elements and assigning the events?

De-gradable coding, isn't it so cool :)

11. posted by kesor at 23:24 on August 31, 2002

the return false; thingy doesnt quite work in opera (tested with 6.04).

I tried to expand text, like this :

<p>this is some text <a href="" onclick="moretext.style.display='inline'; return false;">more text</a></p>
<p id="moretext">this is some more text</p>

It works great in explorer, but doesnt work in opera and mozilla.

I guess its the return false that is not working.

12. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

13. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

14. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

15. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

16. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

17. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

18. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

19. posted by 127.0.0.1,me,sh0rtie at 13:13 on September 04, 2002

try
<a href="" onclick="document.getElementById('moretext').style.display='inline';return false">blah</a>

20. posted by 127.0.0.1,me,sh0rtie at 13:16 on September 04, 2002

holy multiple posting batman

sorry about that , blame mozilla , i only hit submit once :/

21. posted by MidgetSniper at 01:13 on September 19, 2002

Thank you for the info. I've been trying for 3 days now to get the page to stop refreshing everytime I wanted to post a comment. I'm in process of building this site and that was a tremendous help.

22. posted by xxx.lt,akello,Akello at 03:51 on December 23, 2002

me@127.0.0.1's way doesn't work either :(

23. posted by gfdh at 11:39 on February 20, 2003

ghgf

24. posted by FitzChivalry at 13:13 on September 17, 2003

I'm so glad that googling on "href onclick" led me to this site!

25. posted by yahoo.com,redjester,hadlock at 19:41 on October 12, 2003

hi how do you open this pop-up in a set size window?

26. posted by Gobalopper at 11:40 on November 02, 2003

Try this hadlock:

<a href="yourlink.html" onclick="window.open(this.href,'blah','height=250,width=300,top=50,left=50,scrollbars=yes,titlebar=true'); return false;">link text</a>

27. posted by Ich at 15:44 on December 30, 2003

Fuck you

28. posted by nyexotic at 21:55 on January 29, 2004

I want to make a pop up for my website with a picture as soon as they open my site & another when people turn on their computer. If someone can e-mail me a script that would be awesome. thanks.....

29. posted by earl-ku at 13:41 on February 09, 2004

thanks thanks thanks

30. posted by Jay at 06:35 on March 10, 2004

Great tip. Exactly what I needed. Thanks!

31. posted by wooki at 21:38 on April 03, 2004

what. when people turn on their computer?

32. posted by fargo at 23:16 on May 11, 2004

Does not seem to work for me (tested in Mozilla Firefox and Opera 6.12). It opens the new window but also the current window jumps to the url present between the quotes in href="".

33. posted by milov at 23:22 on May 11, 2004

Really? Even with the "return false;" at the end?

34. posted by Symen at 09:07 on December 01, 2004

>fargo

It works in my firefox, opera and ie. You must have made a typo..

But anyway, good article milovrs!

35. posted by sandra at 12:39 on July 01, 2005

Thanks gobalopper! this helped me great!!

36. posted by Joy at 01:41 on September 22, 2005

How can I use window.open(this.href...
with frames? I have the <a href="offer.html".. in a frame and when i click it, offer.html is open in the self frame and not in a popup window.

37. posted by gmail.com,askubusku,seema at 12:28 on September 27, 2005

<p>this is some text <a href="" onclick="moretext.style.display='inline'; return false;">more text</a></p>
<p id="moretext">this is some more text</p>

It works great in explorer, but doesnt work in opera and mozilla.

I guess its the return false that is not working.

38. posted by Milo at 12:30 on September 27, 2005

Nope, you just need to access moretext via the getElementById-function, like so:

onclick="document.getElementById('moretext').style.display='inline'; return false;"

This should work in IE, Mozilla and Opera.

39. posted by eapen at 21:59 on October 25, 2005

doesnt work for me either in firefox. it probably has to do with one of my extensions, but its a pain to go through each one.

40. posted by mayglee at 08:02 on November 11, 2005

how to make a popup onclick with style, with background image and so on?

good page, thanx

41. posted by riccardo at 03:06 on November 12, 2005

how about the same thing with forms?

42. posted by hotremoveforsendingmail.com,sager_svend,eSKape at 08:35 on February 09, 2006

#36 Joy
I guess the only way to open links in another frame is to use targets. But target is okay, they are XHTML.. but not Strict. Maybe you are not using the right DTD? You are using framesets, so you should use XHTML Frameset.
As http://www.w3schools.com/tags/tag_a.asp say,

43. posted by hotremoveforsendingmail.com,sager_svend,eSKape at 08:37 on February 09, 2006

.. (continuing) ..
As url say, target is allowed in Transitional and Frameset, but not in Strict.

44. posted by yahoo.com,fuckthegovernment,Alex at 21:56 on February 26, 2006

.^..^.
<0><0>
..<>
((SWEET))

45. posted by RskpsVVMSlXGDP at 15:58 on June 05, 2008

tickets_5.txt;2;2

46. posted by someOne at 16:57 on January 08, 2009

like i didnt know that allready :/

47. posted by Imu at 13:58 on November 10, 2009

This is great, I use this to open 40 000 porn pop-ups at all my clients computers. Thank you!
add a comment
Shortest syntax for preloading images in Javascript (in answer to a question by Wouterd yesterday):

for(i in ['larry.gif','moe.gif',
'curly.gif'])(new Image()).src=M[i];

1. posted by Traumwind at 10:11 on August 02, 2001

that can be shortened:
for(i in M=['larry.gif','moe.gif','curly.gif'])(new Image()).src=M[i];

[] replaces the new Array constructor...
cool stuff, man!

2. posted by milov.nl,milo,milov at 14:09 on August 02, 2001

sweet!
add a comment
Wow, Google can also output search results as xml!
[via mijnkopthee.nl]
DyNAMiC-cOre.Net is running a series of articles on creating a DHTML game. With parallax scrolling!
[via Dithered]
Ah, I was looking for this but couldn't find it anywhere: Conditional HTML comments, foregoing the need for JS browser checks. Example:
<!--[if IE]>
Shown in IE, hidden in other browsers.
<![endif]-->

<![if ! IE]>
Hidden in IE, shown in other browsers.
<![endif]>
www.oudaen.nl zegt: "Internet Explorer geeft voor deze site de beste resultaten! Downloaden (klik hier)". Achter 'klik hier' schuilt geen link, maar een <font> met een onclick-event, en laat dat nu juist niet in Netscape werken. Handig... ;)
If you're curious how 92 works, view source of file 92_full.html - a non-compressed version with extra comments.
iambald 92 - animation using css border styles and DOM scripting. Click anywhere in the black background for more effects.

I tried to optimize this one for size also - didn't quite reach my goal of 512 bytes or less. It's still pretty feature-packed for a 789-byte file, though.
iambald 91 - my first attempt at creating a dhtml animation in under 512 bytes. 5K or 4K is way too roomy to be challenging these days...

pages: 1 2 3 4 5