No action on website

Just starting out? Need help? Post your questions and find answers here.
drahneir
Posts: 11
Joined: Wed Feb 17, 2016 3:40 pm

No action on website

Post by drahneir »

Hello,

i have written a tiny application.

Code: Select all

EnableExplicit
Global Number

Procedure ButtonHandler()
  Number + 1
  SetGadgetText(2, Str(Number))
EndProcedure
  
OpenWindow(0, 0, 0, 150, 30, "Click test", #PB_Window_BorderLess | #PB_Window_ScreenCentered)
  ButtonGadget(1, 0, 0, 100, 30, "Gefällt mir")
  TextGadget(2, 100, 0, 50, 30, "0", #PB_Text_Center | #PB_Text_Border)
BindGadgetEvent(1, @ButtonHandler())
When I run it in the IDE, it behaves like expected.
I have loded the HTML file on my website, but the gadgets do not appear.

This is the HTML code:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<script type="text/javascript">var spider = {}; spider.nbModules = 0; spider.nbLoadedModules = 0;</script>

<script type="text/javascript" data-main="/spiderbasic/libraries/javascript/main.js" src="/spiderbasic/libraries/javascript/require.js"></script>
<script type="text/javascript" src="/spiderbasic/libraries/javascript/library.js"></script>
<script type="text/javascript" src="/spiderbasic/libraries/javascript/debug.js"></script>
<script type="text/javascript">var dojoConfig = { locale: 'en', async: 1 }; </script>
<link rel="stylesheet" href="/spiderbasic/libraries/javascript/dijit/themes/flat/flat.css" />
<link rel="stylesheet" href="/spiderbasic/libraries/javascript/dgrid/css/dgrid.css" />
<link rel="stylesheet" href="/spiderbasic/libraries/javascript/cbtree/icons/cbtreeIcons.css" />
<link rel="stylesheet" href="/spiderbasic/libraries/javascript/cbtree/icons/fileIconsMS.css" />
<script type="text/javascript" src="/spiderbasic/libraries/javascript/xdate.dev.js"></script>
<script type="text/javascript" src="/spiderbasic/libraries/javascript/canvas-toBlob.js"></script>
<script type="text/javascript" src="/spiderbasic/libraries/javascript/FileSaver.js"></script>
<link rel="stylesheet" title="Default" href="/spiderbasic/libraries/javascript/themes/flat/window.css" type="text/css"/>
<script type="text/javascript" src="/users/rl/documents/sb/like.js"></script>

<link rel="icon" type="image/png" href=""/>

</head>

<body class="flat" id="spiderbody">

</body>
</html>

Can anybody explain why it is not working?

Regards
falsam
Posts: 286
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: No action on website

Post by falsam »

Hello drahneir.

Hard to say without seeing. your website is local or public? Do you have a link?

On your website, as you look if you have an error in the browser console? (F12 with Chrome)

Have you used the export mode to produce your website?

➽ Windows 11 - jdk-11.0.2 - SB 3.00 - Android 15
https://falsam.com

Sorry for my poor english
drahneir
Posts: 11
Joined: Wed Feb 17, 2016 3:40 pm

Re: No action on website

Post by drahneir »

Hello falsam,

thanks for your reply.
My website is public, the url is dk1io.darc.de.
The app should be on site Test.
My browser (Firefox) doesn't show any error.
I use homepagemaker to build the website and have inserted the html code in the appropriate file
and exported it.
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: No action on website

Post by Fred »

Your main script is '/users/rl/documents/sb/like.js', which won't work, how do you exported your project ? Did you use relative path ?
drahneir
Posts: 11
Joined: Wed Feb 17, 2016 3:40 pm

Re: No action on website

Post by drahneir »

Hello Fred,

I suspected that the reference to the script file would be the cause.
I used the export function of homepage maker for uploading the project.
What is the correct reference to the script file?
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: No action on website

Post by Fred »

what is homepage maker ?
drahneir
Posts: 11
Joined: Wed Feb 17, 2016 3:40 pm

Re: No action on website

Post by drahneir »

Homepage maker ultimate 10 is a program that allows you to build your own homepage.
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: No action on website

Post by Fred »

How do you exported the SB project ?
drahneir
Posts: 11
Joined: Wed Feb 17, 2016 3:40 pm

Re: No action on website

Post by drahneir »

In homepage maker I create a page and insert there the html code. Then the whole project is uploaded.
But I don't know what to do with the Javascript file.
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: No action on website

Post by Fred »

I mean, how do you exported the SB project from the SpiderBasic IDE ? Did you fill the 'Export' panel in the Compiler/Options window ?
Post Reply