11-10-2022, 06:48 PM
(11-10-2022, 04:31 PM)Pete Wrote: Okay, that produces about 300 lines of JavaScript with several functions. It looks like instead of working with the form elements, it replaces them. So what's next for embedding it my HTLM doc? Wouldn't I need to strip out all the JavaScript functions, enclose them in <SCRIPT></SCRIPT> tags and then there would be the whole process of figuring out a way to call it. If concepts like this could be integrated directly into an HTML doc, that means use over the Internet is achieved.
+2 for the example code, as it looks like it totally handles the mechanics.
Pete
I'd consider the security implications of embedding anybody else's javascript in your website/whatever.
It isn't so much about the potential for the author(s) of that javascript having bad intentions (although that can happen), but the potential for mistakes to get into that code, for some of that code coming from who knows where as it got pasted in for expediency, or whatever.
I'd suggest that you isolate all code that isn't yours by displaying it within an iframe.
Browsers are secure to the point of being annoying sometimes, but it is a good thing. It all falls flat when you introduce into it code that is too big to personally and closely scrutinise before letting it intermingle with your stuff.
Might not matter any for what you are doing, but still worth keeping in mind for those cases in which "sure you can do that, but just because you can doesn't mean you should" moments ...