perhaps someone could help me with this I have a Text node that I created with createTextNode — I am trying to

http://dpaste.com/17196/
But it's not working. Can someone tell me why?
var isMSIE = /*@cc_on!@*/false;
Please someone help!
Can someone help me out? Here's my JS code: http://dpaste.com/17196/
I don't know how to make use of var isMSIE…
IE sniffing is not working

`browser

It doesn't work in IE just because IE didn't choose to implement the standard. Sheesh.

try { box.add(o, null); } catch(e) {box.add(o); }

Anyone know how to make use of this? http://dean.edwards.name/weblog/2007/03/sniff/

anyone here who has used the "scriptaculous"-framework?

hacker_112, go to #prototype

thanks

swedes…

:P

jag er inte dum, jag aer bara svensk

there are plenty of talented and smart swedes ;/

eyh
no

that's a misperception; just because the Nobel stuff all goes on there

ah, Peer, he's a nasty dude
he resets connections and stuff ^^

Im not stupid, I only had a specific question about how I could send an function with an argument as an argument… Seems like I can't do that with the script, I can only send an function without arguments as an argument to the function Sortable.create…

hehe, wasn't directed at you at all, but to swedes in general :p

naw, he knows he's stupid because he responded because he knew he fit the bill.

hacker_112, just use an anonymous function?
like function(){myotherfunc('foo')}

motherfunc?

?

I've had it with all these motherfuncing bugs on this motherfuncing plane.

hello, I'd like to change (want to 'reset') the css pseudo class :hover with javascript, but I don't know how to access and change this pseudo class, tag.style.hover obviously is not what I'm looking for :/

samlt, that won't be possible, except in IE where you would use HTC
however, you could do the same with onmouseover
http://www.xs4all.nl/~peterned/csshover.html

i thought window.onload triggers once all the html has been rendered ?

… then in my func() i play around with getElementById('a') and it errors

schnoodles, technically, window.onload runs after the html hosting has been rendered AND all pictures have been loaded. But yeah, the code above should work. what kinda errors do you get?

document.getElementById("test") has no propertieshttp://localhost/a-maze-d/media/js/maze.jsLine 5

you are running that code inside func()?

yes

pastebin?

thank you, actually I was already using mouseover for something else, but what you've just said 'technically, window.onload runs after the html has been rendered AND all pictures have been loaded' makes me realize I'm doing something useless since image would already be loaded, I though
window.onload runs before the images were loaded

dabear, http://www.pastebin.ca/662245

The paste 662245 has been copied to http://erxz.com/pb/4088

dabear, any idea ?

åñòü ðóñêèå??
hello

_34 is a bot
it just spammed #rubylang

)))
yes

3] *** chris2 sets a ban on
3] *** _34 has been kicked from the channel by chris2

Humans get kicked too…

well ok

1 + 2 = ?

just wanted to warn you

))) VITEBSK yes

i wanted to see what it can do

)))

let's test this

see, 3 brackets - totally human

_34 is a bot

lol

_34 is a bot

finger

_34 is a bot

lol

csaba is a spammer

))))))))))))))))

it's always replying the same thing

prrr

_34 is a bot

äà ïîøîë òû ñóêà íàõóé

The problem is that it is very hard to tell a bot apart from a dumb teenager on IRC.

noy

on ruby it was more like that

hahah

Anyway, it is wise to ban both so there is no practical issue.

ýé åñòü êòî?? - btw this is another one quite close

isent irc fun

óó

_34 hello

RUSSA??
)))
//////////

seems like somebody has gone bananas

RUSSA??

_34 is a bot

no

_34 is a bot

You is bot!!!!finger

_34 is a bot

))

_34 is a bot

flower

_34 is a bot

irc

123

ñóêè

ok it's not a bot

no
you RUSLAN)))

_34 was kicked from #math by Catfive (Catfive)

You is bot!!!!finger

looks like it's only here and #idlerpg that he isn't kicked

))))

we love moron bots \o/

you bot bot )))))

I should write a bot myself to make _34 some company
it shouldn't be so hard

yes
))

heh
i knew a russian girl that always used ')))))' as a smile type thing

that doesn't mean anything, just a block of parenthesis
I can never tell if it means sad or happy

My sentiments exactly. (:

Anyone know if it's possible to check if the browser is in quirksmode through javascript? I want to know if no doctype is set

you can do it with a trick
in quirksmode some objects exist that don't exist in dom mode

great, I was thinking this couldn't be done, what should I check for?

just a sec
ok in dom mode you have document.documentElement.clientWidth and it's not 0, and in quirksmode it's 0 and instead you have document.body.scrollTop which is not 0
so if you're in dom mode document.body.scrollTop will be 0, otherwise you're in quirksmode

It seems to works for IE giving 0 in quirksmode, firefox seems to have some values though

well you only wanted to make a difference between ie quirksmode and dom mode, firefox has nothing to do with this
you'll have to check if it's firefox with some other way

Yeah I guess this needs a lot more sniffing to work. I'm trying to write a cross-browser viewport dimensions check that works on all doctypes. The one from quirksmode.org doesn't take scrollbars into account yet
thanks for quirksmode check

np

hi
i have an iframe, and i need to change the style of objects in that document
any ideas?

I have a question about FCKEditor, how is it possible to get an FCKEditor object's content via javascript?

Is there a better way to check if 3 values are the same then 1==2) && (1==3) ?
might be a bit confusing with the ints, (a==b) && (a==c)

someone here can help a noob ?
Ihaving problems using ajax, jquery and ie

http://localhost/festimais/trab/pub/votacao.php

sometimes when I enter email button ok not work, with IE
after this, appears a list of musics (works submited) that this webmail hosting not voted.
in Firefox, when I click vote, vote is submited and list updated, removing music voted
in IE/Opera not

chronos-work, i get 500 connection refused

`js ref

http://developer.mozilla.org/en/docs/JavaScript , http://devedge-temp.mozilla.org/central/javascript/index_en.html , http://phrogz.net/ObjJob/ , JScript@MSDN: http://tinyurl.com/9pk3l , www.crockford.com/javascript/

hum, preaction, one minute
try now

still no worky

config file aponting to localhost
now right
not working for you?

no

http://valfelipe.ath.cx/festimais/trab/pub/votacao.php

hi everyone

