Im trying to make a print page button but I dont want the whole page to print I managed to get only what I want

what do you have ?

its ok thx

im having some issues w/ IE6 on windows @ http://69.254.26.158
possibly js, but could be css also
works fine in IE7 btw
relative; used for displaying in better browsers was causeing it

hi, how to make a link execute javascript instead of jumping to an anchor ?
i use onclick="javascript:…." but how to deactivate the link ?

in there - if you *must* do it inline, do onclick="doSomething(); return false;"
the return false at the end prevents the link from being followed

tags in them, will they get executed?

var something = document.all.tags("X"); the tag X doesnt exists in HTML standards so am I allowed ?

you're allowed to do whatever you want. if it's not in the spec then you have no guarantee how different browsers will treat it
of course, "document.all" isn't in any standard either so it's a moot point

well I tried with different tags and still doesnt work
ff & IE doesnt produce the effect I want
if I change to an existing tag it works.

how to check whether a passed parameter is a function or not
???
this.options.onSelected is not a function
if(this.options.onSelected == 'undefined') … but that doesn't work.
i mean i could use the try{}catch(e){} but that is not nice, isn't it?

typeof parseInt

function

GarethAdams, mean me?
Jan_out, how would you check whether a function is defined or not?

function myBlah() { return 5; }; typeof myBlah

function

function myBlah() { return 5; }; typeof myBlah == "function"

true

typeof woot

undefined

typeof woot == "undefined"

GarethAdams, daxxar both is not working.

Hm? I was just toying, sorry. :-)
if (this.options.onSelected) ;-)
if (foo) return true; return false;

Error: Error: invalid return at line 0: if (foo) return true; return false;

if (foo) true; else false;
(foo ? true : false)

Error: Error: ReferenceError: foo is not defined at line 0: (null)

Hm, okay. Perhaps not. :-)

function myBlah() { return 5; }; typeof myBlah

function

hey everyone

i need a very simple script for SELECT box, each OPTION has a diffrent value, which is a URL to go to, i want the new website to open in a new window, but i know nothing about javascript :/

select … onchange="window.location=this.options[this.selectedIndex].value;"
urls in the value of the options
option value='http://some-site.com/'Some Site/option
next!

to make them click a button to go there

oh and for new window, maybe put target="_blank" but honestly, i would say do not do that

why dont they make an alternative to that since they take it out?
cuz not everyone has javascript

right, theoretically.
but 99.9% of people use browsers with javascript
and that is an official statistic from my brain

between 10% and 20% of people dont have or dont use javascript

let him go the javascript route if he wants

meh yea

yeah
so basically, the moral of the story is think up some other plan
like a css popup

but the reason i mentioned it is cuz i've been looking for a valid alternative to target="_blank" =p

at least if it fails, you still have links
the alternative is to leave your ego behind and accept that it will open in the same window and the user has the back button working if they want to go back to your site
:P

it's got nothing to work with ego or whether or not they have a back button

shudder
Navigation should ALWAYS be links

oh sorry. too strong?

If someone wants to open it in a new window they then have that ability via middle-click or whatever shortcut their browser offers

there aren't many instances when you need to open anything in a new window
exactly
we're in agreement here

Using a select to do navigation is plain wrong

but the original enquirer has gone AWOL

Often happens ’round here

ok
so let's dance

Someone will ask a question, they'll get lots of help .. and never say anything after their original question
damned annoying :-D

but we get to argue about well-known and accepted things
yet again
ooo yes…
swing it!

reason nobody answered was cuz you just proposed not to use it instead of giving an answer or saying you didn't know
ureason nobody answered was cuz you just proposed not to use it instead of giving an answer or saying you didn't know/u

Didn't know what?

you and i did have a stab at an actual answer to his question at first
then we went off on a usability tangent

baggito, your first example, how to i modify it to open in a new window ? :o

hey i know some swing. give me your hand. damn. i miss my swing classes.
i'm not going to tell you now unless you give us a good reason.
:P

The solution is damned easy
But I'm not telling

hahaah

…i was asking about a valid non-js alternative to target="_blank" and you went on saying about how it shouldn't be used and it should just open in a new window, you never said an actual alternative lol

we're so evil… in a pure and good way.

oh oh thanks

well the alternative would be censored.censored

btw that's invalid
AHhhhhhhhhhhhhhhhhhhhhhhh
whew, your safe

my safe what?

my safe?

have you got to the bit where hermione sneaks into snapes office yet?

oh. his safe?
NO SPOILERS!
/clear

haha

/ignore Woosta

did you get to the blowjob scene yet?

i couldnt figure out where to put that target blank thing :/

that fake-spoiler isn't going to work .. it's more fun to use believable spoilers

why do you want a new window?
no that's just mean.

btw target="_blank" is invalid

(1) the books are a lot funnier if you s/wand/wang/

the reason is that, my boss asked me to do so

tell him he's wrong. That's why he hired you.

well, if he wants an intelligent employee, you can question his decisions.

Woosta, thats not an option

BS

go on. just ask him why.

come on guys, who cares if he is wrong, i just need to finish this, i need it to open in a new window, please help me with that

Nup

you work on a saturday?

hehe

yes

o.o
take a taste =p

guys, please keep it on subject, if its possible, please tell me how

http://www.google.com/search?q=javascript+window+open

http://www.w3.org/TR/AERT#facilitate-navigation
a href="http://www.w3.org/TR/AERT#facilitate-navigation"http://www.w3.org/TR/AERT#facilitate-navigation/a

;google site:alistapart.com navigation usability

http://alistapart.com/articles/whereami

http://www.w3.org/TR/AERT#no-new-windows

^^ read
Then show it to your "boss"

god i have such a crazy LAG
is there a way to do it without that open function ?

WTF?
Let me guess, your "boss" doesn't want to use the open function?

hi

hi ossst

shh

how are you doing guys?

good, you?

sit on them and rub them

haha
damn you people can take anything the wrong way haha

Bah, baggito trumps

hah. that's the second time in here that i've given a stupid answer almost the same time as someone else.
today

how do i axx the value of the elemnt (text field) in js. this.value ?

axx?
at a guess, yourElement.value
if you have inline event handlers, then 'this.value' will work in the event handler

i want to set a 0 value onBlur if user doesnt set anything…
for like 30 fields, so i dont want to hardcode the name of the element into the proc. just for all fields

yourElement.onblur = function(){ if( ! /^\d+/.test(yourElement.value)) yourElement.value = "0" }
With 30 of them it will be more fun as you'll probably set them in a loop and end up needing a closure

