|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Show/hide text and select/unselect Radiobuttons
I have put together some Javascript's that shall Show/hide some text and a textbox, and Select/unselect some Radiobuttons with different names. It works in IE and NS, but not in Opera. (Some of the script are a rewritten MX Javascript).
Question: Does anybody know how to make it work in Opera? The code: PHP Code:
|
|
#2
|
|||
|
|||
|
EiSa,
Just out of curiosity, try using the "display" property rather than "visibility". Also, you may want to look into manipulating the DOM, which would ensure cross-browser compatability.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#3
|
|||
|
|||
|
Could you please explain this a little bit more, I'm not the best person in JS, or perhaps you know a resource that I could look into?
|
|
#4
|
|||
|
|||
|
I think it may help ....
Instead of using ... Code:
MM_findObj(args[i]) try Code:
document.getElementById(args[i]) HTH! |
|
#5
|
|||
|
|||
|
Didn't help either. In Opera the
onclick="KundePrivat. checked=false and onclick="KundePrivat. checked=false doesn't work either. But thank's for trying. |
|
#6
|
||||
|
||||
|
Not sure if you have done this for brievity, but when referring to form elements (or anything else for that matter), you should always use its full DOM reference. (note that you can normally leave of the 'window')
So, for your radio button called KundePrivat, you would refer to it as follows: Code:
document.frmName.KundePrivat.checked = false OR document.forms[FormIndexPos].KundePrivat.checked = false Also don't put a space after your dots. e.g. "object. checked" |
|
#7
|
|||
|
|||
|
Thank's stumpy, your suggestion made it work.
By the way, the space thing wasn't in my code, it was something this forum made with my code. It has happened before also when posting something about Javascript. |
|
#8
|
||||
|
||||
|
Kewl - yeah, Opera is one of the more stricter browsers around, so it's good to develop on such a platform.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Show/hide text and select/unselect Radiobuttons |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|