I put localhost in top, sorry, I see only now

i am having a problem with the dom in internet explorer 6. i created a bunch of divs that i want to just go vertically down the page, and it works fine in fiefox, opera, and safari, but in IE it is stacking the divs
why would IE do this
can i not use the DOM for makign pages in IE?

URL?
of course you can

chronos-work, i don't know what API you're using, so I can't help you debug this.
chronos-work, but you might want the getElementsByTagName("LI") to be "li" instead

ah, I using jquery

i dont know if it will view over the web but u can try
its really weird the divs are stacking on top of each other
in IE
could it be because i didnt style them
adn the default style for FF is different from IE

`switch ref
`js ref switch

Evaluates an expression, matching the expression's value to a case label, and executes statements associated with that case. (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Referencetatements:switch)

oh yeah.
switch(true)
what a hack.

is there a way to return the name of a variable?

I seeing source of pages in IE and Opera after I enter email and load list … he not shows list
hum, need to read more about ajax

can someone test http://mcgw.co.nr/webos in IE for me? i need to see if pngfix.js is working

how can i get form name in function?

not sure but: this.form.name ?

yep thanks

doesn't work on IE, at least for me.

ok i fixed my styling problems in IE
but i cant get events to work in IE
for some reason my onclick events arent working

what's wrong w/ it? the bottom border of the "windows"?

i made them using the dom using hte setAttribute method
is there another way i should be doing it?

and the border around the images, right?
**around the windows

right now i just do button.setAttribute("onclick","callbackFunction()");
is that wrong?

It just shows a blank page.

it works in FF, but not in IE

huh? O.o

Yes
Maybe someone else should also try it out.

erm… it loads here in 2 seconds so idk =\
try http://mcgw.dav7.net:8080/webos/ ?

try it without the "" and without the () on callbackFunction

now it works

mk, can you double click an icon and see if the "window" looks fine? i know the bottom border wont show up in IE but for now i'm tweaking the transparency issue =P

yes, it looks nice.

the border around it isn't solid blcak, but a shadow-ish thing now?
**black
gr
the border around the "windows" is a nice shadow-ish thing now?

anyone know any good comedy dvds to get

erm…. #off-topic ?

what if i want the onclick function to have parameters?

function () { callBackFunction(p1, p2,…) }

k thx

the complete Monty Python series

agreed
the holy grail, and black adder XD

is it possible to detect when a iframe finishes navigating to a new page?

how can I check if a browser supports object.style.opacity?

RockerMONO, well, for this you would be better off using ajax

erm…. it's a window-in-window setup using iframes, how is it better to use ajax? =\

because, iframes and ajax are very alike

erm…. but i've put over 3 months into developing a webos =\

they can fetch other pages silently
but with ajax you get extra features, like the onreadystatechange, whicih is what you are looking for

http://mcgw.dav7.net:8080/webos/ - click Apps in the bottom-left then choose "View Homepage", notice if you click a link it doesn't update
i just need so that when the iframe finishes loading it updates the URL in a textbox….

well simple enough there
you control all of the pages going into the iframe right?
like, you can change them…

yea, but when you click a link on the page in the "browser" i dont know how to make it update the textbox for the URL

nice webos though

thanks

one thing I would recommend adding

hm?

I'm having problems with style=""

either the hand mouse, or a different one when you hover over active text
like the apps button

alright

if I do for instance, mytop='90px', and then I do style="top:mytop", it doesn't work
any idea how to fix it?

that's not supposed to work….

is there any way to fix it?

yeah..
css doesnt use variables
style="top:90px;"
thats how

…….
k

?

heh i dont think he liked that answer too much

it worked, didnt it?
daaaaaaaaaaaammmmnnn

hm?

I may need to restart firefox here :O
as always
I leave my computer on standy
come back, Fx is using like 350-400k memory

anyways… do you know how i'd be able to call a function when the iframe finishes loading? =P

stupid memory leak
umm
lemme check if there is a status thing for it

erm… it's not a leak… it's a "feature"… it caches the last few pages you view
^- the "firefox memory leak" isn't real

oh
thanks for the info
but why, overnight when I do nothing
does it gain about 75k bytes of memory?
oh btw

hm?

I just found a solution to it

what is it??

you know how you can edit stuff inside the iframe with javascript?

yea

well, I just remember a script I have on one of my sites

wait… isn't that only if it's on the same domain though? this is an actual built in web browser, i cant guarantee anything will be in the same domain =\

it shouldnt be on the same domain

huh?

I know someone who does it outside of his domain

oh

like, it shouldnt matter which domain host its on
anyways
I have a script, that you put on a webpage

mhm

and then it automatically finds links with a class/id you apply
haha
but it loops through all the links, finds the ones with the applied class/id
and it applies an onclick
you can just loop through all the links in the iframe

O.o

and then for each one, add an onclick that calls a function to change the text in the address bar
so it turns out like:
a hreaf="http://google.com" onclick="change_address('http://google.com')"google/a
oops
slight mis spell
do you get what I'm saying?

yea

so like
links = document.getElementByName('a');
then loop through that, and add the onclick with the tag url

ohhhh
iframe has an onload attribute

…..
-.-

lol
sorry…. i just found that

lol
its cool

would i get the location of a Iframe via this.location.href or this.src?
heh
onload!=work….
ah yea it does
hmmm
do you know how to get the location of a iframe? location.href doesn't work and src isn't reporting what i need =\

ummm
is it….
hmm
I dont know actually

google says use .location.href or .src but neither work =\

are you sure you're doing
iframe_id_thing.location.href?

document.getElementById("iframe1").location.href for iframe1, document.getElementById("iframe2").location.href for iframe2, etc.
iframe frameborder="0" border="0" style="width: 100%; height: 100%;" src="http://mcgw.co.nr" id="iframe1" onload="document.getElementById('url1').value=document.getElementById('iframe1').location.href;"/iframe

eww

haha
oh dont worry, that's after i improved the original code…

heh

haha
do this:

ocument.getElementById("iframe1").location has no properties
*document

do you see what you are doing?

erm…. add .toString() or somethin of the sort at the end?
lol
random guess
but what?
….?

lol
oh, ok
nvm

what?
why is it telling me document.getElementById("iframe1").location has no properties?

