if I dont move the declaration of the time variable to firstCalled then it wont get reset and the timer will stop
shouldn't the function on line 9 match the one called in line 7?
Oh yes, thats a typo. Correct.
\o/
i look for some simple rtf editor (just need bold/underline buttons)
any idea?
iframe based prefered.
Search for free WYSIWYG editors.
Yahoo recently added a rich text editor to YUI. Might be worth a look: http://developer.yahoo.com/yui/editor/
http://www.themaninblue.com/experiment/widgEditor/
if I don't move the declaration of the time variable to firstCalled(), then it wont get reset and the timer will stop after it hits 0, right?
Wait. I will paste a simple snippet.
Sorry about this :s
oh wait
I think I got it
Heh
keep the declaration out of the functions, set it back to $seconds when it reaches 0
Yes, thats what I was saying.
That way it will keep on ticking.
any idea why this wont work? $(strDivIDCloser).onclick = function() { alert("Closed!"); }
where $ is that generic prototype function
Pixotic- : http://pastebin.com/m605ae98b
o_O
that looks a lot more complex than what I started with xD
I thought you needed a working solution… ;–)
Oh, believe me I do
and thanks again
I'm sure this kind of stuff isnormally way below you, I appreciate it
I hope it works for you.
well the file on its own sure does
now to try and transplant it
one question
why the CONST var?
why not just declare time to be 6
Thats good programming practice.
feels woefully ignorant
You will notice I use the value 6 at two different locations.
I'm self taught mostly, so a lot of the etiquette is missing
If I need to change 6 to 60, I will have to make changes at two locations.
Imagine this for a large program.
More changes = more bugs
Ah, that makes sense
Good.
how can i make any div onclick do somethng just with js?
is div.onclick=alert("test!");
hello. does anyone know where I could check the syntax of a javascript document, where I could find errors in the same way as I would by compiling source code…
firefox with firebug extension
document.getElementById("divId").onclick = function { alert("hello"); };
yes I use that already but it doesn't give errors as compile time, it gives errors at runtime only when a specific function is called etc etc
I'm looking for static debugging capability
Javascript is a weak and dynamically typed interpreted language. You won't find the kind of capability you are looking for AFAIK.
it's working perfectly, thank you!
http://madl33t.net/orion/timecode.php?time=5
Pixotic- : You are welcome. Enjoy
thanls
what is the other way of holding data in javascript tan arrays?
i forgot the name ……
Hashmaps
Almost everything is Javascript is a hashmap i.e. having key value pairs.
but it ws a way to hold data that was great for ajax, hmm what was it called ….
JSON ? XML ?
e319, JSON
ah no
you're asking for a way of storing data?
Objects.