Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Share Code with other Web site
- From: paul at juniperwebcraft.com (Paul Novitski)
- Subject: [Javascript] Share Code with other Web site
- Date: Sat Sep 23 16:09:47 2006
At 9/23/2006 11:51 AM, coldfusion.developer@xxxxxxx wrote: >I'm a newbie to Javasript and was looking for an example of how to use >JavaScript to share your HTML with other Web sites. So I would want >to give them a link to a javascript on my web site that they would copy >and paste on their web site. I don't want these users to be able to edit >the ode that this scrit displays on this web site. Much like the the way >that google's ad sense works. ... >The other question is, I will be dynamically generating and passing >parameters >into this javacode that will be just for this user. From your description, it sounds to me as though JavaScript by itself might not be the right choice, but instead a combination of JavaScript and a server-side scripting language such as PHP. You can't give JavaScript to someone but prevent them from editing it. You can go to a great deal of effort to obfuscate the script, but unobfuscating it is child's play and your time will be better spent on other aspects of your work. A server-side script, in contrast, can provide results to the user while remaining completely inaccessible to them as script. Using PHP, you can give someone a simple url such as http://example.com/clientcontent/?id=1123456890 which will resolve to anything you want -- an image, text, or HTML markup. An iframe or XMLHttpRequest on the client's website can then incorporate that content into their page. You might try googling XMLHttpRequest and Ajax to see JavaScript's role in such a collaboration. Regards, Paul
- References:
- [Javascript] Share Code with other Web site
- From: coldfusion.developer@xxxxxxx
- [Javascript] Share Code with other Web site
- Prev by Date: [Javascript] Share Code with other Web site
- Next by Date: [Javascript] Share Code with other Web site
- Previous by thread: [Javascript] Share Code with other Web site
- Next by thread: [Javascript] Share Code with other Web site
- Index(es):