Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Could not find any tbfunction_ functions in the file

2 views
Skip to first unread message

Philip Ely

unread,
Nov 25, 2009, 10:19:53 AM11/25/09
to
Hello,

I've been trying to import a javascript file into my DHTML book via Object /
Properties for book / Web / Import... but when I select the file I get the
following message:
'Could not find any tbfunction_ functions in the file
C:\CPLe-learning\____DHTML\convct.js'

The file is saved in the same folder as the book and bears the extension .js
.

To keep things simple, the script contains only the following (minus the
dotted lines:

---------------------------------
function tbfunction_hello()
{
alert('hello');
}
---------------------------------

I've tried opening the same file from a simpler path (just in case that was
the problem) but to no avail, still the same message.

For info I'm using:
Toolbook version 2004 SP3
Windows Vista Pro

Many thanks if you can help me.

Best regards,

Philip Ely

P.S. As an added incentive, if you CAN help me, I'll give you the rights to
use the script above ;-D

Peter Jackson

unread,
Nov 25, 2009, 4:03:15 PM11/25/09
to
G'day Philip,
OpenScript is used when parsing a JavaScript file to find all of the
appropriate functions so it's a good idea to make it easy for ToolBook to
find your functions, try the following format:

function tbfunction_hello(){
alert('hello');
}

HTH
Regards, Peter
www.ToolBookDeveloper.com

Philip Ely

unread,
Nov 26, 2009, 9:15:59 AM11/26/09
to
Hello Peter,

Thanks a lot for your reply.

In fact I've just discovered why Toolbook was snubbing my javascripts:

I originally edited them using Notepad and saved them as *.js, totally
ignoring what was selected in the "Coding" drop-down list which, by default,
was "UTF-8".

By saving the files with "ANSI" coding instead of "UTF-8", they now work
perfectly.

So basically I had overlooked the fact that even "plain" text has its
dialects!

Best regards,

Philip

--------------------------------------------------
From: "Peter Jackson" <pjac...@BIGPOND.NET.AU>
Sent: Wednesday, November 25, 2009 10:01 PM
To: <tool...@LISTSERV.PLATTECANYON.COM>
Subject: Re: Could not find any tbfunction_ functions in the file

0 new messages