how would I create a variable that is a function? ie: var value = ({a: 'aye', e: 'eye'})['eye']; 'foo: ' + value would be "foo: eye"
hrm I know why it didn't work, I had quotes aroud it
I love it how "asking" the question helps me figure out the answer. heh!

well. iframe.src doesn't work cuz i never change the src
but iframe.location = undefined and iframe.location.href = "iframe.location has no properties" =\
ohhhhhhhhhhhh
i got it
frames['iframe1'].location.href

samlt this.form.id gives me: this.form has no properties form has id="name" atribute

Right..
time to get this javascript function sorted

well I never use onclick directly inside the html code, and and don't really know if 'this' is really the button,
but if the variable but is the button, then but.addEventListener("click", function, false), and then inside the function, this.form.id should work
these two sentences were for you

form id ="editprofile" name="editprofile" action="index.php" method="post" onSubmit="return validate_form()"
anything wrong here?

samlt thanks

that should work.. i wouldn't do it that way
i drank too much last night

benlong it doesn't work
spent hours trying to figure out why
was talking to a guy last night about it
and he couldn't help me

it's not your opening form tag

all it is, is a simple function that returns true or false

do you have it visible somewhere?

yes

I'm to think of the URL, but it's not coming to me

http://rafb.net/p/kmCdv089.html

you never return true

heh

your supposed to return false if u don't want the form to submit
i know it never returns true
as i forced it to always return false
so i can see why it's not working!
it's not returning false for some reason because the form posts

what is getElementById.elements ?

Hi again.. is there any way to make the background stretch?

also, why do you have try(classname="")catch(alert 'error') ?

that was just to test if it was working
but theres a syntax error in that part somewhere.. not sure why

agamemnus http://www.w3schools.com/css/css_background.asp

h{(e)[alert

Fleck, I already looked there.
It doesn't say anything about stretching

background don't stretch
yea, it is unfortunate..

agamemnus well if you code on php then you can resize image host in size the client has screen…

onsubmit is a great thing

i could imagine a better Web, with pixelated headache causing background everywhere

what?

you don't really want to do that

yep :P

everything looks better when it's pixelated?

is there a way to place a foreground image without IE popping up its "image tools"?

yep

how can I do that?
that's the only reason i'm using backgroundImage

meta name="MSSmartTagsPreventParsing" content="true"
meta http-equiv="imagetoolbar" content="no"

but I want it to stretch
i see…..
ok, thanks… another question: is there a way to specify a foreground image on a div?

you mean using something other than divimg //div

yes

so you image sits on top of content?

inside the div
without using image hosting tag

i don't get teh foreground part

like foregroundImage or something
….. something that's not the background.

sure, you can do anything

how can I do that?
….
nvm..
I guess you don't want to tell me

back
i dont think their is a way, i've looked for it before and found nothing

you can't really embed images without the image tag

hi

you can use flash, etc..

hey grigora

explain what you're trying to do where you think you need a foreground tag?

alright
just wondering
thanks

yea but i'm not sure people using Linux would like you for the flash idea lol
hm…

haha

why come in ask a question, then leave when you want details?

i don't recommend it
i dunno.. that's why I delayed in answering the first time

so … in order to get the event from onclick inside the html, you have to do a … onclick="doSomething(event)", just found it on the net, thought i'd let you know
i was missing the (event)

oh, k =]
aga…. whatever it is….. is doing that alot for some reason
i dont feel like slowing down to type his full nick out haha

gri.. optionally you could put an ID on the anchor tag, and then via script access the anchor tag via the ID, and then assign an onclick handler from there
that way you're not cluttering up your html, and your javascript host lives in it's own place

uh, what's this

insane, I know

is there any way to traverse the DOM tree starting from a certain node?

grigora there is a documentation out there

hey everybody… not sure if this is a javascript error but here goes. I'm building a site where i need to update some info in a database, i do this using javascript and the XMLHttpRequest element, loading a php hosting page that updates and returns a
result, the javascript then updates the page accordingly. This works without a flaw in Firefox, but for some reason IE7 seems to have an issue of demanding to use the cache of the file, hence not upd
ating the db. Any hints on how i can force it to reload the file?

use POST instead of GET

would that do the trick?

well a post shouldn't get cached

well that did the trick why didn't i think of that :P

when I assign an onclick handler in DOM, how do I pass variables to the handler?

T-Hawk: but it sounds like you were doing a get without any query parameters
ele.onclick = function () { handler(arg1, arg2, …); };

thanks

Khisanth, i was doing a http.open ('get', url); just replaced that with http.open ('post', url);

element using document.createElement.. but prototype.js' Element methods don't work on it. (e.g. var e =document.createElement('div'); e.addClassName('foo'); )

yes but what was the content of url? did it have a ?foo=bar part in it?

*in IE6

yes it did…
and worked in firefox.
now it works in IE7 as well

moqq, extend it using $()

works perfectly in firefox
but not in i.e.

hrm well those shouldn't be cached either

Khisanth, it seems IE ignores my no-cache headers
it did

what do you mean?
oh
nevermind

IE doesn't support what you are trying

http://paste.lymas.com.br//?q=6962
why on line 124 the function are not executed ?
:P

because teste == 'zero' :P

it´s not
haha
let put a alert there
;P

e ae silici0 …

omg!
chronos-work: você é ?
:P

não te conheço
name of vars in your script is in portuguese brazilian :]

i see
heheh
it != of 'zero'
;P
i don´t why is not calling the function
;/

any error?

chronos-work: hehehe
no

if you put an alert after the function call, is it ran?

$(someDivElement).getWidth()

run

is that correct?

let´me see

Hello. Is this a javascript help channel?

yes it runs
;P
very strange
i haved try others ways
and not worked too

http://developer.mozilla.org/en/docs/DOM:element.offsetWidth
consider using dojo with which you can get computed styles

l 17 #
alert(adress+' a '+geocoder);

it don´w run

shuld be address instead of adress ?

oomg
let me change it

I'm interested in building a simple application for a theatre. Basically, I was wondering if I could create a web app that, when a button is pushed, plays an MP3 file. A sound board, in other words.

use flash + javascript

i find the problem
the GMap are not runnning

S|k, 1) I don't have Flash. 2) I don't know flash as well as I do Javascript.

;/

google it, it's not that hard
there's no alternative

thanks

Well, considering my development box is a secure linux web hosting machine, I guess I'm SOL.

