Page 1 of 1

HTML linking to Javascript file

Posted: Fri May 01, 2015 6:02 pm
by Brian7398274

How do I link a JavaScript file to me HTML component?
Out side if Appery I would use

script language="javascript" type="text/javascript" src="javaScript1.js"</script

where my Js file name is javaScript, outside of Appery it works fine once I place my HTML code in the HTML component and my JS code in the Javascript file is stops working.


HTML linking to Javascript file

Posted: Mon May 04, 2015 12:43 am
by Yurii Orishchuk

Hi Brian,

I tried it and it works as expected.

You can try following HTML code(put it in the HTML component) to see log in console:
Details: http://prntscr.com/719eag/direct

precode

<script language="javascript" type="text/javascript" src="http:&#47;&#47;appery&#46;io/app/view/93534752-d9f7-46fc-86cf-c2c20637cda4/files/js/test&#46;js"></script>

/code/pre

Regards.


HTML linking to Javascript file

Posted: Mon May 04, 2015 12:49 pm
by Brian7398274

I added the link to the HTML and I changed the src to my url but when i run it the browser tells me the page was not found.

here is my link:

The app is called Calculator_IRR

I have shared it with you.


HTML linking to Javascript file

Posted: Fri May 08, 2015 2:13 am
by Yurii Orishchuk

Hi Brian,

Please use original provided src to see test.

If script loads correctly it should type in console "file loaded".

Regards.


HTML linking to Javascript file

Posted: Fri May 08, 2015 7:33 pm
by Brian7398274

Thanks