yourElement.onblur = function() { use this instead of yourElement, problem solved };

Wont 'this' refer to the window in that case?
Oh no!
Coz it's a direct handler
fatbrain++

the problem is about yourElement. I will have to hardcode the names for all 30 fields then?

But it does mean you end up with 30 copies of your function .. either way ..

well, onblur should carry the info of the element somehow, no?
so i could use that info

Guess the VM could do some optimization if it's smart enough and just create one copy.

function setZero(el){ if( ! /^\d+/.test(el.value)) el.value = "0" } for(var i=0; i30; i++) yourForm.onblur = function(){ setZero(this) };
should work
oops
function setZero(el){ if( ! /^\d+/.test(el.value)) el.value = "0" } for(var i=0; i30; i++) yourForm.elements['the_element_name_'+i].onblur = function(){ setZero(this) };

yourElement.onblur = setZero; /* */

nah, then the 'this' points to window

true.
this is how I do it anyway.
yourElement.onblur = setZero.bind(yourElement);

you need the 30 functions .. so I just make it as small as possible

with my uber-cool 1999 bind function.

yeah that just creates the 30 functions for you easily

what if i have 600 fields ? :P

yes, looks alot better tjo.
doesn't matter how many fields you have.
s/tjo/tho/

with that function, on every onblur all my fields will be set to 0. Insead of only the one field that has input == "".

eh?

hehe, Woosta, it's all yours :P

Nah, it's 1am

can anyone tell me how to make enter trigger an action? google wasn't very conclusive there…
I want to "submit" an input field
anyone on the ENTER key issue?

Is there any cross browser compatible way of setting the properties of the parent window (like presence of status bar, location bar etc.) ?

what's the easiest way to read xml and write it on page ?

Something like this? http://www.w3schools.com/dom/dom_parser.asp

how to make the ENTER key trigger a function? Google wasn't very conclusive there…

JLearn, i have http://igbots.com/gm/prices.xml.php and i want using javascript to be able to display all info in only one line ( cause i'm having 15px marquee where i have to put the info )

MARQUEE??

VBm, use the link which I gave you to parse the XML host file and feed it to the marquee. BTW, AFAIK, marquee is no longer a standard tag.

well … standard or not … dumb devs of omerta game are still using it
and i'm trying to write lil greasemonkey script to make a bit interesting ui

"JLearn" at 71.6.194.243 pasted "Event Handling" (28 lines) at http://erxz.com/pb/3714

Ace_NoOne follow the above link for your reference

thanks JLearn
is that cross-browser compatible?

yes

cool!

works with Opera, FF, IE

thank you very much

Can't say about the others.

heh screw anything but FF

onkeypress="return myKeyPressed(event)"

what's with the return there

Because if I don't use 'return' and then return a false in the function, the page would be submitted. Try it out.
Try removing the return.

oh you got a form
I didn't see that
- but I might be able to change that

Heh
Its always advisable and better to have form elements inside of a form tag

it's not necessary tho, is it

Some browsers behave in a weird manner when you use a form element which is not inside a form tag and try to manipulate it.
Its always better to do so if you don't want your code to break.

ok
good to know

?

migh make it easier

If it works, then yes you can.

W3 will eat your head off for using onsomething .

hehe do I still need to define action="" then
well … I have little choice, do I

Hi

I agree

No need to have action if you are not using it.

I thought it was an obligatory attribute

Can anyone recommend a function to get element by class name

i'm a bit dumb … how to quick ( short code ) select document.getElementById('id'); … where i have 2 id's … first one is Xid and the second one is just ID ?

huh?
short code?

What do you mean by get element by class name? Give example.

..

hold on

it's pretty self explanatory man
get element by its class name
or elements

http://www.dustindiaz.com/getelementsbyclass/

function gebi(id) {return document.getElementById(id)} ?

I'd tried that, but not extensively tested it

function hasClass(element, name) { return element.className.match(new RegExp('(\\s|^)' + name + '(\\s|$)')); }

hm

Might not be what you need though

does anyone know how to make a bot that will fill in a form every X seconds ?

Question, why are there like 20-30 different custom REGEXP's for class name? rofl

seen that link I posted?

yes.

ok
(wasn't sure

Cho, short code would be something like document.getElementById('foo') or by id ('xfoo')

According to html 4.01, action is a required attribute, yes.

can it be empty too?

yes
it can be empty

ok cool

leaving it empty would make it go to the same page

What he said

not with e.setAttribute("onsubmit", "return false"); tho, right?

form onsubmit = "return false" action=
""

Hey people! Has anybody of you did something before with the YUI Datatable?
I need support with JS according a table generated automatically with XML I generated with PHP.

that's what I meant (order doesn't matter, does it?)

no

do you habe an idea how to write an event handler?

?

that I receive the content of a dom element
for ex. a "onclick"

Right?

You mean you want the contents of a form element at the click of a button?

better
I want the contents of a table where a function in the DOM element hasn't been explicitly defined.
something that is listening all the time in bg if I click on the dom element.

Oh so you mean that whenever a table element is clicked, you want its value, right?

yes
the table is generated automatically, with an id and class by the library.
the id's are counted from 0 to X (dependend on the rows). and has even headers=header0 to X for the column number.
any ideas?

sorry to bother you with this, but
e.onkeypress = "return config.macros.passwordPrompt.checkEnter;";
doesn't work

Can't you just attach a onclick event handler to all the td's dynamically generated?
Paste the code and I will see what can be done..

it's based on TiddlyWiki tho, so it might be confusing - gimme a min to clean it up a little

Yes, post the minimalistic code which shows it purpose without the frills.

spot the difference:
typeof "return config.macros.passwordPrompt.checkEnter;"

string

typeof function() { return config.macros.passwordPrompt.checkEnter; }

function

ahhh! thanks
wait
I need to pass the event
but that should work now

the event gets passed in as the first (and only) parameter to that function in most browsers
e.g. function(e) {…}
in IE you need window.event

hmm - mind if I paste(bin)?

so function(e) { e = e || window.event; … } should be ok

ahh ok then
will try that

Is there any cross browser compatible way of setting the properties of the parent window (like presence of status bar, location bar etc.) ?

no
you don't get any control of windows you didn't create

Any reason why this kind of feature was disabled or not kept? Security?

GarethAdams / JLearn: http://pastebin.ca/628768 — lines 16 and 44ff - I'd appreciate if you could take a look

The paste 628768 has been copied to http://erxz.com/pb/3715