why?
you give up without trying

Flash (the development end of flash) will not run on Linux. Only the player.

oh really
that's news to me

This would need to be a pure Javascript solution.

if you think so
sometimes our minds are prisons of our making
our own*
I'm on slackware and I bet I could do it
:|

does prototype provide a way to find the X/Y coords of an element?

I thought there was an OSS to create flash movie?

there are tools for oss flash
and flex
but you don't even need them
people have created flash tools for javascript mp3 players
which are freely available

hey again everyone

why would Event.stop(event) fail in IE6?
i get an error every time i try to use it

is their a way to get an alternate right-click menu in Opera? i can do it in Safari, IE, and Firefox, but not Opera =\
hello bknitram =P

hi

is their a way to make a custom right click menu in Opera? i'm working on a webos but i want to have the rightclick menu work cross-browser before adding it

RockerMONO, if you have that working in firefox, porting to opera would be easy

well… http://mcgw.dav7.net:8080/javascript/rightclick isn't working in Opera but does in Firefox, IE, and i'm pretty sure it works in Safari

hmm
opera supports document.all
but also getelementbyid

oh

you should try loading prototype or something, and use Prototype.Browser.IE/Opera

dude… i dont want to pull in prototype fora freakin browsercheck
that's huuuuuuge overkill

you might use it for the rest of the app too
atlwast copy the browser part
!!(window.attachEvent && !window.opera),
!!window.opera,

OH YEA! opera has window.opera
so, do you know if opera would support the current firefox way of doing it?

RockerMONO, why not try?

i am =P
can someone test http://mcgw.dav7.net:8080/javascript/rightclick in opera?

doesn't work

did you go to it before? if you did maybe clear your cache??

opera=document.opera should be window.opera

OH
oop
*oops
ok try again?

nope
indent your code, RockerMONO
easier to debug

alright
indented =P

you borked it :p

huh?

ywah, missing a } or something

O.O

hello, can someone tell me teh proper syntax for removing horizontal scroll bars in both IE6/7 and Mozilla?
I tried using overflow-x, but that hides everything in IE

mk try again haha
one moment, i think i have something

no

?

still doesnt work

hm
any errors?
sorry, cant find it =\ i thought i had it on this server

no errors

hmm

I have been struggling with this for a while.
why wouldn't "x-overflow:hidden" work for IE?

try again and see if you get the welcome message =P if you do then it's the way i'm making the menu

`js ref overflow

`js ref

http://developer.mozilla.org/en/docs/JavaScript , http://devedge-temp.mozilla.org/central/javascript/index_en.html , http://phrogz.net/ObjJob/ , JScript@MSDN: http://tinyurl.com/9pk3l , www.crockford.com/javascript/

Your using Opera!

or overflow-x
or anything at all.

ok so it's the way i'm making the menu show up
actually, for that it's more of something to ask #css

Hello, I need a custom javascript code to slide images. I want to know if anyone is willing to earn some bucks. What I'm looking for is here http://www.gamespot.com/video/918428/6172011/

cuz you would need to dothat in CSS, not Javascript =]

On the part where it says Lastest, I want that thing for my webpage only that part
Please pm me o send me a mail to rodrigo@eel.com.mx (its also my MSN), Thanks guys!

why in CSS?
and I am doing it in CSS
I am putting in style=""….

yea, so ask in #css

