Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
problem sa onChange u JS

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
dragec



Joined: 16 Dec 2004
Posts: 8
Location: Zagreb

PostPosted: 16.12.2004 15:28    Post subject: problem sa onChange u JS Add user to your forum ignore list Reply with quote

naime, postavivsi :

sel.setAttribute("onChange", alert("AA"));
alert se javlja prilikom kreitanja objekta "sel" ( var sel = document.createElement("SELECT"); ) ili prilokom postavljanja "onChange" (nije mi bitno sada),

a uopce se ne javlja prilikom odabira nekog od OPTIONS-a.

Kada je SELECT statican u HTML-u, nema problema,
cim je u JavaScriptu, ne radi.

U cemu je problem?

_________________
Dragutin Culinovic
Back to top
View user's profile Send private message Send e-mail
maratz
mi3.crew


Joined: 24 Nov 2003
Posts: 1207
Location: ZAG

PostPosted: 16.12.2004 16:07    Post subject: Add user to your forum ignore list Reply with quote

Trebaš dohvatiti neki određeni element i postaviti mu behavior, npr.
Code:
sel.onchange = function() { alert('AA') }

_________________
STOP HITTING YOURSELF! | NETIQUETTE | TYPETESTER | Hypertext rulez™ | CREATIVE NIGHTS | ACCOMMODATIONS
Back to top
View user's profile Send private message Visit poster's website Twitter profile
dragec



Joined: 16 Dec 2004
Posts: 8
Location: Zagreb

PostPosted: 16.12.2004 16:11    Post subject: Add user to your forum ignore list Reply with quote

nasao sam u cemu je kvaka, sve je OK samo mu fale navodnici oko Alert, i oko AA sam stavio jednostruke.

dakle:

sel.setAttribute("onChange", "alert('AA')");

_________________
Dragutin Culinovic
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group