it's probably a silly mistake
but I've never done this even thingie before

Ace, are you using FF?

I am, but I can't guarantee my users are

What does the error console show? Any indication of things related to onkeypress?

nothing at all
nothing happens

Nothing in the error console?

nope

Ah…

firebug neither

http://pastebin.ca/628774

The paste 628774 has been copied to http://erxz.com/pb/3716

no vBm

cause i have for all elements x + id

?
oh, you mean … hold on
I thought you meant the parentNode roundtrip

nope … sorry for not being more informative about what i want
;s

you can use e = document.getElementById(loopIndex);
or rather, arrayIndex
that is array[i] or something
"Ah… " meaning you know what the problem is?

any example maybe … cause i'm really dumb for this … and first time using js :]

hold on (not an expert myself)

tnx _o_ ( same as :respect: smily on some forums )
:]

I don't even know whether there is a forEach

hey everyone

What's the difference between these 2 regexps… RegExp("(^|\\s)"+classname+"(\\s|$)"); and RegExp("(^| )"+classname+"( |$)");

Nothing.

The second one won't work for all whitespaces like tabs and carriage returns

http://pastebin.ca/628781

The paste 628781 has been copied to http://erxz.com/pb/3717

untested

\\s : any whitespace
one space

Oh

Ah, didn't know that
Not relevant to className anyway

wait up..
\\s is any whitespace.. hmm
why 2 \'s ?
\s = string?
and \ means any type? lol
this is sorta confusing

Ace_NoOne, tnx … gonna try it now

;p

I have to go now (dinner) - bbl

OK I will try to come up with something

Ace_NoOne, that removes child for sms only and not both ;/

The loop is wrong.
for(var i = 0; i 2; ++i) should be used.
in \\ , one \ is for the \s and one is for escaping the other
Did it work?

lol

lol?

JLearn, yeah … that works _o_
tnx
was grabbing food .. that's the reason for delay ;/

any body thinks a search engine for filenames can be popular?

DavidHKMrPowers, you can already do it with google?

The only search I'd be impressed with is regular expression search. Google has it for their code search feature, but nothing else

preaction ya, but not targetted at it

"HKFileSearch, powered by Google"

Jimicon i think regex search is too heavy?
preaction heh

regex search is expensive. you could design regexes that take days to parse, and there'd be no way to really stop you. enough of these regexes concurrently and you can bring down google
even with elementary precautions

Yeah, I'd say that's why they haven't done it. Would still be nice though
You couldn't bring down google though. Generally if any process uses too much CPU it's terminated.

jimicon, it's not cpu-intensive, it's just long. i imagine that individual processes are throttled and only allowed to stay alive so long, but whatever engine you use you could find a way to generate noticable delays

back
sorry JLearn …

You can always block greedy metacharacters to make it a light weight regex enabled search engine.
OK, so Ace, why did you enclose the entire function in double quotes on line 16?

because I got an error otherwise
wait
that was with "return …" only
not with the function

yes, with return it would definitely give error.

event is not defined
oh of cours
e
silly me
yay seems to work - hold on
nope
can't enter anything enymore now
in the password field
but ENTER is recognized

What do you mean can't enter?

all keypresses are intercepted
no letters are entered in the input field

And an alert is popped?

yes
but only

remove the

wait, I removed the "press correct key"

else part

if(code == 13) alert("You pressed the ENTER key."); return false;

else alert('press correct key') remove it

^^^^

Now it works?

nope

Again the keypresses are intercepted?

apparently - they are not entered into the field
shall I upload the package so you can try?

Yes, upload it in such a way I can run it without any hassle.

ok one sec
http://devpad.tiddlyspot.com/#PasswordPromptTest%20PasswordPromptMacro — press one of the toggle buttons at the top
does it work?

It seems the password field is not getting any focus

it does - but the cursor disappears for some reason
not sure why

Then I don't think its a JS problem, considering that you have nothing in the error console…

but the keys are intercepted
only by that function

wait, let me think, even I am no expert.

heh sure

doh
OK my fault.

lol

at the end of the function, keep return true.

The term is 'facedesk'

at the end of the function, keep return true.

DAMN XChat
let's try that
YAY!
IT WORKS!
thank you so much, JLearn

Hehe, glad I could help you with my limited knowledge.

Ace_NoOne.knowledge.JavaScript

Bleh, nice one. :P

:P

Did you make those widgets? They are good.

TiddlyWiki is the framework
I just coded the password dialog thing
www.tiddlywiki.com

Ah..

I hate frameworks .

it's not a framework
it's an application
which you can write plugins for

Ah ok
That's not so bad then.

it's pretty brilliant even

it's me again … can someone help me out with hits for breaking up stuff that i've get from responseDetails.responseText ?

what's this "stuff"

im trying to break xml info using "GM_xmlhttpRequest" for script that im trying to make using greasemonkey
0 OT/time" as first line in xml … and i'd like to break up lines of that xml so i can easily display it on another

Should I even bother checking for IE on my getElementsByClassName function?

I would say yes to IE7, but IE6.. well, depends. The more people refuse to support it the more pressure there is to update.

Erm?
Sorry, I meant like document.all
that's only IE5, not IE6 right

Oh

elements = document.all

document.all has been IE-only since back in the Netscape days

or getElementsByTagName('*')

Either will work

Right
but should I even do document.all for IE5?
No?

I wouldn't bother

its possible to make a javascript slideshow on the background of a div?
and anyone has a good js slideshow? ^^

I'm sure such a thing is possible.

hey everyone

hihi rocker
how's rockin' going?

pretty good, my band now only needs a drummer haha

Man. They're temperamental.
we've got a really good one, and she's reliable for gigs, but for rehearsals she's always sending someone else to cover, and often they suck.
Speaking of sucking, I think I just found an error in Twey_'s code.
I am extremely happy about this since he spent so much of yesterday telling me how useless I am

why'd he tell you that?

Oh I'm not arguing with him. It's true.

heh… well i dunno, you seem pretty good with javascript =p

ask Twey_

she is, but doesn't like to admit it

I'm not, you brummie git.

brummie git? do i even want to know what that means?

http://en.wikipedia.org/wiki/Brummie
It's a great accent.

do someone know how many % use FF, IE6 and IE7 these days ?

It turns everything into a complaint.
Like Aussie turns everything into a question.

not an accent I have, though

Boo.
There was I busily assigning you the voice of Adrian Chiles

heh
I've been told that I don't sound like I'm a native of Brum

Aren't you?

I am

