@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<Phoenix92475> hey an anyone help me with a javascript function am totally lost
<Phoenix92475> have to write an array of urls and when the user clicks the button it cycles throught the array of url's
<Phoenix92475> trying to find a example or something somewhere
<Pilum> How to write a loop?
<Pilum> Or is it a random element of the array you want?
<ht311> or just a simple i++ ?
<Phoenix92475> wheres a place a can paste it and ill try and explain
<Pilum> pb.html-channel.com
<Phoenix92475> http://www.html-channel.com/pastebin.php?id=1
<Phoenix92475> ok i have the array defined but when user clicks the button should open each of the urls in a window
<Phoenix92475> just trying to find a example to base on dont want anyone giving me the code
<Phoenix92475> just help
<Pilum> That code doesn't make much sense.
<Phoenix92475> well just trying anything cause not much like what have done before
<Phoenix92475> is suppose to have a array of urls
<Phoenix92475> a button that will start the display of the websites
<Pilum> The document.write is frankly just silly.
<Pilum> And the changeWebsite function doesn't use your array.
<Phoenix92475> document write is the description thats irrelevant
<Phoenix92475> yeah how will u get it to use the array just asking for pointers guys
<ht311> .....
<Pilum> window.open(websiteArray[i]);
<Phoenix92475> keeps giving me a error of object expected on line 53
<Phoenix92475> ??
<Phoenix92475> ok guys im just asking for examples, help any advice
<ht311> websiteArray[3]="http://www.lycos.com
<ht311> missing end quote
<ht311> the color is off in the syntax highlight, easy to spot
<ht311> you shoudl end all the statement with ; as well
<ht311> and what you have is kind of ok, try to understand what you have there first, just copy something is not help in any way
<Phoenix92475> ok it works now opens the first element in the array
<Phoenix92475> is there a way to get it to open each element in the array i have to write it to open a new window for each element in the array every 5 seconds
<Phoenix92475> that would be done using a setInterval in the window.open statement wouldnt it
<ht311> just go ahead and try it
<Phoenix92475> k just asking because dont want it shuffling through sites it has to open one window for each array element every five seconds and not close the proceeding window
<Phoenix92475> ok tryin just tryin to find something
<Phoenix92475> ok to get a window.open to open every element in a array every five seconds you would do a set interval on the window.open wouldnt u
<CHESU> hello guys
<CHESU> is possible have a window child , but modal dialog for firefox?
<CHESU> i see that is for IE
<[Torgo]> starship
<Fernando> aye anybody here?
<NeoFu7ure> yeah
<NeoFu7ure> >>> there is a big list over there >>>
<Fernando> with that, i was meaning anybody alive
<Fernando> :D
<Fernando> yow, how do you absolute position something given a base element?
<Fernando> i mean, i want to absolute position a div, with exactly the same x coordinate as a base div and with y coordinate just added 1-2px
<sk8ing> guys, is myFunc = function (x) { } better than function myFunc (x), or is just cooler?
<sk8ing> is it more portable or something?
<furtive> depends. furst is an anonymous func, that's all
<sk8ing> anonymous?
<sk8ing> but now it will be called myFunc
<sk8ing> cuz myFunc will be ***igned with that function
<furtive> yes but everything on the right of the = is anonymous
<sk8ing> yes, does that mean it will be copyed?
<furtive> onclick = function() {//this is still anonymous}
<furtive> yes
<furtive> it's fine
<furtive> it's just a naming convention
<sk8ing> it's not fine
<sk8ing> cuz it has to be copyed
<furtive> i said yes
<sk8ing> fine == no useless copying
<sk8ing> is still fine?
<sk8ing> I think that blah = function () will copy the function body to blah
<sk8ing> that's why I think it's not fine
<sk8ing> while function blah () it simply defines it
<sk8ing> do I make sense?
<ht311> you are not
<sk8ing> why?
<ht311> blah = function(), you are ***igning an anonymous function to var blah
<ht311> it have nothing about copying
<sk8ing> hmm...
<sk8ing> I can contradict you
<sk8ing> blah = function()
<sk8ing> will ***ign an instance of that annonymous function to blah
<sk8ing> this means copying
<sk8ing> and I tell you why
<furtive> there's only one instance fool
<sk8ing> NO
<sk8ing> it's not
<furtive> but but i said fool
<marquee style="font:xx-large bold comic;color:hotpink;text-decoration: blink;">Trout</marquee>
<sk8ing> just hear my opinion
<furtive> ht311L
<NeoFu7ure> nah dood were into "neon-purple" these days
<sk8ing> patiance!
<furtive> ht311: once this channel has a blog are you gonna post stuff to it?
<sk8ing> after you do blah = function () { var kk; }
<sk8ing> you can do blah.kk;
<sk8ing> because function() acts as a cl***
<NeoFu7ure> all ht311 will be hot pink, if i handnt seen how damn hot his missus was i would swear he was gay
<sk8ing> function () is defining in fact a smart function (an object that behaves like a function)
<ht311> furtive: i am too lazy to start my own blog, a group blog is an interesting idea
<NeoFu7ure> ;)
<furtive> ht311: just javascript, no 23
<furtive> er 24
<NeoFu7ure> btw ht311 thats a compliment
<NeoFu7ure> 23 is the prequal
<sk8ing> anybody following?
<furtive> hehe
<furtive> i can tell you who isn't following
<sk8ing> well, I think I am right, cuz if I won't cl***es won't be possible in javascript
<ht311> ..........
<NeoFu7ure> lol
<sk8ing> if it would be only one instance the following thing will happen:
<ht311> you need to make clear about cl***, instance, private var, clone, reference
<sk8ing> do you think I don't know what those are?
<sk8ing> no I don't think blah is a reference
<sk8ing> I think it's an instance
<sk8ing> and private/public(var) members don't have anything to do with this isue
<ht311> blah is the cl*** / function object
<ht311> new blah() give you an instance
<sk8ing> if you do blah = function () { }
<sk8ing> ?
<ht311> NeoFu7ure: you saw the last 2 hours? very good ep. m***ive body counts, lovely
<ht311> sk8ing: judging from that line alone, blah holding a reference to the anonymous function object
<sk8ing> I see, good to know
<sk8ing> now, how do I split a string? I want a max of 2 results? xxx.split("x", 2); ?
<ht311> huh? where you read the reference like that
<sk8ing> I found on google .split("x");
<sk8ing> I ***umed that the next optional paramenter is the max number of elements to return
<ht311> there is no optional parameter for split
<ht311> ok, my bad, there is an optional parameter after all.
<ht311> hmm, when the hell they add that ...
<NeoFu7ure> sk8ing nah thats php mate
<NeoFu7ure> split("x", $str,2)
<sk8ing> hmm... any regex function that will return a match?
<sk8ing> .match probably... :)
<NeoFu7ure> sk8ing your always doing that
<NeoFu7ure> answering yourself
<sk8ing> I usualy ask to get a confirmation
<sk8ing> or because I can't remamber how
<NeoFu7ure> hehe
<NeoFu7ure> np
<NeoFu7ure> i think
<NeoFu7ure> .test too
<sk8ing> is that a joke? :))
<sk8ing> I should use VS for javascript... intellisense could help
<ht311> nah
<NeoFu7ure> nah i think .test is valid
<NeoFu7ure> sk8ing editplus and autocomplete/syntax highlight
<ht311> i think .test is for regex
<sk8ing> thanks for the tip
<sk8ing> I'll try it
<ht311> the best is read the reference , remeber the methods


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

ta dahk
chroot /bin/zsh
Unable to add forward map from XP
#linux
#mirc
#linux
#linux
#linux
#AllNiteCafe
#windows



Home  |  disclaimer  |  contact  |  submit quotes