Microsoft JScript runtime error: Member not found

无人久伴 提交于 2019-11-28 03:26:19

问题


i am using asp.net mvc3 and jquery dialogue to open partial view in main view

here is my structure..

partialview 1

<input type="button" onclick="function1();">

partial view 2

<form method="post"> 
    //some elements

    @Html.RenderPartial("partialview1");
</form> 

view 1

<script src="myscript.js" />
<script src="jquery.js"/> 
//some element

<div>
    load partialview 2 as jquery dialogue 
</div>

myscript.js

  function function1()
  {
     //some code
  }

this is just only overview of my application

now in above structure if i click on button in the partialview1 i am getting this error : Microsoft JScript runtime error: Member not found.


回答1:


I found the solution in my case.

<input id="function1" type="button" onclick="function1();">

I have used id of the input type button (ie: function1) as the same name of function (ie: function1).

As I don't know much about it. But by changing id of the button or function name solves my problem.




回答2:


Actually, 'Member Not Found' occurs on all browsers and other non-browser programs. In browsers, placing a button or radial with the same name as the function it calls within a form induces this error. Either rename the button or move it outside of the form.



来源:https://stackoverflow.com/questions/13647631/microsoft-jscript-runtime-error-member-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!