Aww.
It's OK, we won't hold it against you
actually to be fair last time I was there the place was totally coolified from the time I went before.
In the early 90s it was a grim horrible place and it's much nicer now.

yeah

total facelift

ah, cool

There wasn't any custard :/

I've been there once when it opened in its current form
attracted there by their leased line Internet connection!
what did you go to?

just an industry thing

ah, right

very boring actually but nice canapes
and we didn't get mugged once!

The Gadget Show's based there; they use the pool in the courtyard to test homemade hovercraft.

Yah.
Birmingham had such a crappy reputation for ages, they seem to have done something about it
"Birminghamworld, AKA the Dark Planet, receives almost no visible light and as a result no-one wants to go there. Its inhabitants have become socially and linguistically isolated." - Red Dwarf

Jan-: What's that from? The only Birminghamworld found by Google is a planet in the game Frontier (Elite 2)

Red Dwarf I think.
you know I'm not sure.
Anyway I think it's time to stop being cruel to Brum.
That dubious honor now goes to Swansea.

Jan-: An *error?* In *my* code? You must be mistaken, dear lady
I like Swansea.

I have a funny feeling that prototypes become methods when run through copy()
it's easy enough to get around, I just disregard anything where typeof=='function'

Jan-: Which version of copy() did I send you?

so I haven't looked into it.

Oh
*ponder*
I don't think so
Did I not check hasOwnProperty()?

No.

Ah
It's in the other one.
I rewrote everything in pythonic.js as a part of a framework I'm working on.

When I used it to populate my tables, I was getting lots of function text in there.

Jan-: there's a shortcut for that: x instanceof Function

Yeah, you're right, you want to add a hasOwnProperty() check in there
That's not really a shortcut, per se
Oh yeah, it's two characters shorter
Jan-: I do it quite often
This was just a lack of an upload though.

excuses!

Jan-: There, fixed.

this is quite a boon for my program
now I can have per-item settings in the playlist.

One character if you use == rather than ===, I guess.
Jan-: You couldn't have added that yourself? :-\

Probably.
I just wasn't going to bother.

Ah.

Again, you're mistaking me for a software engineer.

One line of code is more than it seems, isn't it?

fewer keys to press

It's actually more efficient. Theoretically.
Jan-: There should be no "software engineers" vs. "ordinary users." Anyone who uses a computer should be perfectly capable of writing at least modest software, it's not difficult.

Spoken like a true penguin poker

Jan-: It's like saying "I refuse to change this lightbulb because I'm not an electrician"

No, it's like saying "I refuse to learn how to make lightbulbs because I'm not a lightbulb maker."

Jan-: In this case at least, my analogy is much more accurate, since the code was already there
Well, no, actually that's a silly thing to say.
Making something and changing something are the same action
Since whatever you change is part of a larger something else, which is being made.
But that's all terribly philosophical for a Saturday night.

he
hello = hi(thumbs.(2)),;

What on Earth is that?

nothing

Oh

tried to say hello

I thought it was some esoteric language I didn't know, I was quite interested
Hi

A language you don't know?
Heh, that's a bit of a barmy notion.

Hehe
There are lots of languages I don't know.
Like Ruby. Or Punjabi.
And some I know but still can't quite get my head around, like Haskell.

Bah! The one you told *ME* to use?!

Hehe
Hey, it was a joke
…. mostly… well, actually the humour was meant to come from you using it

so

No, if you did manage to learn it it'd've made a great programmer out of you.

tell me, parentNode, does it count text nodes as a node?

you become a programming genius, or fail utterly.
Your question doesn't make sense

why not

Text nodes can't have children, so parentNode will never be a text node

hm.
true that, but..
divtextdiva class="foo"foo/a/div/div
we use that as an example.

Yes?

we observe that a, with some method. and use this.parentNode.parentNode
wich should give us the first div.

That's the topmost div
Yes

right?

Correct

well, last time i had probs with the parentNode. It actually returned that div.
in FF
but in IE i got like 2 more nodes up.
even with prototypes up()
so, i wonter, why does it differ, and where is the proble,.
problem.
yesterday, when drunk, i came to think or the textnodes, whitespace, whatever, that might could be counted in some way?

div = {'text', {div : {a : {'text'}}}}
Nope
Textnodes just don't figure in parentNode considerations, because they can't have children

makes sense.

in IE to make sure the browser hasn't made any unexpected modifications to your DOM

but. this.up().up() // 2 in FF, this.parentNode.parentNode // 2 in FF

into your DOM even if you haven't specified it in your markup

and this.up().up() // 4 in IE, this.parentNode.parentNode // 4 in IE

No, I doubt that

yes, i know how the DOM looked in this case, but i cant fingre out why i got different results. :/

You've made an error somewhere
Probably

and it cant be a this issue, this refers to the A in both cases, browsers.

I can't help you any more without seeing the actual page on which the issue occurs

i use to solve the most problems, but this was really strange, i worked around it and kept on with my work, but the strangeness still bugs my head
i cant rememer exact how it looked, have the stuff in the trunk at work, but it was something like that, an a, down in 2 nested divs. an ajax.updater, that should inject a snippet of markup, 2 nodes up.

Ah, Prototype.

worked fine in FF, but the injected stuff was injected some other place in IE.
i used this.up().up(), i tried this.up(1), this.parentNode.parentNode, foo = this.parentNode; foo.parentNode, all with same strange result.

There's nothing I can do about it. It's a bug in either your code, Prototype's code, or IE, in order of probability.
And I don't have your code or IE's code available to check.
If you want the Prototype code looked at, you should try #prototype.

as i said, its worked around, i just tought the behavior was strange
as i said, its worked around, i just tought the behavior was strange
maby i can try to reproduce it.
gimme a few
i think its.. interessting.
hmm.
still here?

Mmm buffet snacks
My favorite form of eating

hi, i have a simple form. and i need to post this form 3 times by opening 3 different windows.
how can i do that?

try something like var windowNames = ['name1', 'name2', 'name3']; for (var i = 0, l = windowNames.length; i l; i++) { var name = windowsNames[i]; window.open('', name); yourForm.target = name; yourForm.submit(); }

Is there a way to get the number of children from an object? Like to count the number of options in a select?

foo.childNodes.length

in that particular case, .options.length

I suspect childNodes would have a similar effect.
But insin is right.

watch out for childNodes unlesss you want to count any text nodes which are present

so I would do calendar_select.options.length ?

watch out for whitespace textnodes

