Hi,
i'm tring for hours to correct this simple script:
Javascript says:Code:<script language="javascript" type="text/javascript"> function music(act, id, dis) { if(dis.length <= 1) { var s = 'non impostato'; } else { var s = '<a href="storage/music/' + dis +'" target="_blank">' + dis + '</a>'; } if(act == 'new') { document.getElementById('music' + id).innerHTML = s + ' • <input type="file" name="music" /> <a href="javascript:void(0);" onclick="music(\'back\', ' + id + ', \'' + dis + '\');">Non cambiare</a>'; } else { document.getElementById('music' + id).innerHTML = s + ' • <a href="javascript:void(0);" onclick="music(\'new\', ' + id + ', \'' + dis + '\');">Cambia musica</a>'; } } </script>
Uncaught typeerror: object is not a function
General HTML code:
-----------Code:<form action="/ad/pubsis/pubsis.php" method="post" enctype="multipart/form-data"> <table> <tr> <td>1</td> <td><div id="music30">non impostato • <a href="javascript:void(0);" onclick="music('new', '30', '0');">Cambia musica</a></div></td> </tr> </table> </form>
Now i found that if i removefrom code, the script works well.Code:<input type="file" name="music" />
What can i do to fix that?


Reply With Quote
thank you 
Bookmarks