Im getting an error when using Eventobserve [Exception [object Object] when calling method [nsIDOMEventListenerhandleEvent]
handleEvent]" nsresult: "0×8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "unknown" data: no]"….can anyone tell me why this might be happening?
Hello my name is Dr. Greenthuuumb
try asking in #prototype
I did
I figured I might be able to get pointed in the right direction at least here
I can't help, others?
#prototype is sleepy right now, lol
the event threw an exception of type object
location says unknown
I think I just figured out where it is…
`js ref
http://developer.mozilla.org/en/docs/JavaScript , http://devedge-temp.mozilla.org/central/javascript/index_en.html , http://phrogz.net/ObjJob/ , JScript@MSDN: http://tinyurl.com/9pk3l , www.crockford.com/javascript/
got it
when i put a div wrapper with a z-index on top of content, how can i make it where they can't click on any of the stuff underneath it.
oO
what stuff?
the website
you can disable links
but people know how to turn off javascript
since the fox has become man's best friend
is there a way to get a nodeList of all radio buttons from a form (it sounds reasonable since all of them have the same name
yea
how?
getElementsByTagName
hmm
doesn't seem to be working. that works for XML but not sure if it can extract input from form ?
for (i=0;idocument.forms[0].radios.length;i++) { … }
ah i figured it out
you have to use an image overlay
you access each one like this: document.forms[0].radios[i].checked
what if i have two groups of radio buttons (not with same name).. just do an if underneath the for, no neater way?
or like this: document.forms[0].radios[i].value
value and checked aren't the same..
I know, lol
I was just showing you how to access attributes
can i do var radios = document.forms[0].radios; ?
sure
great
ty
np
wait a minute
what's up?
quirksmode says radios can be the name of a group of radios
sorry?
seems to be logic
let me give you the link
can anyone point me in the right direction to have a long webpage autoscroll up and down???
http://www.quirksmode.org/js/forms.html
if you want to creat radio groups you have to give them all the same name ..
last section
this does not return a value at all document.forms[0].radios.length
and yes, there is only one form on the page
that's why I was talking about the group name
use it instead of radios, for example…
is it possible to access forward, backward history without JS enabled?
yes, you click the back button
i'm not following you
group name?
is there a way to get a nodeList of all radio buttons from a form (it sounds reasonable since all of them have the same name
DDustin
oh i see forms[0].groupName… yes
but is it possible to make a hyperlink to access this?
how do i get a zero value from a string that isn't a number - i don't want NaN
a zero value?
parseInt("test") || 0
0
funny… forms.formName.groupName doesn't work in IE..
on one hand.. .on the other var opts = document.getElementById("pollForm").answer; also doesn't work (so in other words it won't work by groupName
same goes for var opts = document.forms[0].answer; in IE
parseInt("")
NaN
parseInt("a")
NaN
`js forms
Accessing form elements via JavaScript: Don't use document.forms[index].elementName or document.formName.elementName. Use document.forms['formName'].elements['elementName'] or document.getElementById('formID').elements['elementName'] or document.getElementById('elementID')
jsBot could be a little less confusing with a url to a more descriptive wiki
no *you* would be less confusing with a url to a more descriptive wiki
harsh
what do you need to know that's not there?
"why" might be nice
i don't care, but someone using forbidden form 1 & 2 might not see much difference between what they have and acceptable forms 1-3
"because you asked" would generally be applicable
ok - nm
getElementsByTagName works for XML — but how do you do the same with HTML tags in the dom ?
it's the same in HTML DOM
but it's not working…
:/
pastebin some code in that case
http://www.safetycenter.navy.mil/Articles/a-m/monkeys.htm
for example:
var opts = document.pollForm.answer; — works
var opts = document.pollForm.getElementsByTagName("answer"); — doesn't work
document.forms[index[.elementName get a monkey beaten
especially with the typo (dumbass)
but the problem is the first line works only in FF so I need to get this function working.
skr1 - "answer" isn't a tagname
"answer" is a group of radio buttons with the same name
var inp = document.createElement("input");
inp.type = "radio";
inp.name = "answer";
paste*bin*
ohhh i see now
but - i don't want to get all INPUT either.. only radios from this form
document.forms["pollForm"].elements["answer"]
insin still not working in IE
skr1 - what's the url?
"not working" is kinda vague
var opts = document.forms["pollForm"].elements["answer"];
opts.length // length is null or not an object
again, this is all in IE - FF works fiine
var opts = document.forms["pollForm"].elements["answer"];
alert(opts); // undefined
tell me, when doing AJAX is it mandatory that the server send headers?
skr1 - have you consulted any kind of spec or googled anything or used a debugger with a watch window
How would I redefine a CSS class using javascript?
Jimicon - why would you do that?
I've been trying to google all along, reading now on msdn intro to forms since nothing of what seems logical works.. as far as debugging, i'm kind of new to JS.. what would you recommend?
given that "AJAX" is just a HTTP request, so yes
s/so//
Jimicon
thanks
element.className = "blah"
No Nex, redefine the class itself.
I have an image container.. it has several ways of displaying an image, and a class for each. The images it contains can be of any size, so I need to redefine width and height
Actually.. never mind, I'll just use another div inside it.
How can I load a different javascript depending on the value of a form selection?
onchange=psuedo-code( load relevant .js file)
will try installing IE 7 to see if this has been resolved
are you doing it in AJAX or is the page being refreshed?
grabbing Javascript as XML, zuh?
I guess I would know if I was using AJAX, eh?
?
My .js is being generated by a perl CGI script
margin: 0 in your CSS
insin oh thanks!
i'm having a problem where when I put an alert() before a function call, everything works as it's supposed to after a div is refreshed, but if the alert() is not there, my Droppables function call does nothing. Any ideas?
http://rafb.net/p/l0lJoG66.html
when is this function being called?
http://www.onmylist.com/category/tech/Top_Six_Best_Sites_for_Windows_Skinning_1
^ neat article
…
its being called on page load, and then after I drag/drop something on it, since the droppable area is being refreshed.
the page load is fine at all times, its after the div has been refreshed that I run into this alert() problem
Is using the ternary operator frowned upon much in JS?
depends how you want your code to look, that's more of a preference thing