Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

javascript - Microsoft JScript runtime error: Member not found

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...