Re: TextInput({'onKeydown': 'some javascript code'} problem

2007-05-02 Thread Ivan Sagalaev
hoamon wrote: > no.setAttribute("onKeydown", 'Element.update("NO_CHECK", " src=http://mydomain/arrows.gif>");'); Instead of assigning a raw onkeydown attribute it's better to attach an event. Look into prototype.js' docs, I bet it can do this in a cross-browser fashion. Something like Event(

Re: TextInput({'onKeydown': 'some javascript code'} problem

2007-05-02 Thread hoamon
that's original way i use, but i don't understand why IE can't work. i put the source below here to my form block ... var no = document.getElementById("id_no"); var no_check = document.createElement("no_check"); no_check.innerHTML = '

Re: TextInput({'onKeydown': 'some javascript code'} problem

2007-05-01 Thread Ivan Sagalaev
hoamon wrote: > how can i customize the fields in the newforms, or i walk the wrong > way ?? What you described is an issue but I want to advice a different technique that doesn't suffer from this issue and also considered more robust. You shouldn't mix your HTML with Javascript, instead you s

TextInput({'onKeydown': 'some javascript code'} problem

2007-05-01 Thread hoamon
hi there, i want to use ajax in newforms library. but when i use the below here: class RegForm(forms.Form): personalid = forms.CharField(label='ID', widget=forms.widgets.TextInput({'onKeydown': 'Element.update("NO_CHECK", " http://mydomain/arrows.gif>");' ... the html output is ID, " ch