NetTalk Central

Author Topic: Re: Beginner's question: "Error in site JavaScript"  (Read 2341 times)

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« on: April 15, 2014, 04:35:55 AM »
Using C9 10376 and Nettalk 8.07 and still getting error in site javascript
Anyone help please?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Beginner's question: "Error in site JavaScript"
« Reply #1 on: April 15, 2014, 11:38:23 PM »
Hi Mike,

I've moved this into a new thread because it'll be unrelated to the earlier thread, which was caused by a bug.

If you are getting this error, then the first thing to check is if there is indeed a JavaScript error. Open firebug (www.getfirebug.com) extension in FireFox, and then open the Console window.
Then load the page and see if any errors appear.
report back what happens, and we can then go from there to which way to attack the problem.

Cheers
Bruce

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« Reply #2 on: April 17, 2014, 05:50:17 AM »
Three errors show up in console mode.
See attached.


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Beginner's question: "Error in site JavaScript"
« Reply #3 on: April 17, 2014, 11:46:43 PM »
it looks like you haven't deployed the web folder.
If you right-click on the page in the browser and choose "view source" then you'll be able to see links to all the .js (JavaScript) and .css (Style Sheet) files. If you click on a link, and it replies with "file not found" then you haven't deployed the web folder.

If you are just running the app directly from where you are compiling it, then the web folder should be copied into your application folder automatically. (Unless you've really fiddled with your RED settings or something.)

Cheers
Bruce

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« Reply #4 on: April 18, 2014, 02:58:06 AM »
Hi Bruce
Fiddled with nothing.
Installed Nettalk and opened examples.
Can see Web Folder created with all sub-folders but have no contents.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Beginner's question: "Error in site JavaScript"
« Reply #5 on: April 18, 2014, 10:32:12 PM »
the "source" of the web folder is in
\clarion9\accessory\libsrc\win\netweb

in your application folder is a file
copyall.bat

check the contents of that file to make sure both locations are correct. If they are run the file manually to see if it works. (If it doesn't work, then paste the reason here - is it location? syntax, or whatever?)

you can copy the folder manually of course, but that's not an ideal long term solution.

cheers
Bruce

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« Reply #6 on: April 22, 2014, 03:46:41 AM »
My DOS is a bit rusty but I changed copyall.bat from:
xcopy /C /Y /E "C:\Program Files\SoftVelocity\Clarion9\accessory\libsrc\win\netweb\web\*.*" web\*
to:
c:\windows\system32\xcopy /C /Y /E "C:\Program Files\SoftVelocity\Clarion9\accessory\libsrc\win\netweb\web\*.*" web\*
This gave me all web subfolders and their contents

Then I recompiled and ran the app again and "Error in site JavaScript" was gone and only left with the attached error.

Thanks
Mike

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Beginner's question: "Error in site JavaScript"
« Reply #7 on: April 22, 2014, 04:16:40 AM »
what JavaScript file are you including there? dops something? I'm not familiar with it, and it's not part of nettalk.

Presumably c:\windows\system32 is not in your system Path?

cheers
Bruce

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« Reply #8 on: April 22, 2014, 10:56:56 PM »
Hi Bruce
Sorry to be a nuisance.
Reinstalled Firefox, Clarion9 and updated to Nettalk 8.09
Run all again and dops reappears but app works.
Only problem is image files path not seemed to be resolved, e.g.:

<img width="64" height="64" border="0" src="images/money64.png">

I have attached HTML file and highlighted dops line - maybe FireFox?

Thanks
Mike

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Beginner's question: "Error in site JavaScript"
« Reply #9 on: April 23, 2014, 03:01:01 AM »
I'm guessing the images are just missing from that example. That happens from time to time when I clean out the example folders. Don't worry about it.

did you add the Dops script to the WebServer procedure in your app?

cheers
Bruce

MikeVeldsman

  • Newbie
  • *
  • Posts: 6
  • Trying to retire
    • View Profile
    • Email
Re: Beginner's question: "Error in site JavaScript"
« Reply #10 on: April 23, 2014, 03:40:07 AM »
Ok images sorted just naming is different

Added no script at all.
Tested with Chrome as well and dops script pops up there too.

Tks
Mike