I am picking up content from a textarea and displaying it with alert However the content is allways the original

but when I specific the source I want (which is also output[i] ) it doesn't work

paste your code
wtf?

I was asking if you were talking to me, sorry.

I know of a problem or two in the functions that still need work.. let me do that, test it, and if it doesn't work I'll come back

yes
ok, good luck

stickto, can you take a look at why it doesnt' work in FF, please
It works in IE

I'll try it, but it's too long, i am not sure if i can find the problem

Just look at teh js, not the css stuff that is just there to layout the look that is on the site

quickest way to slice a single char out of an array?

i don't know a faster way than substrings

err…yeah i actually wanted to do it from a string
hmm

either substr, substring or replace

word

called aaa[] how can I check its length? aaa[].length doesnt work

do it by id
set id="aaa" and then do document.getElementById('aaa').value.length

I dont want the value length

what do you want?

I mean I have few inputs called aaa[] and I want to know how much input I have

how many inputs you have

getElementByNames("aaa").length

stickto, second I will try it

stickto, won't work with [] on the aaa will it

the method will return an array

it seems to work, second

did that work?
If not you can loop through them maybe,
something like this
maybe var inputs = document.getElementsByTagName('INPUT'); for(var i = 0, p = 0; i inputs.length; i++){ if( inputs[i].name.indexOf('aaa') != -1 ) p++; }

document.getElementById("theForm").getElementByNames is not a function

getElementsByName
misspell

oh second

document.getElementsByName
needn't get theForm first

