@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> I just wrote a function to generate object from a list of path/value pair
<1> ht311 : ignored
<2> kinda like domapi.list ? :P
<0> different from query string ... list ... let me see
<0> I turn something like Item_Id, Item_Code, Item_Color_Id, Item_Color_Code into one object
<2> should add it
<2> that list object can be pretty powerful
<2> snippet from what i'm working on right now:
<2> list.loadFromForm(f);
<2> result = domapi.postContent("index.cfm?event=addUser", list).trim();
<0> mine is a bit different it serialize and deserialize between json and name/value pair
<2> yeah, i should add loadFromObject, saveToObject to the list cl***
<0> [Torgo] should i put this in and where? http://pastebin.ca/67394



<2> something like that may exist somewhere
<2> domapi.copyObject in coreutils
<0> nothing with any keywork of "clone" there
<2> not nearly as fancy though
<0> oh
<2> that one also intentially keeps references
<0> shallowCopy
<2> maybe add it beneath it?
<2> clone and copy are really too separate things
<2> two
<0> I screw up the array and object order in the if before, took me a couple hours to find that
<3> Hi, I need some help to make javasript like the left menu of this site: http://christian.net/websword/index.php?module=NKJV
<4> hi all
<4> w***up
<4> seen roborg
<4> !seen roborg
<4> lol why dont we have a seenbot here
<5> lol.
<6> how can one clone an object?
<7> dodo
<6> beside objects all the other types are primitives?
<0> there are array and function as well
<6> var x = new Array; alert(typeof x); returns object
<8> is there a way to find out the left, top numbers of a element, without first setting it.
<6> ?
<6> top numbers?
<8> like after i slide something i want to find the left,top position on the fly
<8> something meaning the element
<6> ht311: is there any way I could tell if an element is a primitive without comparing it's type with all the primitives types? or by exclusion with the non-primitives
<6> greatful: offsetTop, offsetLeft
<0> typeof a != object and != function
<6> that would be by exclusion :P no other way huh?
<0> no
<6> well.. that's simple enough, just that it doesn't feels right
<0> it feel perfectly right
<6> if another type will be introduced in the future the code won't work as it should
<6> the designers kinda screwed it up when they decided that non-primitives are going to p***ed only by refference
<0> NO
<6> and by not providing any clone function
<0> a lot of language did that.
<0> you can always write your clone
<6> I just did that
<0> very easier
<0> show me
<6> just a mom.
<6> http://dumb.ro
<6> let me know if you see how I could improve it
<6> the thing is that a built in clone function would be way faster
<0> my version http://pastebin.ca/67490
<6> oh, I have to recurse it
<6> cloneObj?
<0> oh forget to rename it
<6> :)
<6> mine is not finish tho
<6> *finished
<0> syntax error
<6> on mine?
<6> by the way, I'm modifying it
<6> I have to make it add subobjects too
<6> let's see it now
<6> it works



<6> check it out
<6> hmm it's not ok
<6> I shouldn't return null
<6> it blanks the functions
<6> the methods
<6> I guess that if it's not an object the cloned "thing" should be returned, since if it's a function it has to be there
<0> I am lazy, i don't clone the function, just copy the ref
<6> yup same here
<6> there's no need to copy the function
<9> hello, im having probs with onclick events on transparent pngs
<9> is there anything im forgetting?
<2> such as
<10> how do i exit from a "for" loop?
<10> break works?
<11> break;
<11> or set your counter to the max number
<11> for (var i=0; i<100; i++) {
<11> if (i==10) i=100;
<11> }
<12> break;
<1> break is probably better
<12> indeed.
<11> Yes. However setting the counter works in every language and it's sometimes more clear which loop (when using nested loops and/or conditions) should exit.
<13> i have a quick question
<13> var loader=this;
<13> this.req.onreadystatechange=function() {
<13> loader.onReadyState.call(loader);
<13> }
<13> what does loader.onReadyState.call(....) mean...in fact call what does it mean?
<11> In case someone is interested (as eu_neo doesn't seem to):
<11> it calls the onReadyState method and sets the loader object as the target object. So referencing the loader object using 'this' within the onReadyState handler is possible.
<14> i have a serious dilemma: what should i name my variable that contains the value "julia|admin"
<14> :P
<11> user
<11> worthATry
<11> iHopeNothingWillBeBrokenAfterwards
<11> or plain
<11> loginData
<14> http://www.vepcon.gov.pk/test/template.htm
<14> im setting the variable for the top left corner (user signed in) through this: <script language="javascript" type="text/javascript">var user = "omer|admin";</script>
<14> and then onload i throw in the innerHTML
<14> is it better to use cookies?
<11> You should never use JavaScript for security relevant stuff in a client environment
<11> instead do it server side.
<14> oh its not security relevant really...its just to show the user logged. and the javascript variables will actually be put by JSP too
<14> but the question is, they are appearing in the page as global variables and then called by functions. should i use cookies?
<11> I see. What do you need it for? just showing the name?
<14> yes, and controlling which sub menu (grey links on right) to show
<11> If so, don't add the p***word but only the user name in your variable. But in this case, I would create the HTML serverside. There's no need for JS here
<14> i didnt add teh p***word, the admin is just the usertype
<11> That should be done by a session
<11> Ah, ok.
<14> and the HTML i pasted above (script tag) is created serverside....
<14> but the only way to insert the text into the top is by innerHTML
<11> If it's allowed for him to change this setting (usertype), than you may do it with javascript.
<11> I strongly recommend to do all this on the server and not with javascript. Using a cookie might be a bit better, but usually everyone can take a look at the cookie and your javascript checks the value anyway.
<11> And a lot of users have JS deactivated. IMHO it's not necessary here.
<14> hmm ok, but the server really slows things down...dunno why
<14> and our users will be required to have js anyway
<11> Note: your user could type
<11> javascript: user = "omer|admin"
<11> in the adressbar and might get all the wonderfull tools he want. If this is ok for you, you might go with JS
<14> oh the tools themself have server side security...no concerns.
<14> if i use a cookie, can it be set to destruct using js whenever the webpage closes?
<11> Yes. You may use an unload handler and set the expiration date to a past date.
<14> cool
<11> SufiBlade: http://pastebin.de/7789
<14> thats a lil new for me :D but will get to it
<14> whats this: return unescape(curVal[1]);
<11> unescapes returns the original string that was ecaped when setting the cookie. This is just for keeping characters the way they are entered.
<11> curVal[1] contains the value for the property that is in curVal[0]
<11> Instead of setting just one value or using your own parsing mechanism, you may use it to set and get as many named properties as you like. The only limit is the cookie size which usually is about 4kb
<14> not sure i understand....i guess i'll find out when i work with it
<12> SufiBlade: Do you have a back-end?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #javascript
or
Go to some related logs:

php copymerge with alpha
RHEL4 warez
#AllNiteCafe
#javascript
chitralchat.com
vmstat in Linux+ Troubleshoot
#AllNiteCafe
bngbros
#linux
Gkrellm eth graph



Home  |  disclaimer  |  contact  |  submit quotes