Microsoft JScript runtime error: member not found

I am using asp.net mvc3 and the jquery dialog to open a partial view in the 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 an overview of my application.

now in the structure above, if I click the button in partialview1 , I get this error : Microsoft JScript runtime error: member not found.

+7
source share
2 answers

I found a solution in my case.

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

I used the id button of an input type button ( i.e.: function1 ) as the same function name ( , i.e.: function1 ).

How little I know about this. But by changing the button id or function name solves my problem.

+20
source

In fact, "Member Not Found" is found in all browsers and other non-browsers. In browsers, placing a button or radial with the same name as the function that it calls on the form causes this error. Rename the button or move it outside the form.

+1
source

All Articles