"Object expected" error with "javascript:ShowDocument" statement
I added code to one button but while clicking it raises "Object expected" Javascript error
Me.btnReport.Attributes.Add("onclick", String.Concat(New String() {"Javascript:ShowDocument('frmDocReport.aspx?PrjId=", Me.droplstProject.SelectedItem.Value, "&Type=", Me.droplstType.SelectedItem.Value, "&RecPer开发者_开发问答Page=", Me.droplstPAGE.SelectedItem.Value, "&DocNo=", Me.txtSearch.Text, "')"}))
I think its simple but I am not able to solve
In my view source I can see like this
onclick="Javascript:ShowDocument('frmDocReport.aspx?PrjId=48&Type=0&RecPerPage=5&DocNo=');"
One of the JS objects you are using is null or does not exist. It is not possible to tell from the code snippet which one. Use a javascript debugger such as FireBug to inspect the values and work out what is null. From that you should then be able to work back to why that value is null and solve the error.
精彩评论