Nrrrgh. Why is "green" not 0,255,0?
Why is it fricken "lime" or some shit?
"blue" is full blue, and "red" is full red.

and magenta is called fuchsia

Is it? Gurh.

and octarine is invalid

my guess is that someone couldn't think of a snappy name for the dark green, so they called it just green, forcing full green to be renamed

Shouldn't that bounce between green and purple?

hey guys, what's your favorite shopping cart?

I like the ones at Dierbergs
They are always a nice thickness and you can store alot
Oh sorry you meant software, nvm.

lol
yes
software

I'm trying to make a print page button, but I dont' want the whole page to print. I managed to get only what I want to print using css visibility:hidden; but the page it prints has a huge blank area at the top where the hidden stuff is, is there a way to realign that?

display:none; Is what I always use and it works wonferfully
In the CSS I mean

wouldn't that make it display nthing? lol

Well you only apply it to the things you dont want it to show when you print. You are useing a seperate print style sheet are you not?

hidden, you can apply display: none to the same element to get the effect you want, without taking up space on a page
hidden may hide your element, but its still there

I see
but that won't stop it from displaying ont he browser?

none; basically completely does away with the element its applied to
aren't you already hiding it?

to the printer, not from the browser

ah
same thing
if you have it set up to only apply the rule to the printer, then it will work just fine
none; in your printer media css would hide it from the screen?

when you call for the style sheet just use media="print" and call a seperate sheet that has the display:nones in it and your screen will be fine.

k
well here's the other problem
hm

