AJAX call externally
I've seen some sites that do the following:
<a href="example.php" onclick="ajax_functionname(parameter)">Example</a>
Which then that function calls an external file and does what it's suppose to do.
I'm currently using jQuery and every example is done inline. Which means people can view the source, how it functions, what page gets requested, and most importantly it means I have to go to every page with that same function and edit it page by page.
For example, in one of my pages I do this:
How can I accomplish using this style instead?
To use an external file use the script tag with the src attribute - this will allow you to share js functions between pages.
However, people can still view your external js file!
|All times are GMT. The time now is 02:03 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0