Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
prashanth charl
9
Views
3
Comments
refering external javascript libraries
Question
Hi,
I am trying to call an external javascirpt library located in my local drive using a web block widget by setting the below script in value property of web block using expressions and adding this web block into my webscreen.In webscreen i am setting extended properties name1=onload and value1="MyJavaScriptFunction();" where MyJavaScriptFunction(); is a function exists in external library.But i am not able to get the alert when my webscreen loads.Is there anything wrong i am doing?
"<html><body><script type='text/javascript' src='E:\SupportScripts\abc.js'></script></body></html>"
External library: abc.js
function MyJavaScriptFunction()
{
alert("Hello");
}
Thanks,
Prashanth
J.
MVP
You are trying to access a network-share.
you should have something like "https://somedomain/SuuportScripts.abc.js"
For example you add the the js as a resource to the espace. then you should be able to reference it easy.
João Rosado
Staff
Hi Prashanth,
For security reasons most recent browsers won't allow you to access anything in the local harddrive.
You need to either host it somewhere, or add it as resource in your eSpace (and preferentially as a weblock javascript, so you only need to add the javascript to your page, instead of doing unescaped expressions).
Regards,
João Rosado
Ricardo Araújo
Guys,
read
how to integrate a jquery plugin in outsystems platform
Ricardo
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...