@media print { #foo { display: none; } }

http://pastebin.com/d76614089
is that ok for the style sheet?
and then I just apply sheet print to where I want to print
this may come as a shock, but I dont' know anything about css haha

Why is this being discussed in ##javascript?

hm, not sure, I came here because it was a javascript host print button
sorry

no: "display: none" causes an element (with its contents) to be skipped, so using it on body will print nothing

No probs .. and you're getting good help here .. and it's otherwise quiet
bNo probs .. and you're getting good help here .. and it's otherwise quiet/b

Hmm, so i tried the whole $_('subdivision').options.length method, and even tried childNodes, and for some reason I keep getting a result of 1, even though I see more. Thoughts?

just include the rules in the stylesheet without limiting them to print media; then when you're happy with them, wrap them in @media print { }

l2js :P
For starters, what's $_?

is there a way to do a display:all? or does it just right off the bat ignore everything if display:none is there

no: "display: none" causes an element (with its contents) to be skipped, so using it on body will print nothing

you either don't have any options, $_() isn't returning what you expect, your HTML is invalid, your computer is bad at math ..

k

Sorry fatbrain, I wrote a function called $_ for an easier way of writing document.getElementById

You should give your functions names that are associated with that they di.

I wonder why people do that rather than writing function gEBI()

s/di/do/

that's how you end up with document.getElementById

no, that's just using the "default" one.

It seems an attempt to 'bless' IDs as some sort of PHP 'global vars'

I made a fugly hack once, 'my_div_element'.element()… heh

hey Woosta
how're you

I've tried the exercise of naming a function that does that; I end up with things along the lines of "getElementById"

hey Jan`

RPN?

Grr @ your `
Reverse Polish notation
7 2 +
9

ahh, not really, no really

Ew.

I know what reverse polish is

2 2 * = 4?

Jan`: yes

Ew. Why?

(Who is Jan- ??)

Actually I guess it's more like the way a processor actually works.

Jan` go read the wikipedia articles on it :-D

Load two registers then do it.

yup

hehe, the "processor"

We all, including Jan`, know what she means

Jan-: very easy to implement: when you read a number, push it onto the stack; when you read an operation, pop its operands off and push the result; repeat
bJan-: very easy to implement: when you read a number, push it onto the stack; when you read an operation, pop its operands off and push the result; repeat/b

*groove* *bop*
Word, homeys.

HP made some calculators that you use that way

the postfix notation?

it doesn't apply when I try to do a td class="noprint"

Jan`: oh, and no brackets needed
yes

I'm mostly a fan of the prefix notation, think that's most appealing

44 28.997 32 19 * * + -?

Jan`: yeah

*shudder*
It's like Perl, only, somehow, if that were possible…
….worse.

yeah

Aaargh! Phil put "Born Country" in my freakin MP3 playlist again.

Forth

He loves to torture me.

hey everyone

is there something like the CPAN for javascript ?

no.

=(

http://www.openjsan.org/

omg

I kept reading that as "arselaser"

Is that what George Bush has been having on his colonic polyps?

maybe!

We can only hope

lmao, what did you read as arselaser?

asrserlasr

haha
what in the world is that? =p

It's thing you use to remove colonic polyps from presidents.

heh
DUCT TAPE!

Thus freeing the polyps from such an unfortunate contaminating influence.

gn8

back

Jan`: In other news, "Harry Potter book flies off shelves" (Reuters)

Snarf

They've had to chain it down.

i think it's been flying off the shelves into fires
'look! kindling!'

Jan`: I only use green ink and pencil.
Preferably pencil.

Man, you're bored, grepping your logs

Jan`: It was highlighted
Jan`: I've just finished reading Harry Potter.

why?
Oh you strangeling.

* Jan- sneaks up on Twey

I was going to see if I could get a copy of the latest one.
But they were all gone.

Should've pre-ordered.
It's good

Not for me, you understand

Of course.

Actually I've never been that bothered.
I'm more of a Pratchett person

I think this one may end up being a 15 when it's a movie, though.

he's hilarious

I love Pratchett.
Hilarious *and* insightful
Rare combination

Quite. One of very few millionaires I know of who actually deserves it.

Indeed
I also write from right to left, talking of Pratchett. I figure my handwriting's unreadable anyway, so why not?

whahuh?

Jan`: Guards, Guards, I think
Jan`: The one with the Gonne.

Oh yes.
The Posessed Gonne.

It wasn't possessed.

Well, it had its own malevolence.

It's all in the human mind.
All guns do, was the point he was making.

"I am the LAW!"

Indeed
Happens.

Robocop references.
Perfect.

Heh, was that intentional?

Well that and Judge Dredd.
That's a Dredd line.
"I am the law. Drop your weapons."

Aha.
I've never seen, heard, or read of Judge Dredd.

What?!
You're into fantasy and you've never HEARD of Judge Dredd?

Never ever.

Judge Dredd is SciFi, not fantasy

Oh dear
I may have to peruse the Wikipedia page before I read it again!

Do so

The same with Chinese

Damn. Now I have to implement autoloading from the command line, so my app can be assigned to handle filetypes.

It's very silly. You'd think that if the font is going to have some set of characters, it would at least implement them all.

*mutter* braille

Jan`: Autoloading from the command line? Can you even do that in HTA?

Yes, you can get the commandline and parse it.

Jan`: You don't like Braille? Although I admit that Braille on a screen kind of defeats the point.

Braille is a political weapon.
Used to separate "proper" blind people who were born blind and went to special schools and who are generally all institutionalised and wierd.

Heh

There's this strong in group/out group paradigm.
The in group is them.
The out group is, uh, me.

Seriously?

Oh god yes.
The RNIB (commonly referred to as the RNLI, for some sort of comic effect) is run by beardy old wierdos who want it to be 1975.

Hahaha
So how does Braille separate you from *them?*

Because I can't read it, and they can.

You could always learn

No, I couldn't.
If on the level of language learning, English is a 1, Japanese is a 10…
braille is a nine hundred and thirty-four thousand, eight hundred and fifty.
Seriously; it is widely recognised to be a bitch to learn if you don't do it when you're two.

English is much harder to learn than Japanese, I'm fairly sure
Huh
Jan`: Heheh… how about tenji?

And if I'm completely honest I would desperately love to be able to read it and I can't, and I've tried a lot, so I come to the debate with giant sized shoulder chip.

Jan`: Japanese encoded in Braille.
Aha.

And even then, it sucks.

Jan`: http://en.wikipedia.org/wiki/Japanese_braille

The books are all Mills and Boon romances because most blind people are 70
They're all cruelly abridged, because carrying a complete paperback novel in Braille requires sherpas and beasts of burden.

Hm? But a Braille character isn't any bigger than a capital Latin letter
And there single are characters for common words, aren't there?

The best braille readers might make 150 words a minute.
And I would never ever be that good.
So it's crappy, huge, slow and used to represent pulp crap.
Yeah there's grade 2.

I'm sure you would with practise.
You may have a point with the pulp crap, but I still don't get how it's huge.

Well for a start the characters are much bigger.
They have to be spaced out more.
Plus you can only print one side of a page.
they have to be made out of almost cardboard to have any longevity

True

Because there's only 64 characters (six bit encoding, yaright?) grade 2 is a complete cow.
Tons of it is contextually mediated, which means that if you don't know what you're at, it looks like it's been XOR'd with a very big number.

Heh

And to be honest there's very few people use it.

what, the tail bone?

But you always see signs and things written in Braille

2 million visually impaired people in the UK; perhaps 20,000 use braille.

Surely there must be a fair user base.

There just isn't.

probably a government goody-goody law

To be honest I have no idea what blind people did before computers and the internet.

coccyx

Used Braille more? :_P
**

they died or lived a life of leisure

Depending on their financial status, yes.

Mainly ended up in asylums.
Because, OMGWTFBBQ, you can't possibly LIVE YOUR LIFE. Nnrgh.
But seriously.
Huge political weapon.
Bitches.

Hmn. 'kay.

Made slightly worse by the fact that not being able to read is the worst thing about not being able to see by a factor of 200,000.

yeah but you guys get spider sense, right? RIGHT? :p

mp=mpShell.Exec(mpPath+'-slave -idle -adapter'+adapter+' '+clOpts)
Oh I don't just get that.
Twey, you might want to step away from reisio

Heh

blind chicks get spider sense _and_ boobs
a deadly combination

Next time you see a blind person reading braille, just accidentally tip some coffee over her, or something.
She'll deserve it.
Guaran-fuckin-teed.
sighted chicks get employment prospects and normal bar conversation.
they win.

that's nonsense

try it sometime

blind chicks rock
mute chicks, too
did you ever see 'Jennifer 8'?

Well, obviously *I* rock, but you need to stop assuming that all blind people are as fantabulous as I am.
Yes.
*affected sob*

yeah and Umu Thurmans has a pretty nice body :p
Thurman*

Jennifer 8?

…yeah, think so

can't we get buubot to summarise

Umu Thurman plays a blind chick being stalked by a murderer

imdb

she becomes naked here and there :p

buubot help?

Jan`: Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

so…my mouseout events for a div element occur while the cursor is within the div element…….. what the flying deuce?

htlp imdb

buubot imdb jennifer eight

help imdb

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

Haha, oh

Jan`: Sorry, jennifer is not validI currently support the following subcommands: trivia summary quote title genre

buubot imdb summary jennifer eight

Jan`: A big city cop from LA moves to a small town police force and immediately finds himself investigating a murder. Using theories rejected by his colleagues, the cop, John Berlin, meets a young blind woman named Helena, who he is attracted to. Meanwhile, a serial killer is on the loose and
only John knows it. Written by Rob Hartill

yeah
the cop is…
wtf is his name
the one that isn't al pacino

Andy Garcia

right

*shiver*

yeah he's not fabulous
but Umu Thurman's naked boobies are

Look, if he wants me to be all weepy and pathetic, I will, if he's gonna turn up

who, what'shisname?

Andy
*sigh*

Haha

Hehe

oh :p
he's kind of paunchy now

But that's a really good example of screen bullshit. *weepily* "I remember red."

I think paunchy is the right word

Jan`: Is this the point at which Phil taps you on the shoulder?

I mean you're not gonig to forget COLORS fer chrissake.

… a mouseout event on div is fired when the mouse enters ….

… what the deuce is up with that?

As expected
If it enters , it's leaving div


that makes no sense.
it's not leaving div :P lol
div contains p

yeah save the top and bottom margins the p might have by default, they'll take up the same space (by default)

is there any way to fix that?

Check that (ev.relatedTarget || ev.toElement) isn't a child of this

buubot imdb summary Sketch Artist II

Jan`: When police artist Jack Whitfield (Fahey) learns about the serial killer that seems to be unstoppable, with no survivors, he's discouraged. But when he learns about an eyewitness survivor, Emmy O'Conner (Cox), things seem to unfold. What's the catch? The only surviving victim is blind.
At first Jack is skeptical and all at once loses hope in Emmy.

lol, ok
gotcha.
thanks

That's another absolute crip classic.

seen it :p

Sorry, I haven't seen it

seen it :p

Sorry, I haven't seen it

seen it :p

Sorry, I haven't seen it

seen buubot

Sorry, I haven't seen buubot

seen Jan`

That's another absolute crip classic.

seen Jan` nekked

That's another absolute crip classic.

bwah!
what's that other one, with Victoria Principal
buubot imdb summary Blind Witness

imdb summary blind fury

A Vietnam vet blinded in the war uses his samurai fighting skills and a concealed sword stick to help protect the son of a dead comrade from a crime organisation. Written by Keith Loh {loh@sfu.ca}

vietnam, samurai
rofl :p

I love that. Sword stick.

hahah
it's a sword concealed as a _cane_
weird, it has email addresses?

I couldn't fit one in mine, it's usually full of smuggled crack.
But yes.
Crip status not given great coverage on the silver screen.
Oh, apart from the Natasha Lyonne character in Blade Trinity.
Who was named after our supermarket.
Mm sleep

yeah that movie sucked
mmmhmmm

Hi all. im having some major problems getting someting to work right. i thought i was on the right track for the last day -but have just discovered that i could be way off. http://paste.css-standards.org/20154/view
Right now the images are swapping back and forth. but i need them to stay in the same spot and instead turn off and on, basically.
well not turn on and off. but have a checkmark htrough it or something, a secondary image i guess.
the idea here is that when on of the two images is sleected that a checkbox graphic appears in it's place indicating the selection has been made. right now it just bounces back and forth

instead of those images, use chekbox images

is there a js mouse event for whent he user actually LETS go of the mose?

i cant use checkbox images.

mouseup
I presume you mean the buttons :-)

yes
;p
exactly

what do you want, then?
it's doing exactly what you told it too
^to

this is for an ecommerce site. i want the user to select one of two options, represented to them graphically. when they select graphoc/radio button one, for example. i want to change the graphic indicating that it has been clicked.
i told it to do something wrong..

Why does calling "this.stop()" on a periodicalUpdater from within onSuccess do nothing? The stop calls in this code don't work: http://paste.lisp.org/display/44924

as you have it, only one item can be selected; the selected item has one image host and the unselected one another

but they are swapping with one another..

yes

they should not swap.

the selected one becomes unselected, and vice versa

wfor examle when the google button is clicked, the google button should invert indicating that it has been elected and they yahoo image stays the same since it was not selected

invert? what do you have telling it to do that?

i dont actually need it to invert. i will load a second image with a checkbox through it, but for this i just say invert

cb td label {padding-left: 18px; background: url(http://www.google.ca/intl/en_ca/images/logo.gif) no-repeat left; display:block; height:90px; width:80;} .cb td.selected label {background: url(http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif);}

so there will be 4 images. 2 google images, one with a check mark through it and another 2 yahoo images with a checkmark through it

if an item is selected, it has a Yahoo background; if not, it has Google

i know. and that is wrong.

or make one checkmark iamge and overlay it

oh, that maybe the the solution!
do you have any ideas on how i can overlay an image?

set it as a background

the checkbox?
errr chckbox over image..

HI !
I have a question for a JS pro. anyone awake ?

`ask @ Kaeno

ask: Those asking to ask risk axing. Don't ask permission to ask a question. Don't test the water, don't try our patience. Just ask. www.catb.org/~esr/faqs/smart-questions.html

I have a Menu object instance that holds a SubMenu object instance. Is it possible to refer to the Menu directly form within the SubMenu ?
I have a Menu object instance that holds a SubMenu object instance. Is it possible to refer to the Menu directly form within the SubMenu ?

no
unless you set the circular ref

what is circular ref ?

function Menu(parent){ ….} sub = new Menu(); main = new Menu(sub)
parent points to the child that points to the parent
You have to do that deliberately

ok thats what I thought
thanks a lot woosta !

np

an yone here use jquery?

this might be a stupid question, but does JS have a PHP-esque date formatting capability?

no

lame
(thx)
I'm sooooo not in the mood to write a bazillion switch statements…

http://pastebin.ca/629354

The paste 629354 has been copied to http://erxz.com/pb/3718

how do i list all the properties a given object has
especially from firebug

click it

can anyone refer an example where the function contained in an onclick is changed after the click? I can't get it done

yourEl.onclick=function(){ yourEl.onclick=function(){alert("Second click")}; alert("First click") }

thanks, I missed function()

hey, can someone please help me interpret this code? http://www.nopaste.ch/483884b2cfcb9e7.html
i get 20 as the answer, but it doesnt work

Your answer would be closer to 40

hey all
I have a quick question

`ask @ codeFiend

ask: Those asking to ask risk axing. Don't ask permission to ask a question. Don't test the water, don't try our patience. Just ask. www.catb.org/~esr/faqs/smart-questions.html

sorry, sorry

`apologise @ codeFiend

I'm trying to capture key press events with javascript
and they work fine
more or less
but… for some reason an onSubmit() event on a form doesn't fire anymore
this is not a question… I suck… never mind. Maybe if I can pinpoint the problem and formulate a better question, I'll be back.
this is not a question… I suck… never mind. Maybe if I can pinpoint the problem and formulate a better question, I'll be back.

can you explain to me how to reach that conclusion??

You're incrementing enigma based on the index of 1, 2, 3 and 4. The first 2 is the 15th character, and the first 4 is the 16th, so you're definitely not going to get a total of 20

so "for (y=1; y5; y++)" sets y to equal 1, 2, 3 and 4??? all at the same time?
uso "for (y=1; y5; y++)" sets y to equal 1, 2, 3 and 4??? all at the same time?/u

your for loop sets the y variable to 1, 2, 3 and 4 consecutively
not all at the same time
so on each iteration of the loop it's the next number…
that's what a for loop does
at least, that's what your for loop does.

`tutorial @ gladier
Hmm
`js
Bah
I dunno :P

lol

not gladier's
hehe

lol

ok… I've no idea what's going on here
imagine this
a form

i am a network engineer, just playing around with some js stuff for penetration testing

with an onsubmit event

Are you trying to submit with the enter key or with a submit button?

enter key

Do you have a return false; in your events?

yeah
I don't think it even fires onsubmit though
this is driving me mad
the worst part? it fucking works fine when I have firebug enables
enabled

Create a submit button and trigger with that. It should work. The return false; means the form isn't registering any of the keys itself, so if you want to trigger onsubmit you have to do it manually

hm
let me give it a shot
I did so want it to work with just the enter key though

Just to test

sure

If it works, then change your return false; to be conditional (ie return false if key != enter)

nope
onsubmit still doesn't fire
even with submit button

Wow
Can you do it with JS? document.forms['form_name'].submit()

unless I'm totally messing something up

if y is 1, does string.indexOf(y)+1 look for 1 or 2 in string???

fuck… me.
I suck
I used console.log in the function that executes onsubmit

try it in another browser - maybe firefox\s engine is screwed

onsubmit was firing fie
fine
but of course
when firebug is disabled
THERE IS NO F*CKING console.log!!!

gladier…. No. indexOf(y) returns a number, then you're adding 1 to that number.

so it died……
and I am an idiot

lol

thanks for your advice

No problem

as usual, the problem was between keyboard and chair
heh

Tends to be, with the exception of IE.
Then again, IE is pretty good at JS. Just CSS that it fails at.

im getting myself totally screwed on the head

what's your question?

for (y=1; y5; y++) {enigma += (string.indexOf(y)+1);}enigma += 5;
so y can equal 1,2,3,4 and it parses each of these numbers seperately yes???

yeah…?
enigma is 0 at start?
not just separately
sequentially

yes
0 at start

ok…

Return the first index of 1, add 1 to it, and add it to enigma. Return the first index of 2, add 1 to it, and add it to enigma. Return the first index of 3, add 1 to it, and add it to enigma. Return the first index of 4, add 1 to it, and add it to enigma. Add 5 to enigma.

yup.

oh ok

what he said.

was going to ask if it also included the last +=5

that last += 5 is outside the loop, neh

var string = "9b39be83ncvdv324ca"; … i get 50 now i understand whats going on

hooray

is that agreed??
hmm 50 isnt the right anser

hmm, how do I determine the type of an object to be a function?

eval (function)

''ERROR: syntax error at (eval 236) line 2, at EOF

Function.prototype.isPrototypeOf(o) ?

what's a good javascript tutorial

so we agree 50 is the answer

i would like to know if a given div is a descendant of another div
is there a good cross browser way to do taht? i'm using jquery if it helps
how would i get the parent of a div?
and the ID of that div

HEY GUYS GUESS WHAT

YEAH IT'S ME
oh wait
wrong chat lol
sry im drunk

(1) yourDiv.parentNode (2) why?

its complicated ;p

I doubt it :P

what about teh second part
getting the ID of that node
i.e. can i do … yourDiv.parentNode == "nameofDivToTestFor" ?
does that work cross broser?
browser

;support parentNode

parentNode { IE 6: Y | IE 7: Y | Firefox 2: Y | Opera 9: Y } http://www.webdevout.net/browser-support-dom#support-domcore-node

thats pretty nifty

Hi again ! I have trouble using arrays in a protyped function for example, function Myobj(){ var myArray = []; myArray[0]="foo"; } Myobj.prototype=( blah:function(){ alert(this.myArray[0]);} ) ……….. when the function is called it returns an arror saying that myArray is not defined …
dunno why

is there something specific to know about arrays when using prototyping ?

so would it be something liek…. myDiv.parentNode = "div#foo" ?
i mean ==

no .. parentNode is the node itself .. not a string

anyone user firebug

`oo overview @ Kaeno

oo overview: function ClassLike(arg){ this.property = arg; var privateMethod = function(){}; this.publicMethod = function(){} } Foo.classMethod = function(){}; Foo.prototype.objectMethod = function(){ return this.property }; var X = new ClassLike(12); X.objectMethod() == 12;

hehe nice so you mean that my array is private ?

yes

k
fantastic

hey #javascript
What does it mean if my error console is throwing something like "cdpb has no properties"
var cdpb = document.getElementById('cards_display_preview_background');

That ID was not found
At the time that command was called

Cool.
Fixed.

Woosta ? do you have anything on using setTimeout inside a class ?

boxes with grey dummy text that disappears when the users clicks?

(1) unless you're talking CSS there are no classes, (2) how would it be any different to anywhere else?

do you know this, or should I ask in #html ?

input type="text" value="default text" className="untouched" onfocus="if(this.value == this.defaultValue){ this.value = ''; this.className='' }"

thanks.

input.untouched{ color: # ccc }

sweeet.

should work

everything except the grey text
(it's black)

Oops s/className/class/ in html

ahh
is there any way to change the size of it, too?
yeah
got it
thanks

duh

CSS is so much fun~

`w3schools suck

w3schools are NOT (despite their name) related to the w3c. Their code contains deprecated code, bad methodologies, IE-centric code and mistakes.

Ok, what do you suggest as a replacement

learn icons = Say it loud, say it proud, say it way too much: http://gtmcknight.com/buttons/validated.php

OK

time

9, Hawaii: Sat

hey guys
how does one populate several variables at once from an array?
return [x,y];

you can't until JS1.7
var foo = rv[0]; var bar = rv[1];

crazy
okay, thanks for the info

In 1.7 (or maybe it's 1.8) you can do: (foo, bar) = rv;

who works on javascript anyway?
W3?

JS is an implementation of ECMA script
Mozilla, Microsoft, Adobe, w3c, ..

(destructured assignment)++

Aankhen“++

^_^

Aankhen“–

v_v

Aankhen“++

^_^]

Aankhen“–

s/\]//
v_v