document.getElementById("theForm").getElementsByName is not a function
oh
second
my fault
it seems to work, how do i make a loop that will check all of them if they are checked?
I need only the if condition
if (document.theForm.chlist[i].checked) {
not working

for( var i = 0; i inputs.length; i++){ if( inputs[i].checked ){ … } }
maybe that

omg lol
I did
document.getElementsByName("aaa").length
and the inputs are called "chlist"
o_O
im so tired

do this var inputs = document.getElementsByName("aaa");
and use my for loop

ok second
doesnt work

what error do you get

I am not getting an error
if I will show you the inputs, may it help?

how are you checking if they are checked

if (inputs[i].checked) {

show me your entire page
paste.css-standards.com
well?

second
my boss talked to me

np

http://paste.css-standards.com/
doesnt work

.org sorry
paste you entire page there

http://paste.css-standards.org/21582
check lines 133-137

how would I run the function that counts the inputs
onsubmit?

onclick
the function called checkchannels
do you wanna see the function too?

that would help
sec, so you have a bunch of checkboxes and you want to see if they are checked right
that is your end result
and how many are checked

Hey guys, is there something i need to do to get my = operator to work when comparing two variables
var1=var2

Forbiden, exactly

ok sec

http://paste.css-standards.org/21583
this is the function

var10 works but var1=var2 doesn't work

sec I will write an exampel for you
a workign one

for me?

no dhZ__work

OH OK

Forbiden, ok thanks

woops caps

yadayada, cant you just make like if you need =10 do 11

naa, im dealing with floaters
decimals

Forbiden, I know whats the problem

got it working, had some quote problems

I did
var inputs = document.getElementsByName("chlist");
alert(inputs.length);
and im already getting "0"
neverminds how much I check I get 0

has the page loaded when you call that?

Is there an event that will run as a user is typing in an input box
?

dhZ__work, sec

onkeyup

haha, nice thats awesome!

Mace[work], yes

dhZ__work

second I think I succeeded

here ya go
http://paste.css-standards.org/21588/view
there is a working model

I have got it to work
just needed
document.getElementsByName("chlist[]")
instead of
document.getElementsByName("chlist")

thats fine I like my way better, but to each their own

show me your way, just for a better knowledge

I did
http://paste.css-standards.org/21588/view
http://paste.css-standards.org/21588
they both have the same result
I just check the name when I loop through them
your way you are setting the name
Your way is probably faster, I loop through all inputs and you only get the ones you want your way

yeah, but nice code
thank you anyway

np
not that the time is an issue to the end user
it isn't noticeable

http://z.about.com/d/politicalhumor/1/0/r/1/bush_gollum.jpg

If I write "for(var id in myIDs) alert(id);" shouldn't "id" then be local for the "for"-scope? That is: Shouldn't "id" be invisible outside the for-loop?

I am trying to have two price fields — excluding and including tax — and when you modify one it automatically updates the other. How could I do this with some JS? I know I must have to use the onChange handler somewhere. Thanks.

How do I get the number of elements in an associative array?
myArray.length returns 0 even though myArray is nonempty

jamey-uk: onKeyUp or onBlur, because onChange is for List & Combo

stickto, thanks onChange did work but you have to defocus the field before it runs the function

Hello. Where can I get a good window.onDOMReady() implementation that does not depend on a certain framework?

jamey-uk: sorry long time since i writed js

bah I forgotten, whats the name of that project that overlays flash on top of normal text to use custom fonts on web pages?

for your situation, i think onkeydown or onkeyup is better

sIFR

sifr!
finally found it on google, cheers tho

if the 2 prices are inputed instead of paste

teech me not to backup my firefox bookmarks
teach*

stickto, yeah it works great, i've got two fields (cost price and sale price) and it calculates the ex and inc tax pricing on the fly

jamey-uk: I hate tax, LOL

lol

Any help for me? (the onDOMReady question).

is there a way to turn a 0 or 1 into false / true ?

!!variable
Or something.
variable = 1; variable = !!variable; don't know if it works in JS, I use it all the time in PHP.

thanks

No problem.

This appears to work. not sure if there is likely to be any probs with it though
bReceivedTimpStamp = !!(1 ^ isNaN(sResponse));
although it could maybe just be done with bReceivedTimpStamp = !isNaN(sResponse)

Probably.

what's the meaning of "!!"

Double negation.
It's ! applied twice.
Nothing magic about it.

oh

I want my boolean to equal true if my result is a number, and false if its not a number
so my one of the negations and the bitwise XOR cancel each other out i suppose
just tested it, and yeah…
bReceivedTimpStamp = !!(1 ^ isNaN(sResponse)); is the same as bReceivedTimpStamp = !(isNaN(sResponse));

hello
im using YUI , and registered an onclick event to some DOM element
now i want to fire that event not by clicking, but from js
how can i do that ?

normally you can make the event to call a JS function, after you do that you will be able to call this function from anywhere you want

so just elem.eventFuncName() ?

is there method similar to document.getElementById that lets me pick an element based on name or id from a subtree, ie. element.getElementById?
in other words I do not want to search the whole document.

yea sec
getElementsByTagName("table")

hi..there..

why does isNan("") equate to false ?

I'll try it out. Thanks!

how can i disply item in combobox in java

Because a empty string '' is converted to +0.
Same as a string with only whitespaces.
Number(' ')

0

I am picking up content from a textarea and displaying it with alert. However the content is allways the original content regardless of wether I edit it or not. Anyone know why?

hi

Greetings, welcome to the JavaScript channel. How can we help you ?
omg I'm so imba

oh, me?
I am picking up content from a textarea and displaying it with alert. However the content is allways the original content regardless of wether I edit it or not. Anyone know why?
:-)

put your code online and give us link

alert( e.getElementsByTagName( 'textarea' )[ 0 ].innerHTML ) ;

to be automatically executed?

i want to execute the decoder() on a list what i read from php

decoder( obscured_entry ).value mabe

i tried that
it gives me unknow function because php thinks that's a php function

http://ohkef.com/boob.htm

I get nothing in the alertbox:-|
using ff

refresh
hm
maybe you have the same problem
I was using innerHTML and FF didnt display it
use:

yup, that's it! I'll look at the source now:-)

alert( e.getElementsByTagName( 'textarea' )[ 0 ].value ) ;
instead of
alert( e.getElementsByTagName( 'textarea' )[ 0 ].value ) ;
alert( e.getElementsByTagName( 'textarea' )[ 0 ].innerHTML ) ;

anyone know how can i call a javascript host function from php?

works like a charm. Many thanks!

you generate the JS with PHP, or you use AJAX and call it dynamicly
I can give you a link to AJAX tutorial if interested

i generate the js with php hosting yes

aaaight!
is there any javascript reference i can download somewhere?
(in html of course)
so i can browse thru it when i'm offline (like python's documentation)?

Hi
event.activeElement is not supported by safari?

the specs might be available for easy download

sry document.activeElement

ecma specs?

hello

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

Comments are closed.


Blog Tags:

Similar posts: