I am building a suiteapp with SDF In my app i have...
# sdf
d
I am building a suiteapp with SDF In my app i have normal html form that uses a JavaScript file on submit form, when i click submit i get an error of 'Failed to load resource: the server responded with a status of 404 ()' - the html file cant get the JS file. the patch i use is
Copy code
/Web Site Hosting Files/testapp.com.dnven/js/test.js
its never finds the JS file, I went to the file details i checked "available without login" but still not working
a
when you say a "normal" HTML form? you mean its raw html that you're serving as opposed to something generated from a suitelet using suitescript? or ... ?
how are you using that path? is it in
<script>
tags in your HTML?
d
this is example how i use the path <script src="/Web Site Hosting Files/testapp.com.dnven/js/test.js"></script>
a
ok but where does you normal html file live?
if you've already checked available without login then there should be a full URL on the file page
if you use that in your
src=
you should be good
you don't have to worry about relative paths
on the file page its labelled as URL
d
the html is one folder above the js file project folder test.html js test.js
a
are any of those folders Web Site Hosting Files?
regardless if you do what I said the folder structure ceases to matter, you dont have to use a relative path, you have a url for your js file
d
i did what you said but still its cant find my js file its in web site hosting files > project > js > file i also tried to put it in the same folder of the html and still its not finding it