RockerMONO, in displaymenu , try changing from if (mozilla){ to if (mozilla || opera){

ok

they'll make me do stupid validation, but I'll try

done =P

still doesn't work
RockerMONO, i meant in the displaymenu(e){ function

erm
i did

no
you did not

if (mozilla || opera){
document.addEventListener("contextmenu", displaymenu, true);
document.addEventListener("click", hidemenu, true);
}
^- yea i did

yeah, but that's in the global scope

…so what are you talking about then?

not in the displaymenu function

um that is in the displaymenu function
refresh the page again, maybe your cache still holds the old version or somethin
oh woops
my bad
try again lol

see^^

soo try it again =P

lol, are you using this? http://www.javascriptkit.com/dhtmltutors/domevent4.shtml

nope
diff tutorial =P

well, the code is exactly the same
I would advice you to fin another tutorial
browser sniffing like that is bad

oh
but does it work? =P

no

http://www.harelmalka.com/rightcontext/ — does that workin Opera?

why are you asking him that?

erm… cuz i dont have opera?

he's too lazy to download opera him self :p

wtf

i dont even think opera works on Linux, does it/
?

just get your own copy you lazy SOB :p
yes it does

`js ie debug

now leave bjorninge alone

erm since when does it work on Linux?

chronos-work: woosta deprecated 'js '
ages

RockerMONO, since like version 3.5 or something

chronos-work: `ie debug

ahn…I used this morning …
`ie debug

Best(Visual Studio): http://msdn.microsoft.com/vstudio/ , OK and Free(Script Debugger): http://xrl.us/sr7a , Leak Detector: http://outofhanwell.com/ieleak/index.php?title, or see `js firebug

RockerMONO, there's a setting in opera which needs to be ticked to allow script to react on right click

whats the empty function that buubot has?
i thoguht it was ] empty

`empty

A function to empty a node of content: function empty(node){ while(node.firstChild) node.removeChild( node.firstChild ); return node }

^- there
lol
] empty

wrong bot

not there
=P

function empty(node){node.innerHTML = ''}
that's a hell of a lot quicker, but not in the DOM spesification

And dangerous
`innerhtml sucks @ bjorninge

innerhtml sucks: If you have events on elements that are rendered via innerHTML they do not go away when you empty the innerHTML area. They may even crash your browser. You cannot use innerHTML for building items like tables in IE. You cannot use innerHTML for adding options to
selects

elements in innerHTML are not executed.

yeah, I know

http://rick.measham.id.au/paste/html2dom.htm makes dom drop dead easy

and some special html chars

that's so overkill :p

yeah i know.. i tend to over do it there

it's good, though :p

hmmm empty locks up…
wow ff realy sucks when a script gets stuck
firebug points to while(node.firstChild) {

after an event is executed, how do i find out which element called the event function

add this?
onevent="func(event, this)
how can i add a onload even from the middle of a page?

umm
thats..

would document.body.onload = func(); do it?

completely.. pointless…

from inside a script

no
you cant do that
because by the time it gets to the script
it wil have already loaded the body
html DOES load in the order you put it
bai

and replacebody2 empty(body2) but im getting a hang

a_2.appendChild( document.createTextNode("›") ); doesnt get rendered… short of using innerHTML is there a way to force it to render
or anotehr type of node

guys
i figured out why my overflow-x:hidden code doesn't work
the doctype 4.01/strict doesn't support it!
but then what doctype should I use?
should I let the browser decide?

how can I access all the selected options of a multiple select list?

simmerz, loop through the selectElement.options

ah right yes. and then see if each is .selected ?

and check if the currentElement.checked
simmerz, I've actually done that my self, if you want the code

that would be great!

look at getSelectedOptions(list)
http://dabear.mine.nu/test/jebbis/
hm.. yeah I meant .selected, not .checked

great. thanks for that

is there a keyword for passing a reference to the object that initiated an event, like a onclick="dosomething(this)"do/a, except 'this' refers to the window, instead I want it to refer to the link? thanks

hey guys — how can i position a div (that has position:absolute) in the center of the viewport? are there any properties that would allow me to do this cross-browser?

grigora, this would refer to the link in the case above

grigora, in your example 'this' refers to the link doesn't it
@ bjorninge

you are sooo slow :p

great minds think alike
…. i was .1 sec slower =\
i would have been faster if I didn't add "doesn't it"…

nah
prove it!


………………….
it is self-evident

no, it isn't

agamemnus: it does, i had another problem, thanks

you might have used longer to check if you wrote correctly or something :p

`js domref onload
=|
`js ref onload
what the heck
`js ref 'onload'
the bots are boycotting me

yeah, didn't work earlier neither
-n

I have a question about onload
I have two images with an onload statement
but only one executes
(the first one)

happens when html is rendered and all iamges are loaded

why?
can I make it specific to one image?

sure.. just add an event listener

how?
inside a tag

input type="button" name="Buscar" value="Buscar" onclick="javascript:buscar_cep();" /

onload="" should work :p

is that right ?!

silici0, no

it doesn't
it only loads once

because a name="" should be in english, not spanish

how is the right way !?
onclick="buscar_cep()" ?

hi
can someone help me please

me first

silici0, USE ENGLISH NAMES

it´s working on firefox but not in ie.
;/

i want to add an option to a select box.. the select box name is 'vote' and i tried this: javascript:alert(document.forms[4].vote.add(9999)) but it's not working

is there someone here that has a clue? i've asked for help a couple of times before and got nothing useful

Saberu, problem is what?

onclick="find()"
is that right ?!

shipi, add?

my form validation function isn't returning false because the form still posts

what?

Saberu, then there's a synthax error inside somewhere

yes, that should work, silici0

i want to add an option to a select box

let me try

shipi, is add a function that exists?

thanks
;P
still not working

something else is wrong then, silici0

Saberu, then there's a synthax error inside somewhere

strange

i made it always return false

in the firefox work just fine
and ie. say it´s wrong in the call function

function find() {return false;}?

http://paste.lymas.com.br//?q=6964
that´s the code
is that right or what ?
the button are inside a form

what the
$.post('ajax/cep.php',{
$('input[@name=cep01]').val(),
},

it´s a jquery
a framework
;P

it's not a JAVASCRIPT query
that's not supposed to work in javascript..

i had change to function buscar_cep(){ alert(); }
the framework is written in js
see at jquery.com
anyway
still not working whitout the jquery

prototype

i don't know what it's supposed to do so I can't help (I don't know prototype)

that´s ok
i think i find a way
thanks man
;P

ok
sure :-|
`js ref 'childnodes'

Hello. Is there anyone awake here who is familiar with this JSON object to string thing?

depends on the framework you are using

How do you mean?

?
json is not part of javascript natively..

You must understand I'm a bit of a noob. I'm not sure what you mean by 'framework'.
Well I don't know, one way or another some people on here managed to figure out a way for me to use it.

just ask your question

Well, I need to debug it. Certain information is not being preserved properly.
I don't want to edit the JSON code itself as I would only screw it up. I'm more looking on how to build my other code around it so that it works.

what functions do you use for json handling?

Um wait a second, I'll go check

if create on php and return to a js function i can maybe help u
:P

Okay first I'm inserting the code from http://www.json.org/json.js
Then I use .toJSONString() and .parseJSON()
Is that what you were asking?

yep
I would rather load the prototype framework instead

Okay then. Anyway one way or another, I'm losing numbers from a JSON-encoded array.
Wait what?
I'm a noob at this, I don't know what a framework is in this context nor am I familiar with prototypes.

The Prototype JavaScript Framework is a JavaScript framework that provides an Ajax framework and other utilities. Though available as a standalone library, Ruby on Rails integrates the framework as well as other projects such as script.aculo.us and Rico.
Prototype provides various functions for developing JavaScript applications. The features range from programming shortcuts to major functions for dealing with XMLHttpRequest.

That…doesn't really…tell me anything. I'm a noob, I work with the simple stuff and I just want to design my other Javascript code around these functions.
It seems that people keep assuming I have tons of fancy server-side code going on. I don't, it's all simple stuff.

okay, bu basically, it provides ways to handle json
and other things

I'm not sure how that 'handles' JSON any better than what I have now… See, in most cases my functions work.
It's just some certain things that aren't getting encoded properly, the rest gets encoded and decoded perfectly.

hm, I have no experience with those functions you see :/

Hmm
At first I thought it was my own syntax mistake, but I've looked through the relevant code and I haven't found anything.
At first I thought it was my own syntax mistake, but I've looked through the relevant code and I haven't found anything.

give some example code, a working demo, and explain what errors

That would be difficult…
I can give the code which I am pretty sure is faulty, but it would not be an entirely self-contained demo…that would be rather hard not to mention long

taht's your problem then — there 's a good chance that if you took the time to build the smallest possible demo that displayed the problem, you'd solve the problem

It's possible…but somehow I doubt it. Very little of my code is 'unusual', so to speak.
Almost all of it seems to work perfectly, and I THINK I've narrowed it down to some problem occuring between my code and the JSON functions.

so write some code that tests how you're using those JSON functions
its' called "programming"

I'm aware of that… I'm not sure what exactly you mean by 'tests' because I've already narrowed down the SYMPTOMS of the problem…

Hello, I need a custom javascript code to slide images. I want to know if anyone is willing to earn some bucks. What I'm looking for is here http://www.gamespot.com/video/918428/6172011/
On the part where it says Lastest, I want that thing for my webpage only that part
Please pm me o send me a mail to rodrigo@eel.com.mx (its also my MSN), Thanks guys!

I'm sorry to act like this, but I generally prefer not to try a complicated solution for a simple problem, you know what I mean?

yes, you want code you cut-and-paste to just work, and if there's a problem you want to be able to give some one a general description and they'll say, "oh yeah that's cuz of xxxx, no problemo"
it almost never works that way

I see what you mean, but at the same time it seems to me that the problem must be very simple, plus it only happens in one particular instance and I can't see any possible way for it to be related to the bulk of my program.

ok, write some code that just displays that instance where it doesnt work
and paste it in a pastebin

Hmm…I forget that link for pasting code…
I probably should have favorited it last time I used it ;P
http://pastebin.com/d2c02cf8
In case you're wondering, I'm making a Javascript RPG and I'm using JSON for a save/load function.

:[]

Does that code look okay to you vinse?

javascript R…..P…….G…..

What about it?

very interesting that ur making it in javascript

How so?
What do you think I should write games in?
Oh, and vinse, if you're still here, one thing. The only case I know of where it messes up actually uses a number rather than "blah blah blah" in the example code, if that makes any difference.

green_meklar, you should probably not make games in javascript

Why not? o.O

because Javascript does not have direct access to the graphics system or the OS
and because its system for defining variables is inefficient

I'm aware of that… The only reason I'm using it is because I'm learning it as the first step on the path to something useful like C++
Back before I knew Javascript, I wrote games in Excel 4.0 because that was the only language I knew. One thing at a time…

do you know any BASIC dialects?

Nope.
Wait
I know some TI-Basic, does that count?

isn't Excel like VB?
sure

The recent versions yes
Excel 4.0 uses an older language

I use this, here, to program:
#freebasic
(it's a channel link)

I've heard from other people that Basic isn't very good and C++ is way better.

basic based languages are easier to understand
usually they don't provide as much opportunity for obfuscation

Yes, but if they're crappier then I don't really want to waste time going down that path do I?

they aren't crappier

Obfuscation isn't my primary concern as I'm in favor of freedom of information

what I mean is this
say you're stuck on something and you need help
would you want all the examples to be incomprehensible without hours of decoding?
that's one the main strong points of BASIC based languages

No…but if it's a tradeoff between that and having a slow, weak language…

there's no tradeoff
if by weak you mean "harder to obfuscate" then yes (although not so much in more recent Freebasic versions)

Well this is just what I've heard from others. Anyway it's not very relevant to my current problem, so let's not get hostile over it.

but the second strong point is this:

a lot of BASIC based languages have a tiered system
you can start using somewhat slow premade graphics and text functions

Which basically means…you write something simple and then go one level down to edit it and it suddenly becomes horribly complicated?

then you can use graphics libraries

I mean the tiered thing

no
and finally you can use the directX system itself if you feel like it
so understanding how to program and being able to actually do something in a more complicated but more efficient way are separated

I'm not even close to that level yet anyway. I generally don't go into a language because it has [insert geeky reference here], I'm too much of a noob for that.

well, with Freebasic, you can peruse thousands of examples, libraries, and tutorials to make an RPG
as Freebasic is very compatible with qbasic, and very similar to other BASIC languages

Ha…I keep looking up 'examples' and 'tutorials' for just about anything on the Internet, and 90% of the time they're useless…

well, the Freebasic community is very tight-knit and you are sure to find what you're looking for
I mean, I don't even know where to begin.
there's the newsletters..

That's often exactly my problem…

the forums…
there's tutorials and subsites everywhere
if you use google to try to find things, of course it's harder
especially if they're extremely specific
ok, have a look at the Freebasic Games Directory
here
http://games.freebasic.net/
they have 7 very good RPGs listed that are totally compatible with Freebasic

Um… While I'm sure you like your languages, I'm also sure there's plenty of support for just about any other language out there too, and I think the C++/Java path is better for me. One way or the other, choosing my next language is not what I'm on here for.

so what are you here for then?

To solve my Javascript problem…

but if you used a different language, it wouldn't be a problem.

Yes but right now it IS a problem. And I want to be sure I understand Javascript before I move on.

…because Javascript is very limited and hard to create cross-platform compatibility

Besides, I'm not retyping all my code at this point…

but what is the problem?

Well…

sure, you can start your next RPG using Freebasic

I'm encoding an array using the JSON script, and the array has elements which are numbers.

Hi! can anyone help me with my problem?

However the numbers don't seem to pass through the encoding and decoding process intact.

i have this script
how do I use it??

….

Hello, I need a custom javascript code to slide images. I want to know if anyone is willing to earn some bucks. What I'm looking for is here http://www.gamespot.com/video/918428/6172011/
On the part where it says Lastest, I want that thing for my webpage only that part
Please pm me o send me a mail to rodrigo@eel.com.mx (its also my MSN), Thanks guys!

^— Spambot?

Rodrigo-mx, please, STOP SPAMMING

I'm not spamming

you are

its just my second message!

green_meklar, wouldn't you say that this a problem with the library you are using?

I'm not sure what you mean.

eg, trying to figure out how to use it.

Rodrigo-mx, just copy that script ??

does anyone know why the following code does not have any effect? - div.style.padding = '20px'; where div is created by [var div = document.createElement("div");]

bjorninge I don't know anything about JS

I'm still not sure what you mean. I'm just trying to debug something… I'm sure any other language would also have confusing parts in it.

and I need a little bit of custom
but if you can do it, Ill pay you for it

Rodrigo-mx, then go somewhere else

Debugging is pretty much universal…

bjorninge here there are a lot of pro coders on JS

green_meklar, ok

I think here is the best place to find one interested in this )

no, there is not

green_meklar, can you paste some code?

I did…

mostly basic questions

http://pastebin.com/d2c02cf8
Technically the place where I put "blah blah blah" should be a number.

but the people that answer those questions usually know a lot

if i push a GZIP-compressed javascript file to a browser, what's the correct mimetype? just multipart/x-gzip?

if you have other suggestions
Im free to hear

or is there a javascript-gzip type

i see.

Does that look okay to you?

so, othervar[v_asdf] = 4
or something?

Yes

what's saveid?

That's something input by the player

does it exist?

It is definied by a prompt

from the prompt function
I see

defined*

so "save" is inside a double array
is that right then?

Yes I suppose so.

basically you have no JS errors

Note that this whole thing DOES work with other arrays that aren't 'othervar'. It's just that one that screws up.
The whole v_qwer system is because the JSON script requires that array elements be numbered.

can you give an example of one that works right?

Um…all the other ones work right when I have them in the actual program.
They are all arrays.

I don't understand….

Neither do I. o.O
That's the problem.

so if you have "othervar.toJSONString()
it doesn't work
othervar.toJSONString()
oops
and "somevar.toJSONString()" would work?

Um yes
The different arrays have different things in them which I think may be part of the problem as it is about the only difference

you're passing all arrays to "toJSONString()"?

All the ones that need to be saved and loaded, yes.

and othervar is basically just a one element array?

Only in that example.
All the arrays have multiple elements in the real program.

but what's the difference between othervar and other arrays?

I have no idea. There shouldn't be any, really.
othervar contains numbers as elements, most of the other ones contain objects but there ARE some numbers there too.
Is there some way in which having numbers in an encoded array doesn't work?

perhaps the ones with numbers have a problem with them but you didn't notice

perhaps someone could help me with this… I have a Text node that I created with createTextNode — I am trying to set the attribute of an element's title — setAttribute(title, textnode) — but it's returning "Object Text" — is there a way to display the actual text string?

I don't think they do have a problem, I'm pretty sure I would have noticed if they had.

ultravi01, innerHTML?
green_meklar, can you paste the to toJSONString code?

what would that look like?

How do you mean?

myobject.innerHTML

The script I'm using for that function?

green_meklar, I don't know what toJSONString looks like so we can't really tell where the problem is….

http://www.json.org/json.js
I'm inserting that first, after that comes my own program.

it's in some sort of compiled javascript code
either that or the spaces are not normal…

Well I have no idea, I don't know how the JSON script works. I'm just trying to build my code around it so that they work together.

like this:? $('hovergraph').setAttribute('title', innerHTML(this.hovertext));
i'm using prototype btw

ultravi01, i don't know prototype so i don't know
ultravi01, myobject.innerHTML = "blah"
green_meklar, wait a sec

No problem, I'm going to go try one more test, be back in a minute.

ok, so let's say that JSON is a script that takes in data and sends it back out

Yes that's close enough to accurate.

when you are loading it, are you sure that your data structure that is to be loaded from the JSON string is the same as the data structure you saved to the string?

How do you mean?
The string is not being altered in any way between the saving and the loading.

JSON is built on two structures:
A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

Okay…

so, does this mean that you don't have to specify ANYTHING when loading in a JSON string?

So how does that affect what I'm doing? My program assumes that the array coming out is the same as that going in.

try this:
save the structure, then immediately load it
is it the same?

That is difficult to tell.
In order to get any data from the arrays, I have to have the program do something else to display the data.

maybe if for instance it's 5 arrays of 6 elements each in the beginning
and then you load it as 6 arrays of 5 elements each
that would change your data

Um…how would I load it differently?

i don't really know

Like I say the program assumes that they are equal and doesn't change the string in the meantime.

the code you provided is too small to figure out the problem

That's strange because it seems to me that that's the only place a problem could even exist, judging from the symptoms.

ok well let's see..
save[saveid][v_othervar]=othervar.toJSONString()

That looks right…

this means you are saving the string inside save[savid][v_othervar]
saveid(

Yes, that's right. Then loading it from there.

othervar=save[loadid][v_othervar].parseJSON()
and you're loading it back here

So…is there something wrong there? It looks right to me.
And OTHER arrays work under my system.

are saveid and loadid the same?

If they aren't the program says so.
It only loads if you type in the name of one of the saved games.

can't you just do an alert for old time's sake?

Like how?

whenever that old time may have occured
alert(saveid)
alert(loadid)
right before you save/load

You mean right after?
It doesn't exist before.

right before
right before this:
othervar=save[loadid][v_othervar].parseJSON()

But after you type it?

it still says Object text — can you not assign Text nodes to object attributes ?

and right before thi:
save[saveid][v_othervar]=othervar.toJSONString()

Yes that could be done. I'm not sure how it would help though. I already know for a fact that that can't be the problem because the other arrays load just fine.

just do it…

What I AM doing is trying to see what the numbers are (the ones that don't pass through properly)

ultravi01… what still says Object text?

I can do your test after, I'll finish this one in a minute.

the title of my div

oh, the title of the div?

yeah

should divs have titles?
i thought it was a header
wait..
like…
divsometext/div?
or something else?

no like this div name = textnode
sorry, not title

Okay…the numbers that don't get through seem to reset to 0. I'll have a look at some of my other code and see if I can find anything.

name

div title="textnode"?
or..
oh, ok
div name="textnode"?

right

ok, so why can't you do mydiv.name = "blah"?
sorry, that doesn't work?

Nope…nothing there. Somehow those numbers are being set to 0 while my other numbers remain unharmed.

green_meklar, one other thing

?

parseJSON

What about it?

what does it return? should it return an array object?

it says "object Text"
if I do that
[object Text]

Yes, it should return the arrays just as they were encoded.

ultravi01, … again, what says "object Text"?

the div name I just set

ultravi01, so you do div.name="blah"; alert(div.name) and you get [object Text]?
green_meklar, so can you make sure, with alert, that saveid and loadid are the same?

correct

Okay…

ultravi01, 1 esc
sec

k
this.hovertext = document.createTextNode('percent')

background_flower.name = "hello"; alert(background_flower.name), it returns "hello"
background_flower is a div
you don't need to create any extra nodes

Yes, it looks like they are the same.

green_meklar,do you do the load function right after the tosave?

As soon after as I can, basically, yeah. What do you think could get in the way of that?
Is there some specific action by the program that could mess that up?

something that changes the value of the string

No. The JSON strings are left entirely untouched save for saving and loading.

so the only problem is that some numbers become 0?
like.. 5 to 0 or what?

1 to 0 in the case I proved.
Another one remained 0

green_meklar, perhaps JSON is having trouble with the double array?
can you just do something like "mytempvar = othervar.toJSONString()"?

That doesn't make sense because I have other nested arrays which work.
Which nested array are you referring to exactly?

save[][]

Oh, I was thinking of another one.

anyway….

is there any way to get the left and top of an element even if no style is explicitly coded into the element
like is there any way to get the default style values

one good way to fix bugs is to simplify the problem

or the browser-generated style values

No, the thing to remember is that the functions work with other arrays. othervar is the ONLY one that has had a problem.

sure, but just do it

Sorry I meant no to your earlier line.
How do you suggest simplifying the problem any more than it is already?

green_meklar, use "mytempvar" instead of a double array

I see…

metsfan, I think there is but it's not coming to me

So you want me to keep that for both saving and loading?

yes

so it is worth pursing this?
or is it a dead end

Wait a second I just did another of my own tests…
I'm gonna go check my code again for a minute.

metsfan, yeah, but everyone here who knows the answer is not here
eg fatbrain, woosta, etc.
metsfan, i

k ill do some googling
thx

i'd go try the EFnet server
or put that problem off till later
or maybe #CSS

agamemnus, it's true that variable names theoretically have no maximum length on them, right? And that inserting a semicolon is just as good as making a new line?

I'm not sure to both

Hmm…
I may have to do a test on that too then. Be back in a minute.

how can i force IE to reload a Ajax page? header("Cache-Control: no-cache, must-revalidate"); doesnt help

dk.

try changing the etag header
and the last modified header
and the expire header

Nope, it looks like neither of those could be the problem either. I really have no idea how to fix this.

green_meklar, did you make it a simple variable then?
instead of a double array?

Not yet.
I have one other thing I'm going to try first…

try that, it just simplifies your thinking even if it does nothing

See I just found that some numbers in the othervar array ARE preserved.
Only certain ones are lost, even there.

is there any pattern to the madness?

Possibly.

do they get cut off at a certain point?

Possibly.
Do you think having an array element that was undefined could cut them off?
Or rather, set them to 0 WITHOUT making them undefined as well?

if it is undefined it's possible that could throw off the json thingie

I'm going to try this test and see if it solves my problem…at this point I think it's the most likely place for the problem to be.
Be back in a few minutes.

now how can i get IE to reload to see the new headers?

CTRL+F5

grr dont think its going though vnc right

TEH OMGZ IT R TEH WORK
I will need to keep this in mind for future debugging…could be a very nasty problem.

blinking text doesnt work in ie
testing

Thanks for your help, agamemnus! Hopefully I won't have any reason to come back in the near future, hehe

green_meklar, sure
green_meklar, #Freebasic is always there for you in case you get desperate

lol k
btw my RPG won't be very good, it's a mostly text-based RPG something like Nethack. If you want to have a look when it's done (I'm still going to do some testing on other issues), you can just google my name and click links intuitively until you get there. I'm not sure when I'll have it up,
probably today or tomorrow.

cya, and thanks again!

ok guys
i'm putting all my content on one page
BWAHAHAHAHAHA
you can't stop me!!

whats a better way of saving data on http://tools.scotepi.net/four_squar/ ? right now it saves onkeyup… but thats not solution if i Ajaxed it… even for cookies it could add a bit of lag
and onunload is to unreliable

saves onkeyup?

yes

?

it saves all the inputs to a json array in a cookie

BWAHAHAHAHA COOKIES YES!!!!
Use an SQL database?
and PHP

but how can i have it send to the server thats not ever sec?
thats the question

not ever sec?

onkeyup is a bad solution for ajax

10sec

why are u saving so often?

and also have a unload
becuse i dont know how
that was the question
how can i have a reliable save solution thats not onkeyup

have a button

but thats not web 2.0

to save
….

it needs a auto save

use a timer

15sec or whatever

and also have a unload

and why isn't onkeyup reliable

um… it spams

spasms?

if you typing a sentance for every letter it will save to the server

you want it to save constantly, or not?
focus?
use focus triggers

i think the onkeyup with a timer limit would work

mp
no
ok, maybe.
onkeyup .. set the timer.
or:
onkeyup, if the timer is less than X, then save… otherwise reset the countdown timer
or.. or even better
onkeyup, reset the timer
ontimerdone, save

Hello, I need a custom javascript code to slide images. I want to know if anyone is willing to earn some bucks. What I'm looking for is here http://www.gamespot.com/video/918428/6172011/
On the part where it says Lastest, I want that thing for my webpage only that part
Please pm me o send me a mail to rodrigo@eel.com.mx (its also my MSN), Thanks guys!

shit, fallout 3 :p

help someone

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

I have a crashing recursive script

"agamemnus" at 71.6.194.243 pasted "crashing recursive script" (19 lines) at http://erxz.com/pb/4089

`buubot managementspeak
`buubot managementspeak 'hello'
managementspeak 'hello'

Its schemas meshs out-of-the-box paradigms. This methodologies are a distributed paradigms ifs, untils this e-commerce unleashs your mindshare. Nevertheless, its web-readiness is prepared now that they briefed our bandwidth. Where they strategize this front-end ROI, we can grow my
infomediaries. In order that we benchmark my efficient e-commerce, t

managementspeak 'what a beautiful day.'

Wherever we named our portals, this turn-key vortals earned my next-generation synergies. They shall empower its paradigms so that my next-generation deliverables must target my e-commerce. Until we received our distributed synergies, your metrics explained my strategic users. Its
methodologies leverages robust solutions. Your markets are negotiate

insult buuboy

buuboy is a bilge rat!

insult buubot

buubot is a land-lubber!

insult buubot

buubot is a whoreson!

core

Module does not appear to be in core. Perhaps capitalization matters or try using the 'cpan' command to search for it.

core 'what is this'

Module 'what does not appear to be in core. Perhaps capitalization matters or try using the 'cpan' command to search for it.

bibleit

63 But Jesus held his peace, And the high priest answered and said unto him, I adjure thee by the living God, that thou tell us whether thou be the Christ, the Son of

squeeze buubot

bubot

agamemnus, i hate your indent scheme

shorten hellp

Couldn't shorten URI.

shorten hello

Couldn't shorten URI.

preaction_, any idea?

i can barely understand your code, give me a minute

i had some problems earlier with hasChildren, so I changed it

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: