Solved

Microsoft JScript runtime error Object expected

Posted on 2010-08-31
7
741 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now