Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8

<LotusPetal> How do I p*** a javascript variable from one included file to another included file?
<frb-screen> just p*** it
<frb-screen> there is no file scope in js, after doing a <!-- #include ... --> or a <script type="text/javascript" src="..."> it's all under the window scope unless declared otherwise
<LotusPetal> oh
<LotusPetal> ^^
<LotusPetal> Thankyou.
<LotusPetal> hey, can I say #include IN the actual code of a js file?
<frb-screen> no
<LotusPetal> damn haha ^^;'
<LotusPetal> Worth a shot :-P
<frb-screen> at least, not that I know of
<LotusPetal> That would be very nice :-)
<LotusPetal> Oh... wait... yah you're right that's an SSI. I didn't even think of that T_T
<frb-screen> you could probably implement it with xmlhttprpc and eval though
<daaku> ok, i dont know how to figure this out myself - does the xmlhttp object in IE not use the cache?
<Daffy-PKF> lo
<Daffy-PKF> i'm trying to learn javascript, i'm using mozilla/firefox as browser, and the onMouseover don't seem to work... can someone help please?
<frb-screen> good luck, events are hard
<frb-screen> you should put your entire page on a pastebin if you want help though
<Daffy-PKF> well, in that case do you have a nice url for learning javascript? cause the tut i found strats with the onMouseover thing...
<Daffy-PKF> s/strats/starts
<frb-screen> you should start with anything other than events
<frb-screen> go get the rhino book (Javascript: The definitive guide -- O'Reilly Press)
<Ayoze> hi all
<spiderworm> does anyone know if you can make xmlhttprequests synchronous?
<orion88> spiderworm: httpxml.request("GET", "url", TRUE);
<spiderworm> true for synchonous?
<orion88> as far as i understand
<spiderworm> tyvm
<orion88> i believe they're actually synchonous by default, unless you write a handler for the async events
<orion88> spiderworm: i reversed that
<orion88> spiderworm: it's 'false' for synchronous
<spiderworm> async by default
<orion88> right
<spiderworm> oh
<spiderworm> ty
<orion88> sure thing
<orion88> now if only i could get someone to help me with my problem... :)
<spiderworm> what is it?
<orion88> i have an html document with a <script src="foo.js"> and <li id="bar">
<orion88> but the code in foo.js can't seem to access <li id="bar">
<chino> does anyone know where that nice little xmlhttp tutorial from google is ?
<orion88> chino: http://maps.google.com :)
<spiderworm> how are you trying to access element "bar"?
<orion88> document.getElementById("bar");
<frb-work> why do you say it can't access it?
<chino> they had one that like filled in a form onBlue
<chino> onBlur
<orion88> frb-work: can't seem to see it at all
<spiderworm> do you have a URL or maybe you should paste your code into a pastebin somewhere
<Daffy-PKF> is it possible to make a function with default values for arguments? so that i can call it without that arguments
<spiderworm> Daffy-PKF: nope
<Daffy-PKF> arf
<orion88> Daffy-PKF: woof
<orion88> spiderworm: one sec
<frb-work> you can, but not how you think
<spiderworm> within the function you have to figure out which values had null p***ed to them and then ***ign them the default value
<frb-work> function (foo=null) doesn't work
<frb-work> but you can set it up either like window.open (use a string for args), or parse through the arguments collection and do magic stuff
<Daffy-PKF> frb-work> ok, so i should do "function foo(arg1, arg2) { ... }", and call it with "foo('bar', NULL)" that's it?
<frb-work> yeah
<frb-work> that's the easiest way
<Daffy-PKF> thanx, would foo(NULL, 'bar') work?
<frb-work> yes
<chino> i cant find the code
<Daffy-PKF> great, that'll do the thing, thanks
<frb-work> one thing though
<orion88> spiderworm: http://mp3serve.dyndns.org:9999/joomla/modules/mod_modtracker/modtracker.js, http://mp3serve.dyndns.org:9999/joomla/modules/mod_modtracker.php.txt
<frb-work> use null, not NULL
<frb-work> Javascript is CaSe SeNsItIvE
<chino> im making a chess game
<chino> and im using xmlhttp to make the page in realtime with serverside code connected to a db
<orion88> chino: you might have some problems there
<chino> why
<chino> i have script that the xmlhttp will connect to download specific parts of the page
<orion88> chino: how is stuff getting out of the db?
<chino> by back end scripts
<frb-work> works for me on a signup form to chck the userid avaialbility
<chino> server side
<chino> xmlhttp requets -> game list and puts it into the page
<chino> im wondering if i should have it update the board every second or if i can somehow have a smaller checksum when the checksum changes then update the board
<orion88> chino: update when a move is made :)
<chino> you can even have a clock that updates every second
<chino> yea but how will the js know thats the oponant made a move
<chino> thats what i mean i can have the js check a little code everywhere second if the code changes then a move was made so update
<chino> casue updating everything on the page every second will be over kill
<chino> i just need to find that simple little tutorial my freind had on xmlhttp so i can learn it
<chino> all my perl code for the serverside is done allready so is the database setup
<factor> do span tags take differnt ways to grab javascript data than from another iframe. I can get data from an iframe like this--- top.frames['framedata'].settingone; But I can not get data from a span like this top.settingone -- what do I have to do different to get data from a span tag?
<orion88> spiderworm: any luck?
<factor> when can I use .value?
<chino> does internet explorer still need a special active x call ?
<chino> instead of the native call ?
<Zycon> has anyone come accross a cross-compatible keypress event library that works with ff and ie6?
<frb-work> no, but it can't be hard to write
<paste-it> "Daffy" at 84.98.78.94 pasted "javascript onmouseover" (175 lines) at http://pastebin.bafserv.com/1651
<Daffy-PKF> can someone help me with that please?
<fatalis_> I am going to sleep, everyone
<fatalis_> good night
<Daffy-PKF> bye
<Zycon> Lets say i have the following functionA() { var myvar = true; functionB(); functionB() { myvar = false } alert(myvar) } I would expect that myvar would be equal to false because myvar is a global variable.. is that correct?
<trollboy> is || the javascript OR operator
<jigme> hey. I can't understand why the map zooming only works on firefox, and not on IE. I'm a javascript newbie, so any suggestions? http://www.hayagriva.org.au/prototype/directions/byCar.php
<jigme> At a glance, is there anything in that script that might conflict with MSIE?
<LotusPetal> If an image is generated, how would I turn the image into a link, dynamically?
<LotusPetal> jigme, I haven't looked yet, but try looking up the JS HTML dom at www.w3schools.com. It lists, very well I might add, what is compatible with IE, Netscape, and firefox, and which versions it is and isn't compatible with.
<jigme> LotusPetal: will do. Cheers
<Myrth> hi, i'm trying to select.appendChild(document.createElement("OPTION")), and it works in firefox fine, but in IE throws error invalid argument.. any idea?..
<jigme> lol. I'm here for a similar "it's working in firefox, but not in IE" problem. It's the bain of our existance.
<LotusPetal> Myrth, Not that it would make a difference, but it helps for debuging and the like : put the document.createElement into a variable... say... option_element... and then do select.appendChild(option_element)
<Myrth> yeah, i made simplified version of what i have
<Myrth> to give an idea
<LotusPetal> ^^
<LotusPetal> pastebin... gogo
<LotusPetal> I'm kinda waiting for a response to my question so I've got some time heh
<Myrth> it's ok, i remade it with select.options.add() ...
<Myrth> thanks
<LotusPetal> Oh. Okay np sorry
<Myrth> what's your question?
<LotusPetal> heh
<LotusPetal> it's really confusing
<LotusPetal> I'm working on it on efnet #javascript right now ^^
<LotusPetal> I think we've got it down.
<LotusPetal> It was kinda drawn out I'm gonna go test it ^^
<Myrth> ocol
<Myrth> cool
<Daffy-PKF> is there a way to obtain the width and height of the "drawable" surface for the page
<LotusPetal> lol... I can't reference a radio button... this is sad.
<LotusPetal> document.forms[0].radio.value
<LotusPetal> and it's undefined...
<Daffy-PKF> can someone help please? i'd like to do a table that always takes the full window, any size the window is
<LotusPetal> daffy, did you try width = 100%?
<LotusPetal> or just do width:100% in your css?
<Zycon> is there anyway to get a reference to an html element from an event object if it doesen't have an id specified?
<fatbrain> eventObject.target, or eventObject.srcElement (depending if it's IE or w3 compliant browser)
<Zycon> ahh so that gives you a reference to the object?
<Zycon> thats awsome
<TheoCode> howdy guy
<TheoCode> s
<TheoCode> if I wanted to create a notepad application with javascript, where would I start?
<bluefoxicy> Hello, I would like to have something in a page like
<bluefoxicy> <div name="changeme">foo</div>
<bluefoxicy> and then use javascript to change foo to whatever text i want
<bluefoxicy> i.e. I want to inject HTML into my page via javascript at controlled positions
<bluefoxicy> hi
<TheoCode> hi
<TheoCode> how do you want to inject the html?
<TheoCode> before the page is loaded? or after?
<bluefoxicy> after
<bluefoxicy> I want the page to have say
<bluefoxicy> <div name="changeme">foo</div>


Return to javascript
or
Go to some related logs:

kde
linuxhelp
The Monroes MP3 Cheerio
radioseven karin

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact