Thread: Object Expected Error!!
-
May 16th, 2011, 11:42 AM #1Junior Member
- Join Date
- May 2011
- Posts
- 1
Object Expected Error!!
Hi,
I'm trying to get the below code working... But it seems to be throwing an error when the function hitcount(fn) is called... Im trying to call an ASP function within Javascript... Can anyone please help with this :
-- Javascript code --
<script LANGUAGE="JavaScript1.2" >
function checkurl(fn)
{
str = "http://webhost.in/PNM/Book/<%=gotorpt%>/" + fn;
if (str.indexOf ("web//") > 0)
{
alert("Please Select a Month!");
}
else
{
str2 = "http://webhost.in/PNM/Book/counter.asp?choserpt=Y&whichyrmth=" + str;
hitcount(fn); -- Error occurs here : Object Expected
self.location.href = str;
}
return;
}
</script>
--ASP function --
<%
function hitcount(fn)
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "..\Hits\hitcounter.mdb" -- Database
conn.Mode = 3
set rs = Server.CreateObject("ADODB.Recordset")
set SQL = "UPDATE Application_counter SET Application_counter.[Counter] = Application_counter.Counter+1 where pdf='"+fn.substring(0,8)+"';"
rs.Open SQL,conn,1,3
document.write(rs(0))
rs.Close()
cn.Close()
end function
%>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
iTunes 6...Expected Better.
By J1mmy in forum Applications and Operating SystemsReplies: 0Last Post: November 7th, 2005, 07:03 PM -
What scores could be expected...
By matrixstylez in forum General Tech DiscussionReplies: 1Last Post: September 5th, 2005, 06:31 AM -
Error when using StrToInt method , When including the ActiveX Automation object.....
By Neelima in forum Webmastering and ProgrammingReplies: 0Last Post: November 7th, 2002, 09:25 PM -
Passing a class object variable to another object variable
By ILC in forum Webmastering and ProgrammingReplies: 1Last Post: March 1st, 2002, 02:10 AM



LinkBack URL
About LinkBacks



Reply With Quote

Remember kids, what you share to the public on your facebook can be found by anyone... someone left theirs public and I saw something that I really wish I hadn't. PRIVATE4LIFE
Is It Just Me? v233893843