![]() |
| |||||||
| Sponsored Links |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| Sponsored Links |
|
#22
| |||
| |||
| i tried it same thing same error there is no space |
|
#23
| ||||
| ||||
| Do you have a link to your page so I can see it? I have copied and pasted the code back from this site, retried it and it still works fine in IE6, 7 and FF for me. |
|
#24
| |||
| |||
| its on the intranet site this is the message i get in firefox Error: document.getElementById(the_div) has no properties |
|
#25
| |||
| |||
| i did the alert for testing function changeDivcr(the_div,the_change) { alert(the_div); alert(the_change); document.getElementById(the_div).style.display=the _change; } so the output is div name and then block so its working is the syntax right richyrich |
|
#26
| ||||
| ||||
| The syntax is right. I'm assuming there isn't a space in the_change. How are you calling this function? It should be called for each div with the_change variable being alternated between block and none depending on whether you want to show or hide the div. |
|
#27
| |||
| |||
| i copied ur same code richyrich i just dont get whats wrong the parameters names are unique |
|
#28
| |||
| |||
| Ok i found out whats going on function changeDivcr(the_div,the_change) { alert(the_div); alert(the_change); document.getElementById(the_div).style.display=the _change; } when the alert is fired it always tells me reservecash when i select credit card i still get the alert reservecash when it should be reservecredit |
|
#29
| |||
| |||
| dont worry there is no space the_change |
|
#30
| |||
| |||
| I changed this line document.getElementById(the_div).style.display=the _change; to document.getElementById('the_div').style.display=t he_change; now there is no error but it still doesnt show the div |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| display problem with drop downs | todd2006 | JavaScript Programming | 3 | May 5th, 2008 05:31 PM |
| drop down problem | todd2006 | .Net Development | 2 | April 23rd, 2008 11:37 AM |