Supose i receive from a server a line like this var myglobal=1 i need to use eval and i want to make that var
‡d1yTs ÝT1u Ýoy~
4tw
hee
the quick fox jumped over the lazy dog
ƒop ŽzPl Ýe‡ yÝŒo pÝdon~ xo_ žT1nb Ýe‡
missed "brown"
http://www.revfad.com/flip.html =P~ tis js FYI
hehe
?op u?o?q ?z?l ??? ???o p?d?n? xo? ??inb ???
fail
means
are you using … mirc?
your irc client doesn't do unicode
ya
htehe
?op u?o?q ?z?1 ??? ???o p?d?n? xo? ??inb ???
that'll explain it
yup
the quick fox jumped over the lazy brown dog
damn.
ƒop uoyq ŽzPl Ýe‡ yÝŒo pÝdon~ xo_ žT1nb Ýe‡ Ýoy~
but yeah, needs brown in there, or it doesnt work
http://cbs4.com/local/local_story_189151333.html
maybe it was a sign
heh
http://www.thinkgeek.com/stuff/41/dreamphotoframe.shtml
http://www.news.com.au/dailytelegraph/story/0,22049,22056684-5001028,00.html
THE Iraqi port city of Basra, already prey to a nasty turf war between rival militia factions, has now been gripped by a scary rumour – giant badgers are stalking the streets by night, eating humans.
AMG GIANT BADGERS
haha CommandPrompt
http://www.thinkgeek.com/tshirts/generic/8ba2/
not a bad one, the story is so-so ^_^
I'm having some trouble with document.body.onload
I'm getting an error
document.body has no properties
right
what's the name of the function, or what are you calling?
let me paste somewhere
`paste
Paste links, not code: http://erxz.com/pb/ http://pastebin.parentnode.org/ http://paste.css-standards.org/
http://pastebin.parentnode.org/18241
thanks a lot for helping
I just don't get what's wrong
if I do document.body.onload = init;
I get the error
but if I put it inline body onload="javascript:init();"
then it seems to work
but the function animatedcollapse don't work like it should
wlel
runtime
instead
window.onload=init;
ok
it works
yet and thus, there's no document.body yet
I understand
but the function is not working
as it should
let me upload all this to a server so that you see what's happening
k
http://tiger.towson.edu/~knoagb1/test/index.html
http://tiger.towson.edu/~knoagb1/test/lib/animatedcollapse.js
looks ok
tell me, I'm trying to do expandable divs, if you know a script to do that… or a way
I've been trying to make this work for hours now
..
well
I assume is done using YUI
then again, I don't use YUI
I tried that ealier
it was wayyy overkill
I can basically do the show/hide in pure javascript/css
but I need the animated steps
I don't know how to do that
.
ok
heh
I'm tired, I'm going to sleep, see you thanks a much
-_-
"Woosta" at 71.6.194.243 pasted "Fade In" (6 lines) at http://erxz.com/pb/3537
Guess I'm a few seconds too late
morgan
there is no function in javascript to manipulate a long number and add commas where neccessary is there
for example 123456 into 123,456
.. no built-in
write one yourself
Thank you.
..
`js printf
`js ref printf
`js ref print_f
`js print_f
is it possible to write a "eval" wrapper?
not there =P
an eval wrapper?
yes
meaning?
I have a function function convertPercent(population,customers). When i try calling this from another function such as: convertPercent(area_population[i], customers_in_area[i]) firefox tells me convertPercent is not defined.
paste code
var f=function() { eval("var a=1;"); } f(); alert(a); obviously won't work
undefERROR: syntax error at (eval 351) line 2, at EOF
so i wan't to provide the "this" object somehow to eval inside another function
a so called, "eval wrapper"
maybe because var a is outside the scope?
yes
have you tried alert( f.a ) ?
so i'm trying to run eval, inside other function, but with the object provided as "scope", do you think this is possible?
Supose i receive from a server hosting a line like this "var myglobal=1", i need to use "eval", and i wan't to make that var "global", how can i make it?
could someone please have a look at http://pastebin.ca/615721
The paste 615721 has been copied to http://erxz.com/pb/3538
so what?
lol
this will work var f=function() { eval("this.a=1;"); }; alert(new f().a);
i'm trying to create a global with eval
well make f() contain all your global functions
you can extend it with prototype later…
that's not the complete code, for example the address array is missing
csaba the address array has nothing to do with it
bbl
Oh my GOD Firebug is so awesome…
bbl?
be back later
just when i tried to help him… oh well
eval(str, window);
thanks csaba for the help
heh
welcome to the firebug fan club
is there a way to get the script name in javascript ?? something like $_SERVER['SCRIPT_NAME'] of php
script name? Like Javascript?
i mean http://mysite/send.php?id=92 i want to get the Script name i.e send.php
location.pathname should return send.php?id=92 then you just extract everything before ?
is it possible to find the scope where a function was defined?
thanks
i was wrong, actually it will return everything except http:// and the hostname
hello, I have 2 radio buttons on a page, and I need to make clicking on a specific div activate one radio and clicking on another div, activate the second radio
so for http://www.mysite.com/aaa/bbb.html it will return /aaa/bbb.html
and?
csaba, and how do I do that ? to work on all browsers
mixandgo, what are the divs going to contain (just out of curiosity)?
breakerfall, nothing, just an animated gif as bg
mixandgo, in that case, use the label html element
breakerfall, ?
what does the label have anything to do with it ?
div is not clickable
mixandgo, when clicking the label element, it will focus (and in the case of the radiobutton, select) the associated form element
and then you can style your label element, however you want, animated gif horridness and more
I have a label and clicking it, doesn't do anything
mixandgo, then your syntax is bad
input type="radio" name="radio2" value="FT" /label for="radio2"Full Tilt/label
this is xhtml strict
it should be label for="id_of_formelement"foobar/labelinput id="id_of_formelement"
you're missing an id, so your label isn't associated with the form element
it might validate, but that doesn't mean it's good.
validation isn't the be all and end all of html
that's the number one rule.
aha, thank you
no problem
http://www.seoconsultants.com/html/forms/labels/
the thing is both are selected…
I need only one to be selected
the name of both radio buttons must be the same
input id="r2" type="radio" name="aaa"/
csaba, thank you
is there a way in javascript to know which script called the current page ?? Meaning if im on http://mysite.org/news-345.html and i click on email this story which goes to send.html page. On the send.html page is there any way to know that the page
was called from news-345.html page ??
Can I store a password as a cookie or will this password be readable by others when transfered between the client's computer and server?
didn't I already told you to use location.pathname?
or use document.referrer on send.html
come on, anyone? How would I find a parent scope?
I've declared a function inside an object, "this" refers to the object the function is declared inside…
how can I find the outer scope?
this.parent?
nope
it's not a DOM element
it's a javascript object
anyone else?
I know I could explicitly pass in the value of "this", or set it to another global variable
but is there any native way?
if you declare a variable in the global scope, for example var a = "444", then you can reach it like this
for (var x in window) { if (x == "a") { found it }; }
alert(window['a']);
csaba,
I already know that
I'm asking for a native way, if it exists
what's not native about window['a'] ?
because it's me setting the value
I already know I can do this
I was wondering if there's any information stored in an object constructor maybe, something that states the score where it was declared
prototype?
but it doesn't matter anyway, when the call is needed, the class is always instantiated, so I can use that.
wha?
you can access the super class with prototype… though you probably want scope :/
list with 3 li
but i don't understand why alert(document.getElementsByTagName("li").length); gives me 0
it shouldn't be 3 ?
I get 3, maybe you wrote your list wrong
ul
liaaa/li
libbb/li
liccc/li
/ul
doktoreas, are you making sure to do the test after the DOM has finished loading?
the quickest and dirtiest way is to assign a function to the window load event.
if you do it before, the chances are your js is trying to pull elements which haven't been rendered yet
would someone kindly inform me what function to use to turn 0.15001221029618692 % into 0.15%
0.15 % rather
toFixed ?
sweet
thanks haptiK
yw!
tag in javascript/DOM
Is there any way to make elements render faster?