Webapps chatlog - 2007-06-22

Back to overview|Highlight a word

00:12:33   <-- Do`` has quit stating (Ping timeout)
00:27:45   --> Do`` has joined #webapps
00:52:33   <-- Do`` has quit stating (Ping timeout)
01:07:48   --> Do`` has joined #webapps
01:29:35   <-- Do`` has quit stating (Ping timeout)
01:44:59   --> Do`` has joined #webapps
02:06:50   <-- roentgen has quit stating (Connection reset by peer)
02:28:06   <-- Do`` has quit stating (Ping timeout)
02:43:25   --> Do`` has joined #webapps
02:47:37   <-- Do`` has quit stating (Ping timeout)
03:03:30   --> Do`` has joined #webapps
03:21:32   --> ppanandin has joined #webapps
03:21:52 ppanandin hello room
03:22:06   <-- ppanandin has left #webapps stating ()
03:25:25   --> roentgen has joined #webapps
03:56:14   --> nicomen_ has joined #webapps
03:56:14   -!- ChanServ sets mode +oq on nicomen_ nicomen_
04:01:28   <-- nicomen_ has quit stating (Quit: leaving)
04:23:13   --> rica has joined #webapps
04:23:30 rica que onda
04:23:49   <-- rica has left #webapps stating ()
04:34:16   <-- roentgen has quit stating (Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)
05:57:51   <-- Do`` has quit stating (Ping timeout)
06:12:28   --> Do`` has joined #webapps
06:37:33   --> handsom has joined #webapps
06:37:41 handsom hay
06:37:45 handsom all
06:37:50 handsom i m handsom
06:38:07 handsom any one like to chat
06:48:56   <-- handsom has left #webapps stating ()
06:53:09   --> handsom has joined #webapps
07:17:32   <-- handsom has quit stating (Quit: handsom)
08:02:05   --> ROBOd has joined #webapps
09:29:44   --> aleksanteri has joined #webapps
09:34:33   --> El_Nino has joined #webapps
09:41:07   <-- El_Nino has left #webapps stating ()
10:06:32   --> sofio has joined #webapps
10:11:34   <-- sofio has quit stating (Ping timeout)
10:24:17   <-- Ramunas has quit stating (Ping timeout)
10:41:21   --> Ramunas has joined #webapps
10:43:44   --> pankaj2 has joined #webapps
10:51:12   <-- pankaj2 has left #webapps stating ()
11:04:43   --> VLAD has joined #webapps
11:04:55   --> Ramunas_ has joined #webapps
11:06:00   <-- Ramunas has quit stating (Ping timeout)
11:10:57   <-- VLAD has quit stating (Client exited)
11:11:49   -!- Ramunas_ is now known as RamunasM
11:12:24   --> Roshka has joined #webapps
11:12:49   <-- RamunasM has quit stating (Killed (NickServ (Nick kill enforced)))
11:13:19   <-- Roshka has left #webapps stating ()
11:14:47   --> Ramunas has joined #webapps
11:53:19   --> LarsKL has joined #webapps
12:04:10   --> sofio has joined #webapps
12:08:07   <-- sofio has quit stating (Ping timeout)
12:27:29   --> rehan11890 has joined #webapps
12:27:51   <-- rehan11890 has left #webapps stating ()
12:33:27   --> Pom has joined #webapps
12:33:41   --> Orcinus has joined #webapps
12:34:35   <-- Pom has quit stating (Quit: Pom)
12:48:53   --> lazodz has joined #webapps
12:49:13   <-- lazodz has left #webapps stating ()
13:43:15   <-- Do`` has quit stating (Ping timeout)
13:52:58 LarsKL any JS guy, what's wrong with <a onclick="document.getElementById('content').style.background-color = 'red';"> ?
13:53:37 aleksanteri s/.background-color/.backgroundColor/g
13:54:39 LarsKL ah, thx
13:54:55 aleksanteri you're welcome
13:54:55 LarsKL why did they use backgroundcolor there while the css property has a - ?
13:55:04 aleksanteri i don't know
13:55:26 LarsKL and changing the text in a div?
13:55:35 LarsKL document.getElementById('content').text = "new text"?
13:56:08 aleksanteri .innerHTML = "new text"
13:56:27 LarsKL that will replace the whole element, won't it?
13:56:29 Orcinus LarsKL: because - means subtraction in JS, silly
13:56:32   --> rehan11890 has joined #webapps
13:56:43 LarsKL oh, i could do it easier..
13:56:49 LarsKL how do i set a class?
13:56:50   <-- rehan11890 has left #webapps stating ()
13:56:55 LarsKL add a class, that is
13:56:58 Orcinus It would mean "document.getElementById('content').style.background" MINUS a variable named "color"
13:57:04 aleksanteri .classname = "class"
13:57:06 aleksanteri i think that's it
13:57:15 Orcinus className
13:57:24 aleksanteri ah yeah
13:57:25 Orcinus the N is capitalized
13:57:31 LarsKL thx
13:58:25   --> Do`` has joined #webapps
13:58:36 LarsKL will that add or replace classes?
13:58:48 aleksanteri replace
13:59:08 aleksanteri element.className = element.className + " newclass"
13:59:19 aleksanteri ^^ adds
13:59:59 LarsKL doesn't work
14:00:07 aleksanteri hmm.
14:00:13 LarsKL <div id="status" style='position: relative; top: -98px' class="false">
14:00:16 LarsKL document.getElementById('status').classname = "warn";
14:00:23 aleksanteri className :P
14:00:38 Orcinus lol
14:00:42 LarsKL still doesn't work
14:01:00 LarsKL hm, wait
14:01:01 LarsKL it does
14:01:08 LarsKL stupid opera was using a cached version
14:01:13 LarsKL even though cache is disabled...
14:02:22 LarsKL what did those guys creating js think?
14:02:36 Orcinus about what?
14:02:38 LarsKL having to write className sucks
14:02:51 LarsKL why not make it all lower-case?
14:03:26 Orcinus Because all DOM methods and properties are camel case
14:03:33 Orcinus Like getElementById
14:03:35 Orcinus etc
14:03:45 LarsKL sucks
14:07:20   --> DeDoK has joined #webapps
14:07:38   <-- DeDoK has left #webapps stating ()
14:12:26 LarsKL hm..
14:13:09 * LarsKL wonders how to place 2 elements of the same size behind each other, without using stuff like position:relative; top: -100px;
14:13:19 LarsKL both elements have width:100%
14:13:28 LarsKL therefore float doesn't do the job
14:18:21 Orcinus position:absolute; ?
14:18:36 LarsKL not possible in that page
14:18:57 LarsKL would place it somewhere completly wrong
14:20:13   <-- aleksanteri has quit stating (Quit: I'm not actually quitting you're seeing an illusion)
14:20:32 * LarsKL is redoing http://browsercheck.larskl.de/ btw
14:20:42 Orcinus not possible, eh? Well, that's too bad.
14:22:20   --> aleksanteri has joined #webapps
14:24:43 LarsKL Orcinus: check http://browsercheck.larskleinschmidt.de/avi
14:24:47 LarsKL with plugins enabled
14:25:03 LarsKL the <embed> is placed one level too high
14:25:05   <-- OmegaPhil has quit stating (Connection reset by peer)
14:25:40 Orcinus You are trying to cover the video?
14:25:45 LarsKL no
14:25:48 LarsKL other way around
14:25:53 LarsKL the video is covering a div
14:27:12   --> OmegaPhil has joined #webapps
14:28:34 Orcinus okay
14:29:18 LarsKL if you have any good ideas..
14:29:53 LarsKL i have no idea why it thinks <div id="content"> is the parent element...
14:32:30 LarsKL hm, it seems that setting position: absolute; for the parent <div> makes it recognize that one as parent
14:32:38 LarsKL but then display is of course fucked...
14:35:26 Orcinus Why are you using embed though? Do you need it to work in IE?
14:35:35 LarsKL yes
14:35:50 LarsKL and embed is the only solution working in all browser
14:38:02 aleksanteri and embed doesn't work for widgets (not for me -.- )
14:39:35 Orcinus well... I would used a floated or absolutely positioned div (so it collapses around content), and apply only position:relative; to the embed, while positioning the div you want to cover absolutely at 0px 0px. Instead of giving the background colour to the absolutely positioned div, apply it to the parent element.
14:41:12 LarsKL like now? doesn't work
14:43:17 Orcinus The current configuration on your page doesn't match what I just said
14:43:40 LarsKL float doesn't work, i already said that earlier
14:46:35 * LarsKL thinks about going back to the pos:rel hack
14:46:57 nicomen heh just hacked together a typewriter thingy someone else needed btw
14:47:06 nicomen javascript:typewrite(document.body,"hahaha",1000,0); function typewrite(elem,text,timeout,index) { elem.textContent += text[index]; if (++index<text.length) { setTimeout(function() {typewrite(elem,text,timeout,index); },timeout); } }
14:53:29 Orcinus http://www.greywyvern.com/tmp/larskl/avi.xml
14:54:33   <-- ROBOd has quit stating (Quit: http://www.robodesign.ro )
14:55:02 gmoz Oh how much I dislike using ++foo or foo++ outside its own line...
14:55:24 * LarsKL tries to to figure out the difference between that code and what i used before
14:55:37 gmoz it just makes for confusing code ;|
14:55:52 Orcinus gmoz ?
14:56:10 gmoz using ++foo or foo++ inside something
14:56:22 Orcinus I like that
14:56:24 LarsKL Orcinus: thanks, trying to figure out why mine didn't work now
14:56:39 Orcinus LarsKL: np
14:57:27 gmoz You don't write doSomething(); doSomethingElse(); on a single line for a reason
14:57:39 gmoz therefore you shouldn't write doSomething(foo++); either =)
14:58:08 Orcinus Why not?
14:58:16 Orcinus I like things to be compact
14:58:48 gmoz Because it makes for bad readability
14:59:11 Orcinus bah. You're just a bad reader :P
14:59:47 gmoz You'd usually want to perform a single action per line
15:00:12 nicomen gmoz: I slightly agree with you
15:00:32 nicomen consider the code above public domain and feel free to edit it
15:00:37 LarsKL Orcinus: i copied your code and it doesn't work...
15:00:46 gmoz It probably seems as clear as the sky when you write it
15:01:01 gmoz but even small things like that may make it annoying to figure out what it does later =)
15:01:02 LarsKL did you change the css file as well?
15:01:08 Orcinus How should I write a for loop then? Like this?
15:01:16 gmoz for loop is a for loop :P
15:01:17 Orcinus var x = 0;
15:01:17 Orcinus for (;;) {
15:01:17 Orcinus  if (x < 9) break;
15:01:23 Orcinus  // do something
15:01:23 Orcinus  x++;
15:01:23 Orcinus }
15:02:01 gmoz You expect the for loop to have something like that in it and when it's in a for loop it's clear how it works so it doesn't present a similar problem
15:02:21 Orcinus hrms hrms
15:04:15 gmoz You could write that as while(x++<9) too (I think)
15:04:20 gmoz but you wouldn't (I hope)
15:04:21 gmoz =)
15:04:41 Orcinus I think good commenting and blocking is a lot more important for readability than making doubly sure people understand where are your increments and decrements are
15:05:12 gmoz true
15:05:24 Orcinus gmoz: you would have to declare the variable first
15:05:28   --> Nic has joined #webapps
15:05:38 gmoz I wonder if you could embed that inside the while() too... =)
15:05:39 Orcinus var x = 0; while (x++ < 9) { ... }
15:05:48   <-- Nic has left #webapps stating ()
15:14:48   --> letham has joined #webapps
15:38:50   <-- letham has quit stating (Client exited)
16:00:10   <-- LarsKL has quit stating (Quit: )
16:02:17   --> Ramunas_ has joined #webapps
16:03:49   <-- Ramunas has quit stating (Ping timeout)
16:05:45   -!- Ramunas_ is now known as Ramunas
16:24:46   --> DEXY has joined #webapps
16:38:18   <-- DEXY has left #webapps stating ()
16:43:50   --> ROBOd has joined #webapps
16:50:58   <-- OmegaPhil has quit stating (Quit: )
16:51:19   --> LarsKL has joined #webapps
16:58:39   --> letham has joined #webapps
17:19:45   <-- aleksanteri has quit stating (Quit: reboot)
18:31:07   -!- letham is now known as school-master
18:32:40   -!- school-master is now known as letham
19:14:20   --> DEXY has joined #webapps
19:14:55   <-- DEXY has quit stating (Quit: DEXY)
19:46:44   --> Lars_G has joined #webapps
19:55:16   <-- letham has quit stating (Connection reset by peer)
19:56:25   <-- Lars_G has left #webapps stating ()
20:55:57   --> pffYussupov has joined #webapps
20:59:06 LarsKL can anyone help me with a JS problem?
20:59:32 pffYussupov u can always ask
20:59:47 LarsKL http://upload.larskleinschmidt.de/-/file.php?670f
20:59:58 LarsKL check some boxes and press the "=" button
21:00:08 LarsKL works fine in Opera 9 but not in FF
21:00:24 LarsKL what's wrong there?
21:04:16 pffYussupov dunno
21:04:28 pffYussupov works on opera like u said
21:04:30 pffYussupov but not on ff
21:04:42   --> DEXY has joined #webapps
21:04:42 pffYussupov did u try debugging it with web developer on ff?
21:05:00 LarsKL pffYussupov: i don't know anything about JS
21:05:08 pffYussupov heh
21:05:11 pffYussupov me too
21:05:17 pffYussupov well, i know lil
21:05:37 pffYussupov but web developer is pretty handy if u want to debug web pages in ff
21:05:40 pffYussupov its a plugin
21:05:43 pffYussupov i recommend firebug too
21:06:14 LarsKL i know, but i don't know what the stuff i read in that error log means
21:06:28 pffYussupov what does it say the error log?
21:06:54 LarsKL that "doCalcb" is a undefined variable
21:07:07   <-- ROBOd has quit stating (Quit: http://www.robodesign.ro )
21:07:07 LarsKL but it's not a variable, it's the name of the function
21:07:15 LarsKL so i don't get what that wants to tell me
21:07:53   --> aleksanteri has joined #webapps
21:07:58 pffYussupov means u may have some syntax error which make the browser thinks u have wrongly written a variable
21:08:28 LarsKL looks ok to me (with my small JS knowledge)
21:09:07 gmoz uh
21:09:11 gmoz did you actually try it in FF :P
21:09:16 LarsKL gmoz: yes
21:09:22 gmoz I immediately got an error in the error console
21:09:23 LarsKL gran paradiso that is
21:09:27 gmoz var sumy = 0,
21:09:31 gmoz line 21, undefined variable
21:09:33 gmoz er
21:09:35 gmoz I mean missing variable name
21:09:36 gmoz :P
21:09:54 LarsKL hm, that's not what mine says...
21:10:01 LarsKL what do i have to change there?
21:10:05 gmoz var suma = 0,
21:10:05 gmoz var sumy = 0,
21:10:05 gmoz var sumz = 0,
21:10:05 gmoz var sumv = 0,
21:10:06 LarsKL in the code
21:10:10 gmoz what.. on earth.. is that?
21:10:10 Orcinus change those , to ;
21:10:13 gmoz yeah =)
21:10:17 LarsKL ah
21:10:18 LarsKL thx
21:10:24 * LarsKL didn't write that code
21:10:35 Orcinus excuses excuses :P
21:10:43 LarsKL i just copy and pasted it from some websites
21:10:47 LarsKL and it worked in opera
21:10:58 Orcinus A likely story :P
21:11:06 gmoz What does that even do, calculates some values depending on what's checked?
21:11:16 LarsKL gmoz: yes
21:11:24 Orcinus I thought it was some color selector...
21:11:32 LarsKL it's for monopoly
21:11:39 pffYussupov heh
21:11:41 gmoz I wonder if the person who made that wrote all those If(....) suma += ... lines
21:11:51 LarsKL gmoz: that was me
21:12:07 gmoz Okay... =)
21:12:20 LarsKL didn't write them of course, copy&paste i figured out ;)
21:12:47 gmoz I like the element IDs though
21:12:50 gmoz aa, ab
21:12:54 gmoz jb!
21:12:57 gmoz jailbait
21:13:24 gmoz I'd kinda think more along the lines of a for-loop
21:13:42 LarsKL  <LarsKL> pffYussupov: i don't know anything about JS
21:13:48 gmoz Yeah I noticed that
21:13:58 gmoz but I always start thinking about better ways to do something when I see source code
21:14:01 gmoz =)
21:14:04 LarsKL i can do serverside (php), but not js
21:14:59 Orcinus JS is more similar to PHP than many other languages
21:15:21 Orcinus If you give it a few months, it should get easier :)
21:15:28 gmoz Yep
21:16:39 gmoz for(var i = 0; i < myform.length; i++)
21:16:39 gmoz {
21:16:39 gmoz  var input = myform[i];
21:16:39 gmoz  if(input.type == 'checkbox' && input.checked)
21:16:39 gmoz  suma += input.value;
21:16:41 gmoz }
21:16:44 gmoz there we go ;>
21:17:04 LarsKL gmoz: won't that add up ALL fields?
21:17:09 Orcinus summa cum laude
21:17:30 gmoz well from a quick look it seemed like it sums all checked fields
21:17:31 LarsKL the a? b? stuff must not be added to the y? z? and probability?
21:17:46 LarsKL it sums all a?
21:17:57 gmoz ahh
21:17:59 LarsKL it's 4 sums
21:18:00 gmoz there's sumy too
21:18:03 gmoz and z
21:18:10 gmoz yeah what did I say earlier.. hmm
21:18:25 gmoz Oh I didn't mention it yet but I like the variable names too...
21:18:25 gmoz =)
21:18:29 LarsKL if you look at it (rendered, not code) the left column is added, the second from left, then the 4 at the right
21:18:34 LarsKL and the 2 lines at the bottom
21:18:46 gmoz okay
21:19:14 gmoz Well, something like that loop, anyway. =)
21:19:41 LarsKL my hack works fine for my needs :)
21:20:09 gmoz well as long as it works for you and you don't have to change it =)
21:20:21 gmoz changing that is probably a major PITA
21:20:22   <-- pffYussupov has quit stating (Quit: Every time I make a website using frames god kills a Pokemon or two)
21:21:18 LarsKL not going to put that stuff online or anything like that
21:21:30 LarsKL it's just for localhost
21:21:53 LarsKL for online monopoly, in case you're insterested: http://www.webgame-portal.de/
21:23:27 gmoz turn time
21:23:29 gmoz is that in.. hours?
21:23:29 gmoz :P
21:23:32 LarsKL yes
21:23:45 LarsKL you don't play it live
21:23:50 gmoz thought so =)
21:23:54 LarsKL it's more like you join 20 games
21:24:00 LarsKL and then play once a day or so
21:24:01 gmoz too lazy for anything like that :D
21:24:08 LarsKL it's fun!
21:24:17 gmoz I like my games fast paced with the exception for FreeCiv and some others =)
21:24:17 LarsKL i love board games
21:24:38 Orcinus if you join so many games, you're sure to win a few :D
21:25:10 LarsKL Orcinus: i actually was #1 in highscores for about half a year
21:25:43 Orcinus Only because I hadn't been playing :P
21:25:50 LarsKL wanna join?
21:25:59 LarsKL i'll open some games for us :)
21:26:24 aleksanteri no thanks i'm busy building my lfs system :P
21:26:44 LarsKL aleksanteri: sounds interesting
21:26:52 Orcinus Maybe during the winter and fall, when I spend more time at the comp
21:27:06 aleksanteri LarsKL: yep :)
21:27:18 aleksanteri it's also really hard at times lol
21:27:21 LarsKL aleksanteri: i wasn't too serious bout that :P
21:27:38 aleksanteri heh
21:27:53 aleksanteri doesn't change the fact i still must keep on with it lol
21:28:30 gmoz lfs system?
21:28:41 aleksanteri yeah
21:28:44 gmoz Only thing I can think of is a leet setup for playing Live For Speed
21:28:49 gmoz but somehow I'm feeling it's not that
21:28:52 gmoz =)
21:28:53 aleksanteri lol
21:29:00 aleksanteri http://www.linuxfromscratch.org/ ;)
21:29:11 gmoz right, right =)
21:29:29 gmoz Why are you doing that anyway?
21:29:57 aleksanteri just got interested on making my own linux system
21:30:10 gmoz okay
21:32:29 gmoz that sounds like gentoo
21:32:30 gmoz kinda
21:32:41 gmoz at least for the part that you have to compile everything yourself
21:33:11 aleksanteri yeah
21:33:39 aleksanteri configuring the linux kernel is a pain lol
21:37:21   <-- DEXY has left #webapps stating ()
21:37:51   <-- aleksanteri has quit stating (Quit: reboot)
21:43:36   --> aleksanteri has joined #webapps
21:45:34   --> pete has joined #webapps
21:52:04   --> DEXY has joined #webapps
21:52:34   <-- DEXY has quit stating (Quit: DEXY)
21:53:22   <-- pete has left #webapps stating ()
21:59:35   <-- Orcinus has left #webapps stating ()
22:13:01   --> ildottore has joined #webapps
22:13:59   <-- ildottore has left #webapps stating ()
22:40:24   <-- Do`` has quit stating (Quit: I AM SPARTAAA)
22:41:01   --> Do`` has joined #webapps
23:19:13   <-- LarsKL has quit stating (Quit: )