| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> How do I make an array with length=5 and taht contains 0's? <1> var foo = new Array(0,0,0,0,0)? :) <0> I was looking for something a little more dynamic as the size may vary.. <1> let's see... what about <1> var foo = new Array(); <1> for (var i = 0; i < 5; i++) foo.push(0); <0> I have a function in a file. This function gets called multiple times from the same page. How can I make an array that the funktion can set elemets in and then have the array accesible next time function is called? <0> xiam: looks fine <2> anyone know of a smart way to draw lines in all kinds of angles? optimally i'd want to do something like line(from_element, to_element) <3> Mc_Fly: Sounds like you want a closure <0> Dorward: closure? <3> http://jibbering.com/faq/faq_notes/closures.html <4> is it possible that all useres that are currently connected to my site can play a javascript game against each other ?? <3> stuv: You'd need a server to coordinate everything. You could use XMLHttpRequest to have each client periodically poll the server. <5> stuv:yes <4> Dorward: does a normale webspace do it ?
<5> stuv:the state info has to be held at the server though. <4> where i have php/mysql/cgi ? <5> I use python <3> /jsp/asp/mod_perl/mod_python/pgsql/sqlite/etc/etc/etc <5> but php will do the same <4> factor: so i must store the ingame data in a file with js ? <5> no <5> with the server lang <4> so how to get the javascript script gets the data ? <5> the xmlhttp will read the state data from all the users <4> in what form ? <5> I use text but it is suppose to do xml <3> stuv: Whatever for you like. JSON is a good choice usually. <5> I cant get the xml stuff to work well. <4> is there no solution without xml ? (i have enouth other things to learn at the moment - so i don't like to do xml stuff) <3> stuv: as I said: Whatever form you like. JSON is a good choice usually. <4> can you please give me an link ... i have no idea what you mean ? <5> stuv:yes you can also use hidden iframes <3> stuv: You can format the data any way you like. <3> stuv: And Google will tell you lots about JSON if you want to take the route. <5> hidden iframe is the easies and most compatable to play with. <4> Dorward: ah ... so JSON is a format that i can use to store the client game data and send them via http <4> so i don't need any php ? <3> stuv: You need some server side language. Otherwise the client doesn't have anywhere to send the data, and you have nothing that can decide what data to send back to the client. <1> i'm trying to deactivate text selection while dragging a div, do you know how to avoid text selection? <4> Dorward: so i need a php script that handles the communication process ? <6> is it possible to change the css cl*** of an element using javascript? <6> (not the cl*** *definition* - just the cl*** name) <3> stuv: And make any game decisions (unless you want to trust the clients ... which are entirely under the control of the user). PHP is only one option though. <6> oh, .cl***Name. dude, this was difficult to find. <3> intrr: There's no such thing as a CSS cl***. .cl***Name will access the HTML cl***. <3> intrr: Its in the spec though. http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-011100101 <7> how can I change the color of the links <7> something like this -> document.a.style.color = '#FF00FF'? <8> ows: Not like that. There's a way, but Opera doesn't support DOM StyleSheets <7> I'm usin' firefox <7> so np with that <8> ows: Read up: http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html <8> Here's the support information: http://www.webdevout.net/browser_support_dom.php#support-domstyle <6> heh dude, I just "coded" a completely custom button in js and css :) <6> http://loom.intrr.org/button/button.php <6> i can just call a php function with text and action, and it will generate a button for that :) <6> (slow server, it might take some time loading the images, so maybe try 2 or 3 times until it's cached) <4> if i want to add a table into a div which has an id ... how to do that ? <3> stuv: document.createElement mydiv.appendChild http://w3.org/DOM/DOMTR <7> should this document.a.link="color:#FF00FF;" work off to change links color to #FF00FF? <9> hi, how can i detect when a <embed> is changing url? <10> hello guys.. I'm looking for examples of quality code to read and learn from. any pointers? <7> Nanobot: sorry, but why this document.a.style="color:#f0f;" doesn't work? <4> sail_: http://developer.mozilla.org/en/docs/Main_Page i found this ... complete javascript references and much more <0> How can I call a javascript function when I click submit button on my form and then only submit the form if the funcktion returns true. <4> sail_: and if you need some dev environment i would choose http://www.squarefree.com/jsenv/ <4> there you can enter javascript code and test it on the fly <7> sail_: javascript.internet.com/ ? <4> how to create an array of image objects ? <3> stuv: var foo = [new Image(), new Image() <3> ]; IIRC <10> stuv, ows: thanks guys, I'll check em out <11> b0at: Damn you. <4> Dorward: how to create array with 25 Image objects ? (pls simpler syntax if possible .. js newbie)
<7> fellows, <7> nodes = document.getElementByTagName('a'); <7> for(i=0;i<nodes.length;i++) <7> { <7> var nodeObj = nodes.item(i) <7> nodeObj.style.color = '#f0f'; <7> } <7> shouldn't this code change the color of the links declared in a tags? <11> stuv: Use a loop! <9> is there any way to detect when a flash object is clicked <12> mikeSnake: the flash object can tell you, why? <8> ows: It's document.getElementsByTagName('a'); <8> not getElementByTagName <9> frb-away i have a payed for flash mp3 player for my website <7> Nanobot: thx :) <8> ows: And what you had before doesn't work because it isn't close to what standardized JavaScript/ECMAScript and DOM allow <9> i want a vu meter/disco lights whatever some event.. to happen when you click play <7> finally it worked <13> any known cross-browser way to find oout linebreak positon in textareas ? <13> (ie I'm not looking for "real" linebraks - aka "\n") <13> I just need to find-out the position of the softwrap that happens in textareas <12> not possible <12> mikeSnake: maybe aflax can help you <12> tobie: considering font-size, screen-size, and other factors, I really don't think it's possible or practical to find the auto-wrapping in a text-area <13> frb-away: hummm... <13> frb-away: currently implementing a full keyboard for a touch-screen based application... and I'm having trouble mimicking the behavior of up and down arrows because of this... <13> Looks like you are right though... <13> s***! <12> well, if you use a monospace font, and size it in pixels it might be possible <12> but I'm too tired to figure out the details <13> lol... <13> I'm not the one design the graphic interface... so <12> the other option would be to force the size on the textarea <12> supposedly they take rows= and cols= arguments iirc <13> I've not clue what's going to be used. <12> `html texarea <12> `html textarea <14> html textarea: http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA <13> I've tried that... of course... <13> there are many relate issues though: <12> mostly, forms are evil <13> 1. without monospaced fonts, a textarea with cols attr of 60 can easily admit 62 - 63 characters on one line... <12> trying to style a form is like playing russian roulette with a bucket of reject hand grenades from the last world war <13> 2. often, a single line will contain a coouple character less because of breaks between words <13> its a real pain... <12> trying to style form elements is like trying to use a bobbypin to replace the pin on said hand grenades <13> Is there a way to obtain the x-y coordinates of the caret ? <13> lol <13> I think IE has some ways to do this... don't know about FF or safari... <13> tobie off to check... <12> dunno about x/y <12> have fun <13> lol <13> thanks! <11> THIS THING ****S. <11> THANKS. <9> hehheh <9> http://www.aflax.org/examples/sound/sound.html <9> fails to play <9> but it all seems very spifly aflax. <2> is there a way to get the x/y coords of an element? <9> ah it does <2> hm cool <9> seems to be dependant on the pcm mixer level being up .. other players dont need it -baffelious <9> wow the kelidoscope demo on the aflax site is crazy <9> turn up the tiles as high as they go <9> and the rotation speeds <9> ended up working so hard firefox locked up <2> hot dang, clicking on demos kills safari instantly <15> firefox is very slow. definitly not suitable for downloading porn. <2> oh but it has fancy downloadmanagers <8> Firefox is faster than Opera over here (but Opera generally ****s on Linux) <16> my main objction to firefox is that I don't know whether the extension I'm downloading was written by a competent programmer <16> and Opera, I get functionality I'd need a lot of FF extensions for, in a smaller download and with less bloat than default FF
Return to
#javascript or Go to some related
logs:
amsn webcam + error opening device #php #php Can't init tc log
how to install the c compiler on ubuntu drapper replcate via triggers ubuntu termcaps jameskuhns gentoo install dell inspiron 9100 archive manager unrar-free
|
|