Mam skrypt do dopisywania parametru do hiperłącza. Problem w tym gdy podaje zmienna na wejściu i niby jest poprawna to wywala błąd: Uncaught TypeError: Cannot read property 'href' of null.
<!doctype html> <html> <head> <script> function modUrl(mid, idUrl){ var url=document.getElementById(idUrl).href; url=url+'&mid='+mid; //alert (tmp); document.getElementById(idUrl).href=url; } </script> <meta charset="utf-8"> </head> <body> <select name="todo" onChange="modUrl(this.options[this.selectedIndex].value, 'urlS_1')"> </select> </body> </html>