Solved

Microsoft JScript runtime error Object expected

Posted on 2010-08-31
7
744 Views
Last Modified: 2012-05-10
Why do i get the error :

Microsoft JScript runtime error Object expected

when this line of code is run

onclick="return txtNoteFile_onclick()" /> </input>
0
Comment
Question by:troyvw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:jijeesh
ID: 33572039
Do you have txtNoteFile_OnClick() function in your web page?
Can you send the whole webpage content
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33572108
> txtNoteFile_onclick

Seems you're calling client side function from server side.

Try :

<asp:Button
 onClientClick="return txtNoteFile_onclick()" />

Open in new window

0
 
LVL 1

Expert Comment

by:g3k0
ID: 33573019
Do you mean
<asp:Button
 onClientClick="txtNoteFile_onclick()" />

???

Need more information.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:troyvw
ID: 33576599
<input name="NotesPanel$C$txtNoteFile" type="file" id="NotesPanel_C_txtNoteFile" size="4" onclick="return txtNoteFile_onclick()" /></>
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 33576672
why  / >< / > ?

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.onclientclick.aspx
<input name="NotesPanel$C$txtNoteFile" type="file" id="NotesPanel_C_txtNoteFile" size="4" onClientClick="return txtNoteFile_onclick()" />

Open in new window

0
 

Author Closing Comment

by:troyvw
ID: 33576873
ty
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33576880
You're welcome! Thanks for the points!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question