Brian7398274
Posts: 0
Joined: Mon Feb 23, 2015 9:32 pm

HTML linking to Javascript file

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

HTML linking to Javascript file

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.

Brian7398274
Posts: 0
Joined: Mon Feb 23, 2015 9:32 pm

HTML linking to Javascript file

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

HTML linking to Javascript file

Hi Brian,

Please use original provided src to see test.

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

Regards.

Brian7398274
Posts: 0
Joined: Mon Feb 23, 2015 9:32 pm

HTML linking to Javascript file

Thanks

Return to “Issues”