You're too easy
karma Aankhen“ tooEasy

Unknown karma type 'tooEasy'. Known types are: dcc, xpost, bad pun, brilliant, clever, correct, dangerous, didn't google, excellent, funny, helpful, homework, informative, insightful, interesting, listens, loud, offtopic, pasting, right, rude, sarcasm, troll, unfunny, wrong

I aim to please. ;-)
You got told& by your own bot.

(expected behaviour ..)

Suuuure.
Where's the "IKnewThat" karma type?

about Aankhen“

Aankhen“ is known for loud (1)

o_O
"opinionated", I could understand. "smug", "arrogant", "full of it"& all appropriate. But "loud"? :-S

Permission denied to set property Window.0

Probably XSS prevention.

For sure
At a guess based on your earlier questions, you're trying to set the innerHTML of an iframe

well
i did that
div style="cursor: pointer; display: block;" onMouseOver="this.style.backgroundColor='#cdcef3' " onMouseOut="this.style.backgroundColor='White' " onClick="top.frames[0].getElementById('keyword').value='$info[user_name]' "
The onClick event is giving me that wrror
error

Write your (x)html in lowercase.
and it's onclick="top.fraes[0].document.getElementById …"

but i don see whats wrong with that

what… you dont see the difference between what I wrote and what you have?

i added that document, but it still gives that error

What's the error?

Permission denied to set property Window.0
Line 0
this is the error given by Firebug

The document that's in that frame… It's your own document right? (same domain and what not)?

its an iframe, and from the iframe i want to change the value of a field outside the iframe
its my own document

Give the iframe an ID and access it using document.getElementById('irame_id').contentWindow.document

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: