Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 20th, 2004, 12:55 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default run time error: Object expected

<script language = javascript>
          function Call(){
          var FName=(document.thisForm.txtBox1.value);
          var LName =(document.thisForm.txtBox2.value);
          if (FName=="" && LName==""){
          alert(" you have not entered first Name and last Name");
           return false;}
           }
        </script>
<input type = button value = search on click ="javascript: call();">
Gives me an error at "javascript:call();". the error is object expected. I dont know what is the error. Please help me.

Reply With Quote
  #2 (permalink)  
Old September 20th, 2004, 01:06 PM
Friend of Wrox
 
Join Date: Sep 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

Hi,
      here also the same mistake you did. Use form tag. And the second mistaje what you did is not using "return" statement while calling the function.
Use "javascript:return call();".
Thanks
Suresh Babu



Reply With Quote
  #3 (permalink)  
Old September 20th, 2004, 08:06 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  Its not the problem with omiting return statement while calling the function. Its the problem with casesensitive.

function Call(){
....
}

<input type = button value = search on click ="javascript: call();">

Javascript is case sensitive.

Rajani


Reply With Quote
  #4 (permalink)  
Old September 21st, 2004, 09:05 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried to use the same case also, but it still doesnot work
and complains about the object required and highlights javascript in
input type

Reply With Quote
  #5 (permalink)  
Old September 21st, 2004, 08:01 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  include property values in quotes and onclick is single word. No spaces. Try this...

<input type="button" value="Search" onclick="javascript:call()">

----------
Rajani



Reply With Quote
  #6 (permalink)  
Old September 22nd, 2004, 03:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

It is better that you use QUOTES around the value of any property that you use there. Also OnClick event is a single word.
Code:
<input type = "button" value = "search" onclick ="javascript:Call();">
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time Error 424 "Object Required" paul31berks Access VBA 8 October 31st, 2010 04:49 PM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Getting Object Expected error on mouseover event nrlahoti ASP.NET 2.0 Professional 10 March 15th, 2008 11:30 AM
Object expected error hericles Javascript How-To 1 July 19th, 2007 10:21 AM
error on page: object expected eggoose Javascript 5 April 19th, 2006 02:14 AM



All times are GMT -4. The time now is 05:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.