@# Quotes DB     useful, funny, interesting





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



Comments:

<0> well that's what I'm using.. more because it works than any other reason... but putting []'s into the ID was what was screwing me up
<1> For form elements, it's not a good solution.
<0> Ok Pilum, I'm still messed up, if i have this input set as:
<2> i don't like [] in name either
<0> <input name="subject[]" id="subject1" type="text" cl***="input" onfocus="toggle1('subject1')" onblur="toggle2('subject1')">
<1> Neither do I, ht311. :-)
<0> and there's 4 such inputs like that (subject1, subject2, subject3, subject4)
<1> MrHicks: Send the object reference instead of its ID.
<1> Then you need no method to look it up.



<1> onfocus="toggle1(this)"
<0> ok.. this is all on the submit button.. so onClick="return checkDegree(this)" ?
<1> Probably not, but I can't tell without knowing your checkDegree function.
<0> well I'm just trying to check to see whether all the inputs have been filled in basically
<1> Might be an idea to p*** this.form to the function then, so you have a shortcut as it were.
<0> but if i put: 'var subj = document.getElementById("subject" + i).value;' in a for loop it says it expects an object
<1> var subjects = formRef.elements['subject[]']; // loop through subjects[i]
<0> "formRef" is undefined?
<1> function checkDegree(formRef) { ...
<1> onclick="return checkDegree(this.form);"
<0> thanks Pilum (for your patience as well)
<0> it worked, and I think I've got this figred out now... thanks again
<3> I have two form elements that work together. I want something to happen when both of them have lost focus. How do I do that?
<1> Keep track with a variable or something.
<3> yeah, but when I go from one to the other, the onblur event of the first triggers before the onfocus event of the second. Doesn't it?
<1> I should think so.
<3> So how can I keep track of them?
<1> Have the onblur increment the var and check its status maybe?
<4> btw my nick has nothing to do with javascript variables
<5> hello. I've got another question.
<5> let's say I have a function: document.write(<this, that>\n\n\n\n\n\n\n\"test\"</that>\n\"whatever\">
<5> how can I make it so I can print what that function evaluates...
<5> I mean, to print <this, that> (blank lines) "test" </that> (blank line) "whatever" ?
<1> Don't.
<1> Don't document.write
<5> then? "echo" or something similar ?
<1> createElement
<1> Or innerHTML
<5> innerHTMLso just innerHTML(<this, that>\n\n\n\n\n\n\n\"test\"</that>\n\"whatever\">); ?
<5> erm
<5> "so just" that?
<1> Ho.
<1> *No
<5> hmm, then ?



<1> innerHTML is a property, not a method.
<5> oh
<5> document.innerHTML ?
<1> document.body in that case.
<1> document.body.innerHTML // The code between <body> and </body>
<5> with // ?
<1> / starts a comment...
<1> // even
<5> <- shoots self
<3> Pilum, I had to go to a meeting. i'm back
<5> not working =/
<3> My problem is that I don't see any way to tell when both form elements are blurred. When one of them loses focus, I can't check to see if the other has gained focus. And I don't see how setting variable would do any good since the second element can't set its variable until AFTER the onblur event of the first element has triggered.
<5> uhm, I guess unescape does the job
<5> hmmm, but I don't want it rendered in the browser now =/
<5> think I just crashed firefox with my javascript
<6> join the club
<3> Can anyone help me with this?
<5> isn't there a function like alert() that just prints stuff to the browser?
<3> document.write?
<5> I don't want it to be rendered
<5> just plain text
<3> what do you mean then?
<5> if you do alert() with some html you just get the html, not rendered, right ?
<3> right
<5> I want to "spit" the text to the browser window without rendering it
<5> I tried using <pre> and then document.write
<5> but no lock
<3> yeah. <pre> still renders some things and doesn't show tags
<5> <code> ?
<5> ah, I KNOW!
<1> Just replace < and > with &lt; and &gt;
<5> I was thinking to open up a new window and set the mime type to plain/text
<1> Won't work.
<5> oh
<5> i see
<1> Some browsers will still render it as html.
<5> darn thing! DONE
<5> thanks


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

how to stop duplicate entries in php
00mauro
#c++
meezyfuh
#linux
#php
miRC mazatlan
#london
power2go nag screen
#java



Home  |  disclaimer  |  contact  |  submit quotes