i am passing an array from a page to a child page opened by it via windowopen ie var items = openeritems I know
string i don't even know if those are concatable
because there the string usually has more buffer than really needed. so reallocations don't happen all the time
they are
eg. Java, Haskell, Javascript
but if you talk abour char * then therE's a reallocation
hm, would it be possible to allocates an array of char in js?
can I get a hand with my question as well?
iLess i'm opretty sure that's gonna turn into an array of strings of 1 char
:P
iLess javascript not being strongly typed, we usually don't really care about those kind of things
hrm. i guess i'm at a loss here then
problem is i need a fast string.
alguem ai sabe de vaga para desenvolverdor php em ribeirao preto?
Fill english please
What makes you think the strings in javascript are _slow_? Have you done any kind of profiling? Any proof?
blazing speed and JS doesn't seem to go very well together
oh iLess i got somthing for you
http://www.codeproject.com/jscript/stringbuilder.asp
thx.
i am having an issue because i am trying to do two 'queries' on the same page
i dont think the first query is giving me a result before the second query initializes, which I am unsure if its a problem
tags. and i found document.write to be the best and the fastest. but i want i need to do it using body.innerHTML instead so that i don't have to copy the entire script. and because of that i need some fast strings.
hm… thought of a Canvas ? (IE-Incompatible)
neverblue, try building your two 'queries' into two seperate functions, then have one call the other when it's done
Hi there
pricky, not sure if thats how I wanted to do it
canvas? what that?
I'm wondering if it's possible to give a position to the cursor
yop StaZ|work
(i dont care about IE :-p)
well if yoyu ever seen a game in javasceript, a game emulator in js, a 3d animation in JS, thaT's probably with a canvas
well, there's no other way to sequence the two items so there's no overlap
how can I wait for the readyState == 4 from the first query, before moving onto the next?
iLess basically it lets you draw graphics freely
kewl. page address?
query me the script
me?
http://jsmsxdemo.googlepages.com/jsmsx.html iLess ^^
thx.
freaky damn slow on my compute but * shrugs *
just send me the script in a query
stays black
well works here, anyway that's not the point
hm but it requires external js files
i don't know what you do, but i do know that a friend of mine made a 3D cube rotating in a canvas using JS… and MORE!!! he could even plug a wiimote with a usb cable and use it to rotate the cube
nice
pastebin sire please?
site*
www.rafb.net - pastebin
"neverblue" at 71.6.194.243 pasted "js function" (29 lines) at http://erxz.com/pb/3736
ah
nice
goes right into the channel
pricky, you see that?
iLess http://foubouda.org/zewii/ - there's a link to it at the top and a video with the wiimote
:P
anyone see a unterminated string literal in this 20 lines of code? http://pastie.caboo.se/81499
http://foubouda.org/zewii/zecube100.html
not working
there is a bug in the html-source
but i'm not sure if this is the reason why it is not working
oh
i had to press a button
nice
heh sorry for got that detail ^^
hi all, I'm looking for a calendar (month view) that has prev and next links/buttons.. anyone have any recommendations? Thanks!
you tried googling ?
trelayne, http://www.dynarch.com/projects/calendar/ is the one I've used before
thanks bbby , looking at it now
there are many out there with the same fxns though, like on any airline site
yeah, just not sure how to find a central site with reviews and links
start one
heh
thanks for the example again!
if I have a few objects that could possibly call one event function… can I have that function get what html object called it?
if it was called from an event, than the html object should be 'this'
how can I use javascript to read a cookie, then change an option in a selected listed?
i am trying to use an onchange
sorry, onload
`js cookies @ neverblue
js cookies: www.quirksmode.org/js/cookies.html
howdy all - got (what I'm sure is) a pretty newbie question
i have a page that, when a link is clicked, opens a popup
Woosta, its not setting the cookie thats an issue
its how do I change the option value to the one in the cookie
based on what happens in the popup, i need to redirect the "parent" page to a different url
http://pastebin.ca/631208 — function to parse and return a cookie by name
The paste 631208 has been copied to http://erxz.com/pb/3737
uther_p, like I said, its not the cookie part
you asked your question badly
sorry, new to js
You'll need to loop over the select's options until you find the correct one
so the options will have to be 'inside' the javascript?
id them, then set selected
var opts = yourSelect.options; for(var i=0; i opts.length; i++) if(opts[i].value == cookieValue){ yourSelect.selectedIndex = i; break }
so the js will set the selected="selected" for the appropriate if, yes
document.getElementById(optionID).setAttribute('selected', 'true');
thats what I was looking for
yea, 'selected'… couldn't remember what it was
so that will change my selected to another option, not the default?
it should… I don't recall whether you have to unset selected on the other selected object
yeah, cause I do have one set to selected, when no cookies are set and the page first loads
actually, no… just id the select tag, then you set it like so: document.getElementById('
document.getElementById('selectID').selectedIndex = optionNumber;
http://www.mredkj.com/tutorials/tutorial002.html
Which is exactly what I said and showed about 10 minutes ago
heh, missed it
Well 4 .. my internal clock is buggered
but I dont have to unselect the defauly?
default*
….no, you just have to change selectedIndex
quirksmode– // http://www.quirksmode.org/js/introdate.html#sol
How much incorrect information can you fit in one little section?!?
heh
epoch! help!
how can I tell what button in a group of buttons is checked/pushed using js?
thanks uther_p
ill give that stuff a try
the neverblue infestation
/taunt
Mornin' fatbrain
hey fartbrains, I mean fatbrain
hi
any1 knows flash a bit?
I was about to create a whole pile of "`quirks *" shortcuts in the bot when I saw that above link .. now I'm not so sure ..
maybe, I stopped reading after any1, scared you may have had more of those 1337 abbrievations
brain
oo, so you know flash a bit?
can anyone help me out with some google maps stuff?
riesss cannot r3@d
what do You mean?
haha
he stopped reading after the maybe
i continued reading
so
I´ll write it all
http://www.pobyt.eu/s8/
this is what its about
i have flash 8 installed
A url?
and would like to change more than just the front page
I'm kinda missing the javascriptyness of this ..
looks like there is only one scene in it, but I dont come through it anyway
javascriptyness, heh
I know, this is totally "offtopic"
i think, webdesign is kinda a little bit the right direction
so ?
Who here might be able to help riesss?
Mmm .. ok .. maybe try #web .. it's the generalist channel
woo, i just need a hint
I don't even know what he's talking about
you might try a flash channel
nor do I, and I know flash
There are no flash channels .. freenode is an opensource network, so there's osflash, but it's not what he needs
I didnt think it was just that I didn't reconize lingo
ok, when i open up the .fla
i would like to change some things
WRONG CHANNEL
like the content
ans some pics
and
i know
someone smack him
there is no better
I'm about to
nobody here is helping you anyway
You're just spamming
riesss, i want to introduce you to your friend, the PERIOD. you can use the PERIOD to separate multiple sentences on the same line. You do not need to use the Enter key as your only punctuation.
`\n
bah
no i am just asking for one minute
`enter
learn \n = I want to introduce you to your friend, the PERIOD. you can use the PERIOD to separate multiple sentences on the same line. You do not need to use the Enter key as your only punctuation.
OK
`\n
\n: I want to introduce you to your friend, the PERIOD. you can use the PERIOD to separate multiple sentences on the same line. You do not need to use the Enter key as your only punctuation.
haha
Much better
Thanks
learn \n = I want to introduce you to your friend, the PERIOD. You can use the PERIOD to separate multiple sentences on the same line. You do not need to use the Enter key as punctuation.
OK
anyone know why a radio button will get set back to true if another radio button is set to true (and visibly shown to be on while the first one is visibly off) ?
oik,. thanks for the #web hint anyway
you have some major screwups either in your DOM (your HTML isn't valid) or logic problems in your JS
I am betting on logic problems in my js as when I do a copy/paste from firebug into a normal html file (the radio buttons) then they work ok
whats the best way to debug that? can I put a watch on the radio buttons to see who is changing them?
who meaning code
put a breakpoint in your code and start stepping
k
document.getElementById(optionID).setAttribute('selected', 'true'); ?
i have a select.name and within each, I have a option.id
I thought we decided that wasn't the best approach?
Oops .. I gotta run
back in an hour or so
l8rz
is there a javascript function similar to the php function explode?
string.split(delimiter, [limit])
splits the string up into an array
thanks.
heh
'fatbrain'.split(/(.)/).join(' uber-imba ')
uber-imba f uber-imba uber-imba a uber-imba uber-imba t uber-imba uber-imba b uber-imba uber-imba r uber-imba uber-imba a uber-imba uber-imba i uber-imba uber-imba n uber-imba
i am passing an array from a page to a child page opened by it via window.open() (ie. var items = opener.items). I know (or at least, it is my understanding) that unless I somehow clone the array, the child window's items will be a reference. However, when I am done in the child window, I want
to (sometimes) pass the changed object back to the opener window. Will doing opener.items = items before window.close() create a memory leak?
that would depend on the browser's implementation
but I haven't seen that problem
would it be better to use opener.items = clone(items) where clone does just that?
little question. is: var a = []; the same as: var a = new Array(); ?
yes
k. thx
has anyone experience with canvas and putImageData?
Anyone know of good javascript debugger for IE?
there is no javascript debugger for IE… actually there is — its just really hard to get to … and it barely works
i always debugged my stuff in other browsers …. if i ran into an issue specific to IE.. i would find another eway
concurrency, can someone discuss it with me in javascript?
i am using ajax to update two columns in a table, I find that the readyState doesnt work well, the second request is finishing before the first
has anyone experience with canvas and putImageData?
I'm having some trouble with a Ajax.Request callback..basically, I can see it doing the request itself, but the page doesn't update and firebug doesn't show any errors… http://pastebin.com/m92bb883 there's the actual code
anyone have any ideas? ..tia
that's to do with a specific library?
using Prototype
and I'm crafting the response with php json_encoder
even the "hi there" thing doesn't work
fintler, I find it easier with prototype to put json in an x-json header
yep….I'm having php send it in an x-json header
…and in the body for that matter
firebug shows the x-json header like nothing is wrong
and then on your onsuccess (or whatever it is, it's been a week since I'veused prototpye) arguments should be (transport,json) where json is the decoded object
hrm…maybe I'm using the json part wrong
hi, i'm having a problem setting the style.left property in an element
function(transport, json)
document.getElementById("nav_rides").style.left="9000px";
theoretically that should push an element off the page but it does absolutely nothing
i'm testing this in IE 7.0 btw
and my markup is XHTML 1.0 transitional validated
it will only do that if it's position: absolute
And moving it off the right may just give you a really wide scrollbar .. it's more normal to move it off the left
With a large negative margin
you can just do "style.left = 9000" and the browser will assume it's pixels
….and what Woosta said
no you can't
you MUST specify a unit
it might not be valid to a standard..but it works
no, it doesn't
It does in some browsers, but not many
fair enough…seems to work in newer browsers….I only do intranet stuff where the browsers are fairly controlled
hihi Woosta
Hey Jan-
doing some switch statement goodness and a bit noobish in the ways of the JS; can a case parameter include an &&?
has anyone experience with canvas and putImageData? i have tried to use it but it seems not do draw anything
not in the way you want
Bugger, well, basically what I have is a group of pages that need to be redirected.
The URL is a hairy one (eg. /BPIOKeyContent2.aspx?Package=T7330&Maturity1=T5564&Maturity2=T5561&Phase=T7757&RecBy=T7630), and I need the switch statement to compare the Package and Maturity parameters of the URL, matching them to one of the cases, then to redirect as
neccessary.
Ah nevermind, I've figured it out. Concat to the rescue.
test.getAttribute('rel') == 'nofollow' — This only checks if the "rel" attribute is exactly "nofollow", right? How do I modify this to check if the rel attribute CONTAINS "nofollow" anywhere in it?
hey everyone
Yo all, Jan-
onChange="this.edit.submit();"
hihi Twey
is it wrong?
How're you?
Jan-: ?
I'm rather well, thank you, and yourself?
Yes
hello.
what is wrong?
You submit the form, not one of its elements
hm
onChange="this.form.submit();"
ah?
I'm presuming that's on a form element, so you'd do this.form.submit()
Yes
Jan-: Where did you study Japanese at uni?
I didn't.
Oh, it was an external course?
I've never studied on a proper course.
Well, I've been to sort of informal groups.
Oh
test.getAttribute('rel') == 'nofollow' — This only checks if the "rel" attribute is exactly "nofollow", right? How do I modify this to check if the rel attribute CONTAINS "nofollow" anywhere in it?
One of my roomies at uni was learning it. Why?
Jan-: One of my friends wants to take up Japanese but thinks it'd be a career move, so I'm looking around for somewhere that'll do it as a joint
test.getAttribute('rel').test(/\bnofollow\b/)
He's insane.
test.rel.indexOf("nofollow") !== -1
Jan-: She
She's insane.
or what Twey said
Er, a bad career move**
I have just discovered that I am going to Japan next April
indexOf is more efficient than regex in this case.
Jan-: Ooh, nice
so I should try harder.
But it's basically impossible.
ugh. I switched around the regex and string
What Gracenotes said looks like regexp, but out-of-place regexp… =Z
I can't even say "hihi" in japanese.
What Twey said looks strange, but I suspect it'll work…
yes… test is a function of regex, not string
Jan-: Kon'cha!
Huh?
And aye
Jan-: Rough equivalent of hihi
Oh.
Cool.
regex is fool-proof, but indexOf works…
Not really foolproof
I have also been invited to start teaching basic classes at Judo.
Not any more than any other method, you still have to craft your expression right
Not any more than any other method, you still have to craft your expression right
Jan-: Nice
yes… depends on the regex, of course
how can i make a type=button go to a url onClick ?
Don't, use a submit
submit will submit the form
Thanks!! Seems to be working.
wtf?
Yes
if the form's action is the URL, it'll work
anyway.. onclick="document.location='blabla';"
right.. but i dont want it to go to the forms action
but his way is better
form action="http://www.site.com/url/to/which/to/go.html"input type="submit" value="Go to URL"/form
Mmmm.
i have a 3 buttons update, save, delete
mazpe, if you don't have to, don't use js
Give the buttons names and use them in your server-side script to determine the action
AAAAA. My mom tidied up my DVDs.
update enables the input fields, save submits the form and delete i wanted to send it to another url.
*curse* *swear*
Jan-: You'll never find them again.
thanks.
document.location is what i was looking for.. thanks!
but i think i will try to the server-side solution
server side solution for that ?
determine action
sending everything to like /todo?action=update or delete
oh. great
that's better than using js
how to random int 1-99,999 ?
so gentlemens,
good night
buanas noches
gute nacht
hey everyone
helloRobot, Math.floor(Math.random() * 100000); // if i'm not mistaken
what was that about?
RockerMONO, that would be the answer to helloRobot's question
hm, random number with 6 digits, right? [seeing if i remember how that works =p]
random number from 1-99,999
ah ok
i might be mistaking… isn't that from 0 ?
you get a random number between 0 and 1 (from the Math.random), don't you ?
does anyone know how to scroll a window to the absolute center?
the page is wider than the window, i need to scroll into the center
lagcisco, i imagine some sort of magic with clientWidth and scrollWidth/pageXOffset
as well?
no
no? only on body?
yes
the standards only allow for window (body if you're inlining)
Most browsers will also allow for img too
is there any other way of calling a func() after the page is loaded?
document.body.onload = func
Yes
so it's 0-99,999, right?
Correct
Well actually
It's 0-100,000, upper exclusive
sorry, my english sucks. what's exclusive ?
Jan-: that did it..
isn't that 0-1 or something? so it can't be 1?
Yeah
But it can be 999,999.9999999999999999999…
IIRC.
Er, minus a 9.
Jan-: interesting… http://erxz.com/pb/3740
document.body.onload = alert(); works fine… yet, for my function it doesnt
am i missing something?
You're calling the function
right
You want to be assigning the function
Also, it's window.onload, not document.body.onload
onload = alert;
Although I don't know if alert() will run without any arguments
alert works fine.
its calling my fuction that doenst seem to do anything
It doesn't work fine
It calls it immediately where it encounters that line that's meant to be assigned
Then assigns the return value instead.
ok
can anyone tell me if there's a way to stop a button that calls a function which in turn calls two other functions from submitting? The button is used to reset form field values back to values stored in hidden fields. This was working fine (restored the values but did not trigger a submit),
but then I added calls to two other functions that provide some formatting to the fields on the form and now clicking on the button causes a
clearTimeout ?
hmmm. going to have to hit google for that one.
is clearTimeout only used with timers?
setTimeout, I think
there's also the other one
I forget the different… about.com has a writeup on it
i'm not using a timer. Just clicking on a button, which is calling a function, which then calls two other functions.
I think one of those two is your solution regardless
but I'm not JS guru
there's setTimeout and the other one :p
I can't even remember it
hihi reisio
heya Jan-
what's up?
you catch the beginning of the tour de france?
Well, I was in London at the time, but not specifically
I was watching a documentary/special thing
'Five Disasters Waiting To Happen'
and they were talking about how boned London could be if you guys don't continue to update your flood protection systems
Yeah.
It's only because of global warming, though.
So really we should bill the US.
Same problem as with New Orleans, but I know they don't really care about that since only black people live there.
you mean you should bill English settlers :p
yeah, exactly :p
Britain is going to be so boned if the sea levels keep rising :p
I saw a model of what it'd look like
if all the ice caps melted
So's the US.
You'll all be living on the Rockies.
yeah, but not nearly as much :p
Well, there's more of it to begin with.
yeah
I didn't say it was fair :p
But if the world got warmer Greenland would become inhabitable.
no it wouldn't :p
it'd just become less uninhabitable :p
Hehe
in dreams i can love you! in dreams i'm part of you! but dreams don't last to long, i wake to find you goooone *bounce bounce*
source?
er
wrong channel
haha
tis a good song though
…by?
It's on the Dougal+Gammer disc of Hardcore Euphoria http://tinyurl.com/3ap7a3
hello
Hi, and I'm sorry
?
That you love Fedora
lol
can you help me
with?
im trying to pharse rss
parsing rss…..I've never tried it
with JS?
sorry spelt it wrong
I knew whatcha meant
yes with js or even php but the jerks in php cant help
yeah they never can
lucky for you, I know PHP and JS rather well
i am trying to achieve this http://www.londonstockexchange.com/en-gb/home.htm a scroller with indices
what do u think?
hmmmm
I dunno man…I've never played with an RSS feed before
http://www.captain.at/howto-ajax-parse-rss.php
That looks promising
I don't know anything about RSS…but this says it's just XML
which should make it hella easy
i want it to scroll the results and display them in css
in css?
sorry display them as a scroller
and edit the look in css
you know what i mean
you should be able to that just with JS
and a marquee
guess what my bookmarklet does. javascript:t=true;w=window;n="click";s="30em";h=function(e){m(e.target);w.removeEventListener(n,h,t)};w.addEventListener(n,h,t);m=function(e){if(e.style.width==s){m(e.parentNode)}else{e.style.width=s}}
…cause that wasn't random or anything…
It wasn't?
lol
I'm just playing
I've been sitting here for 10 minutes though and haven't heard a word from you
Well, there's 209 people in the channel. Not all of them are going to be typing at once.
wondering is there builting base64 support for javascript? or do i have to use my own functions?
Even if there was built in support, only gecko would implement it. But google yields lots of tasty sauces to savour.
k. too bad. well i have my own routine. but i was hoping i can save the space
i need help debugging a function, because of course the browsers are no help… is there a pastebin?
hell is there anybody here?
FuzzplugJones, Just use anything (such as pastebin.ca). Are you using firebug.
?
Yes
oh ok
We take a while to answer sometimes.
uh, no i'm not… firebug is…?
So patience is required.
A plugin for firefox.
(i don't do javascript, i've been forced into this solution by crappy css2 compatibility)
Which makes debugging javascript a *lot* easier.
i'll grab it.
Awesome. It's good for ad-hoc editing css too.
Hi all. http://pastebot.nd.edu/3270 having issues, firebug is reporting that 'f' is not being defined ….
Thanks for taking a look
I think you mean ad-lib
Strings passed to setTimeout() are executed in the global scope
f is indeed undefined.
`paste @ FuzzplugJones
paste: Paste links, not code: http://erxz.com/pb/ http://pastebin.parentnode.org/ http://paste.css-standards.org/
`firebug @ FuzzplugJones
`js firebug @ FuzzplugJones
js firebug: Debug your Javascript in Firefox using Firebug: http://www.getfirebug.com/ .. Or use Firebug Lite for debugging in non-firefox browsers: http://www.getfirebug.com/lite.html
yup i've got it installed i just don't understand it yet. i'll pastebin the code
byup i've got it installed i just don't understand it yet. i'll pastebin the code/b
bbyup i've got it installed i just don't understand it yet. i'll pastebin the code/b/b
Don't access forms like that, you need an alt on that image, stay away from innerHTML, and use a closure but don't forget to null the reference afterwards to prevent memory leaks in IE.
*shock*
The paste 631514 has been copied to http://erxz.com/pb/3742
in the body tag, i have onresize="sizeBox();"
Looks like I need to pickup a best practices book.
IE reports "error on page," "object required," and a line number several lines *past* the body tag.
Oh, and watch out for XHTML, IE doesn't support it yet
any particular reason for staying away from innerHTML? (just curious)
Xhtml is dead.
hardly
Long live xhtml 5.
`innerhtml sucks @ zuez
innerhtml sucks: If you have events on elements that are rendered via innerHTML they do not go away when you empty the innerHTML area. They may even crash your browser. You cannot use innerHTML for building items like tables in IE. You cannot use innerHTML for adding options to selects
in
elements in innerHTML are not executed.
hell if i could make HTML 4 Transitional work properly in IE i'd be happy
anyone take a look at that code?
Sweet.
You forgot to mention that it's completely non-standard.
alertbox() is the only thing I don't get
more code, and why do you need viewport's height?
Woosta it's a debugging thing.
these days ..)
are you sure it works?
of course it doesn't work, that's why i'm here
Haha, nice answer
Whuh?
Are you sure ALERTBOX works moron
reisio because i'm trying to do something with a div that needs to always be 100% height except for margins… and i can't do that with CSS alone because the div requires an absolute height
i'm not sure of anything - like i said before i don't know javascript, i'm having to do this and be here because IE's lack of css compliance means i can't do this with CSS alone
ah but you _can_ do that with CSS alone (y'know and HTML)
nope.
right
100% with margin-top and margin-bottom set to positive values, the box falls off the bottom of the screen.
if i set NO height but top and bottom, it works in FF but not in IE6 or Opera
if you're good at CSS i have no problem doing it that way but i feel i've exhausted every option
Heh, yeah. xhtml 2 is obviously going in a ridiculous direction. WHATWG or whatever they're called are obviously much more in touch
Yey, hideous network.
anyone know of an example of a good custom confirm and alert box, using DOM
confirm("moo")
alert("moo")
Or are you talking about one of those modal ones like these fancy javascript toolkits make?
yes one of those
Well, you'd be best off choosing a toolkit then reading the documentation.
ive made what it looks like, but i cant do things like if ( !confirm('blah') ) { } and im not sure how to make the yes no to look like
If you just want a couple of dialogs and stuff, no questions asked, I recommend YUI.
If you want something you can extend, etc. I recommend YUI or EXT.
Err Dojo or EXT.
EXT?
This is a new one on me.
`test
Used to be yui-ext
`ie debug
Best(Visual Studio): http://msdn.microsoft.com/vstudio/ , OK and Free(Script Debugger): http://xrl.us/sr7a , Leak Detector: http://outofhanwell.com/ieleak/index.php?title, or see `js firebug
i am using YUI atm, but i am not sure how to do a confirm box atm.
`xhtml
http://www.w3.org/TR/xhtml1/#diffs
But now it's a separate toolkit.
:-\
`js xhtml
I'm sure I did… oh
`xhtml as html
You're serving XHTML with a text/html MIME type, so it's being parsed as malformed HTML instead of XHTML. To serve XHTML, send the application/xhtml+xml MIME type, but be aware this will break the page totally for IE. If you're unsure, use HTML (preferably 4.01 Strict).
That's the one.
xhtml is dead, use html 5?
Because HTML 5 hasn't been born yet
Bits and pieces are being implemented around the place.
Also they're not mutually incompatible
Yeah, but it's not really fully usable yet
But I would assume if somebody were to use xhtml 1 then they would migrate to xhtml 2, which is a path that's now obviously not going to happen.
Mm, you have a point
hm got a problem. im shifting some bits around end end up with NaN. but how can a integer be Nan?
XHTML 5 is closer to being implemented
It's not an integer when it becomes NaN, that's kind of the point
how can i see what it is?
It's NaN
Well it's not a number.
What are the operations you're performing on it?
So it isn't anything.
Hi!
popular
`ie debug (1), `xhtml (1) and `xhtml as html (1)
is there a built in function to encode á to á an viceversa???
iLess, Remember that NaN is silent but viral. e.g. NaN + 5 == NaN
*and
http://192.168.1.201/~schwadri/enc64.html
grimboy, there has been a custom alert box made with YUI have you seen a custom confirm box at all.
iLess, i get a blank page?
no
shouldn't be blank
hmmpf I guess I'll have to do it manually
iLess, oh wait, now i get Connection Refused
there should be a button and if you press it theres lots of Nans
iLess, i can't connect!
schnoowork, Have you looked at the api reference?
thats weird
the server is running
iLess, maybe it's my network, i'll try connecting from work
iLess, Me neither.
omg wtf, i can't connect to 192.168.1.201
lol
sure .. but why do you feel you need to?
ah here it is
http://77.57.2.131/~schwadri/enc64.html
can anyone try connecting to 192.168.1.201 and tell me what they see?
erm .. 192.168.0.0/16 isn't public
joke over?
okay, joke over
its a local address
i'm tired and made a mistake
sorry
yes, very good
I'm inserting a new row in a table, and I want to insert it in lexicographical manner
i'm doing base64 decoding but during the shifting around i get this Nans
*sorry if lexicographical is not a word
I have never used that term in english
why on earth would you need entities for that?
and i don't know why a shifted value should not be a number
the contents of the cell have entities
did you have a look at my code?
grimboy, yes i am. Just need a better way to do the callback
if I make cell.innerHTML, it will bring me those entities, am I wrong?
no
so, in order to make this:
it will just use the chars themselves
there is no need for enties beyond < & and "
if the content of the cell is áé , will cell.innerHTML bring me a String with "áé" ???
anyone? why do i get Nan at line 24 in my code? http://77.57.2.131/~schwadri/enc64.html
no
var n is the problem
It will bring you the innerHTML
Why does your HTML have entities in the first place?
because I'm in a spanish-speaking country
so?
how do I insert an á without entities?
and I follow the standards
I won't just insert á in the code
How is that not following the standards???
type it
spaná/span
done
Please give me a list of reasons why copy protecting JS code is futile. (i know it is, but i want a _list_)
1) you can't
hey guys, i'm having a problem setting style.left
It's not entirely futile.
document.getElementById("nav_rides").style.left="9000px";
You can prevent causal piracy.
^^ end of list
and it does nothing
doesn't change it one bit
reisio, no, i want a genuine list
that is a genuine list
I answered that earlier
welcome to the land of people with eyeballs
did you set style.position?
Javascript converts that automagically
reisio, sorry, but maybe our definitions of "genuine" are different. i want a detailed list
WTF do you think this is?
1) you can't because you just can't - just like a whale cannot reproduce with an artichoke
if the HTML code is áé cell.innerHTML gives you "áé"
on how many browsers?
reisio, i don't want to.
I didn't say you did…
kbrooks, it's the same problem that DRM has. Since the browser has to read the code, the browser has to be able to read it, so you have to send anything necessary for decryption along with the encrypted code
I'm starting IE so I can check
at least in Firefox works
Twey, so, futile.
Yes.
If people are easily dissuaded, you might be able to dissuade them.
But you can't make it really hard.
You can't even do that
Jan`, you think that is possible
1) Open site in Firefox
2) View code in DOM inspector
Jan`, a browser uses HTTP to get HTML. Then it parses the HTML. that's simple enough.
plz can someone look at my code http://77.57.2.131/~schwadri/enc64.html and tell me why var n is Nan?
because the Javascript runs before the browser builds the DOM
try inserting that conde into window.onload
like this:
but why should that affect it?
window.onload = function () { yourcode }
the_lord_laptop, I don't think document is referenced expect for in callbacks.
So it shouldn't make a difference.
Since when callbacks are called the DOM is obviously built.
oh! I didn't see the function declaration
sorry bout that
yeah because you have to press the redraw button
np
its just kinda weird because the base64inv array has integers in them so shifting them should get ints again
iLess, Anyway, if you're not going to use proper variable names, can you at least indent properly and remove the canvas baggage?
k. sorry
What's a good method for parsing the .value of a text INPUT to ensure it's numeric?
It may be a decimal.
parseInt ???
No, 'cos then it'd have to be an int.
Since I'm clipping everything to 2dp, I'm using:
this.value != parseFloat(this.value).toFixed(2).toString()
hi, whats a good way to check if an element exists?
Byron, if(element)?
naked
naked?
au naturale?
xD
au gratin?
k. now it should be better
mmm never mind dumb question
yes i set the position in the stylesheet
and Woosta i did ask it but my internet crapped out before i could get an answer
Hmm… I think I've found a bug in firebug.
uh oh
i love firebug though, i dont think ajax would be possible without it
Ajax is a methodology
how does firebug help sending xhr's?
tags, even though the whole document is displayed.
a new name for an old methodology
besides monitoring them
one that existed long before Firebug
Well, monitoring is pretty vital.
is it possible to step through code using firebug?
hmm, what's MOZ_NO_REMOTE=1 do?
well monitoring was possible back in the day
but firebug is just the easiest monitoring application
yeh but before firebug we had other extensions eg liveHTTPheaders
iLess, Yes, but your code is embedded into the html file which makes it really buggy.
In the way I just described.
It works fine for external files though.
oh
i'm sorry
Disables remote control of the app
i'm not that familiar with javascript programming practices -)
so I don't need to do no stinkin' xhr monitoring
iLess, No need to be sorry, firebug's fault.
MOZ_NO_REMOTE allows you to run multiple versions and/or profiles of Firefox at once ?
E.G. opening another tab when you click a link rather than starting a new instance
Yes, that's a side-effect.
Byron, yeah, that's what I saw the docs say
but I want to know what other side-effects of MOZ_NO_REMOTE are
hm my firebug doesn't show anything
iLess, What for?
its just empty
pfn, your prolly better of finding info like that on irc.mozilla.org
not even the dom is displayed
is SOAP easy to learn?
iLess, What? Can you not press the script tab?
SOAP is evil.
damnit, wrong window
I thought I was in #firefox
nope
grimeboy, I like my soap client :p
you wasn't
and I pretty much have full xsd support in my soap client
oh wierd suddenly as i resized the window all the content showed up
Well, not evil, but the specification has been totally mis-implemented by several important implementers.
Heh
iLess, Yeah, actually I get that sometimes.
don't use split
iLess, But if you shove the javascript in a separate file you should be able to single step it.
the_lord_laptop, What's wrong with split?
grimeboy, misimplemented how?
k. ill try that
and treat base64chars as a String
don't know, but I did that and it worked
what sucks is there's multiple styles, doc/literal, doc/encoded, rpc/encoded, … bleh