admin管理员组文章数量:1410689
I cannot figure out what I did or did not do here syntactically to cause this error. I don't see what's missing:
function ShowWaitMessage(button)
{
var isValid;
if (buttonSelected())
{
showWaitMessage(button, "showMessage1");
isValid = true;
}
else
{
Page_ClientValidate();
if (Page_IsValid)
{
showWaitMessage(button, "showMessage2");
isValid = true;
}
}
return isValid;
}
I cannot figure out what I did or did not do here syntactically to cause this error. I don't see what's missing:
function ShowWaitMessage(button)
{
var isValid;
if (buttonSelected())
{
showWaitMessage(button, "showMessage1");
isValid = true;
}
else
{
Page_ClientValidate();
if (Page_IsValid)
{
showWaitMessage(button, "showMessage2");
isValid = true;
}
}
return isValid;
}
Share
Improve this question
asked Apr 22, 2010 at 21:28
PositiveGuyPositiveGuy
47.8k112 gold badges314 silver badges479 bronze badges
2
- I would look into the parts in the if statements more closely! – Mahesh Velaga Commented Apr 22, 2010 at 21:32
- my fault. I had a ment right on the same line as one of my if statements..you can't do that unfortunately and I hate that. That was the problem that you would not have seen here. – PositiveGuy Commented Apr 23, 2010 at 14:12
3 Answers
Reset to default 2I had a ment on the same line as one of my if statements....causing this whole issue.
I don't think there's anything syntactically wrong with your code, having "run" it in both FireFox and IE. (By "run" I mean "loaded in a <script>
tag", which ought to find syntax errors.)
What line does the error message point to?
You're missing a declaration of the Page_IsValid variable. I'm guessing that it's a local variable set inside of Page_ClientValidate, which isn't in scope in this function?
You should probably also initialize isValid to false instead of leaving it undefined if both checks fail.
本文标签: javascriptExpected ExpressionStack Overflow
版权声明:本文标题:javascript - Expected Expression - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744784280a2624901.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论