| |
| |
| |
|
Page: 1 2 3 4 5 6 7
Comments:
<0> in css there be a tag: background-image. E.g. background-image: url(someimage.jpg); is it possible to change this value from javascript? <1> how to iterate trought all object properties ? for(var i in obj) { ?? } ? <2> Yes. <3> hello <1> but how to display ? alert(i); ? <3> it is possible to check, if a object, like body or input lost the focus. but is it also possible to check the whole window ? <2> i is the property name <1> onblur i think <3> sure <3> but <3> if i fill onblur in body, it will fire, if i click on a input on the site, cause the body looses the focus and the input gets it ! <4> hello, is there a method to check if a node has a chils of a given cl***? <2> pandres: Yes! <2> http://chino.homelinux.org/projects/getElementsByAttributes.html <4> thanks <5> hey all
<5> I want to grab an element by id <5> I use this, document.getElementById('imageDetailsTitle') <5> and it returns null in Firefox Javascript window <5> am I missing something obvious? <2> `js onload # maybe the element doesn't exist <6> js onload: www.edea.se/Onload <1> mikepence: you must have an object inside your html code that has the id=imageDetailsTitle <7> my question is similar to this, can you create a div in js, and open it on dblclick of something? so its not there, user clicks an image, it creates and shows the div? <5> defbyte, I do <8> hello, I was wondering if the Date object provides a way to calculate the number of days p***ed in the current year <5> unless the FF JavaScript console is not referencing the currently selected tab <8> eg a number from 1 to 366 <8> I'm un the impression that there's no method that does this out of the box <1> mikepence: something like(if an image) <img id="imageDetailsTitle" src=".." ...> <1> shoud work <1> should <5> yes, that is what I have <5> I will try it in Rails <5> FF JS console is giving me fits <5> have to get Firebug <1> how you got firebug ?? really nice FF plugin for inspecting javascript and site styles <2> DOM Inspector <1> not that good alone i think .. dom inspector and firebug together is great for webdev i think <2> Works for me <9> Ok, I'm having issues with javascript / ajax ... heres my delimma, I have scenarios such as 'edit user', where the user has fields that originally were sort of speak step by step picked, and the ajax threw in the proper options. Now on a scenario such as 'editing' what do you guys do for a best case scenario of prepopulating via ajax, the proper fields based off of id's ? <8> never mind, I think I can get what I want by substracting and adding dates <1> does someone know what's wrong with this: var aaSprites = new Array(); function addSprite(array) { aaSprites.push(array); } and then <body onload ="javascript:addSprite({x:10, y:10}, {x:20, y:20}); , but when i try to access the values in the body somewhere with <script....>alert(aaSprites);</script> i get no ouput :( <5> ok, cool <5> I got a handle to the element <5> now, the element is a TD <5> how do I change the text inside of the td? <5> .innerHTML? <2> defbyte: javascript: in an event is a useless label. Remove it. <2> Use the short version of the array constructor so it's readable. <2> You're alerting before onload <2> `js onload <6> js onload: www.edea.se/Onload <1> b0at: that was only to show fast what i mean - i include a function in onload that does execute addSprite multiple times <2> defbyte: "javascript:" has no function there. It's not the only way to do anything. <1> k <2> And you made it longer by using "new Array()" than "[]" <1> k - my problems lies somewhere in adding the new sprite array i think .. when i place an alert(aaSprites) inside the addSprite function i get some output(Object object) <1> but somewhere in my body when i output it i get no output :( <2> Then it's not an instance of Array. <2> Or you're pushing Objects <1> look at addSprite, there i use aaSprite.push(array) <2> jseval: var foo=[];foo.push({});foo.push({f:g});foo.toSource(); <10> b0at: Error: Error: ReferenceError: g is not defined at line 0: (null) <2> jseval: var foo=[];foo.push({});foo.push({f:'g'});foo.toSource(); <10> b0at: Return: [{}, {f:"g"}] <1> i want the aaSprite to be an global array that holds objects arrays <2> So what? <1> do you know what i've done wrong on my first code pasted ? <2> You didn't push until onload... <1> so to access it in body i need to do i in head and not with body onload=".." ? <2> That doesn't make sense. Read the onload link. <1> but now it work, when i execute the loading function somewhere in my head i get output from body js <1> thank you anyway <11> openrico, moofx, scriptaculous... how many more are there? <11> oh, dojo <11> wow, there's so many
<11> dojo is super impressive <12> hello <12> does IIS not use .htaccess files? <0> no <12> that ****s <13> hey all, i need to rewrite a php line in javascript, but don't know how, can someone help? <13> preg_match_all( "/\\\${([A-Za-z0-9_]+)}/", $text, $matches ); <13> anyone know? <4> there is a match function in JS, regex are the same i think <13> ok, i'll look for it <4> given a node, how can i change the CSS's text color of it? <14> [element].style.color= <4> thanks! <9> Woosta, happen to be around/ <9> Sembiance, or you? :) haha. <9> Woosta, I'm having a problem with pre-populating form field methods with ajax. <9> Woosta, i.e. say I have a 'create user page' right, say they select 'type of car make' -> then they see models for that make right? Now lets say a user wants to edit his car make / model, and inside profile we do 'edit' and I want to populate his current make / model with the values from the database, as selected. <9> Woosta, get what I'm saying kind of? <15> yes <16> like at swapmywheels.com, for example? <9> GarethAdams, I suppose? <16> oh, hang on <16> why would you need ajax to prepopulate something? <16> if the page is being loaded fresh, then do it server-side <9> GarethAdams, but... the way I have it, it dosen't show any options, its all generated <16> sounds like a very bad use of ajax to me <9> GarethAdams, ok, lets say a user chooses option "a" which gives him certain options for option "b" then that gives him options for option "c" all based off of each other <9> GarethAdams, now the user "saves" right <9> GarethAdams, he has a, b, and c set with his values he wanted, now say he wants to "edit" these values. <9> GarethAdams, how would I prepopulate fields a, b, c as it was when he first saved it, but then he can edit it.... <16> what happens when he clicks 'save' <16> and then when he clicks 'edit'? <9> GarethAdams, it saves to the database. <15> CrazyTux: work it out on the server side <16> I mean, what happens on his screen? <9> GarethAdams, if he clicks save? it makes a regular post and handles server side <15> Populate, then populate B based on A and C based on B <15> You only need to do an ajax call if he then changes A or B <9> Woosta, could I message you in private really quick. <16> CrazyTux: then why not return pre-populated <select>s at the start? <15> Why? <9> GarethAdams, then would the ajax still work? <9> Woosta, want to show you an example. <15> CrazyTux: of course it would .. <15> CrazyTux: We understand what you're doing .. <9> so I can leave all the ajax as is... <15> Proabbly <9> and just populate it normally <9> as if no ajax was there <15> So long as the XHR removes existing options, then yes <9> XHR ? <15> 'ajax' by any other name <16> yeh, you're not actually doing any AJAX by the sound of it <15> (I just really hate 'ajax' as a name .. thus I decided to call my library 'JIF') <16> just using XMLHTTPRequest <9> GarethAdams, yes... xmlhttprequest <15> GarethAdams: if he's using XML then he's using ajax <15> buubot: jif <10> Woosta: JIF is the Javascript Interaction Framework. It's just like AJAX but without an implied dependence on XML. Woosta's JIF library is available at http://rick.measham.id.au/javascript/jif.js <9> Woosta, I'm using JSON <15> Then you're using JIF :) <16> Woosta: I always used a more subtle interpretation <9> ok I'm going to try this really quick <15> Same principle .. different text formatting <9> ~ 5 minutes, you guys will be here? :P <15> Maybe <9> haha ok, brb... *coding* <17> jif and jason had a shiny new rattle <17> talk about rhetoric and terminology <17> that's like calling DOM not js or js not dhtml <16> CommandPrompt: both true statements <17> "Understanding means seeing that the same thing said different ways is the same thing." ~~ Ludwig Wittgenstein ~~
Return to
#javascript or Go to some related
logs:
#netfilter perl-suid ARGV #ai #php tmwserv ubuntu + superuser +privelages ubuntu text-mode inittab 65536Y perl*mktime shiz8
|
|