Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2004, 12:55 PM
Friend of Wrox
 
Join Date: Jul 2004
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.

 
Old September 20th, 2004, 01:06 PM
Friend of Wrox
 
Join Date: Sep 2004
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



 
Old September 20th, 2004, 08:06 PM
Friend of Wrox
 
Join Date: Sep 2003
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


 
Old September 21st, 2004, 09:05 AM
Friend of Wrox
 
Join Date: Jul 2004
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

 
Old September 21st, 2004, 08:01 PM
Friend of Wrox
 
Join Date: Sep 2003
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



 
Old September 22nd, 2004, 03:17 PM
Friend of Wrox
 
Join Date: Jun 2003
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





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





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