AJAX only allows connection to the same server that hosts the page it is on and this script WILL NOT provide access to another server. Again, when not accessing the WordPress site, for example you’re just going to set a SESSION value or something of that nature, you can provide the path to your own script. I will say that if you are going to access anything about your WordPress site that you should do it properly. However, I know that not everyone does it this way and it is not always necessary to go through the WordPress AJAX script. This is the way you are supposed to handle AJAX requests in WP, you can read more about that in the link I referenced above. The defualt value for this argument is the path to the file admin‑ajax.php on your site.
Url (string)(optional) This would be the URL for the path of the server side PHP script that will handle the AJAX request.
In version 1.1.0 the JS code was changed and it no longer matters what order the debug parameter is included in the arguments list. For more information on this see the Advanced Debugging and Testing section.) Prior to version 1.1.0 debug needed to be the first parameter in the arguments. The default value is false (actually, the defualt value is set in the php file for this script, but unless you change it there the default is false. You can turn on debugging that will display errors encountered by Blunt AJAX. In your javascript code you call Blunt AJAX something like this:ĭebug: (boolean)(optional) Should Debugging be turned on. Here is an example bit of code that enqueues a script and causes the Blunt Ajax script to load:
The handle of the Blunt Ajax script is “blunt‑ajax”. You must write the JavaScript code to call Blunt AJAX and also the callback function to react to the server response if you wish to do more than what the default callback function can do which is to either put the response into the inner HTML of some element or to show the response in a JavaScript alert message. Blunt AJAX has no facility outside of a simple default callback function to deal with the response. The sole purpose of Blunt AJAX is to make an http request and relay the response to a callback function. This promotes the proper way to do it and clean coding standards. The main thing that this means is that in order to use Blunt AJAX you must use one of these built in WordPress functions to include your own scirpts. You tell WordPress that you need the script by including the script handle as one of the scripts that your script depends on when you register or enqueue your script. It simply registers the script so that it is available to be included when you need it. This plugin does not automatically add the Blunt AJAX script to every page of your site. Submit a support request here or on GitHubįor more information about AJAX in WordPress see the WordPress Codex, the best information can be found on the AJAX in Plugins page. I am open to suggestions for improvement of this plugin. I like my scripts small and to the point. This is an adaptation of an AJAX script that I’ve been using and updating since around 2007. This script is for developers like myself that don’t want to load some monolithic JavaScript framework just to do a bit of AJAX.ĭocument for developers for use of this plugin can be found on the Other Notes page. Use the settings to change the appearance
If you use bulletproof security pro (BPS Plugin) and you encounter a 403 Forbidden Error Page then please follow the following solution:Ī new button appears in the editor toolbar. You can also enable a transparant background. If you want a custom size use for example: 900px by 600px If you want the viewer to be fullscreen use 100% (% required after number) The values in the settings page are the default values. You can autostart the viewer by using the following shortcode:Ĭhange the setting from 0 (off) to 1 (on) Marmoset shortcode options: Autostart & Disable UI Please visit this page for a complete demo: Marmoset Viewer Plugin works with Toolbag 2, Toolbag 3 and Toolbag 4. Marmoset Viewer faithfully reproduces Toolbag’s famous look and features for top notch render quality. Physically accurate rendering coupled with image-based lighting and advanced shaders delivers a 3D web experience second to none. Bring your Marmoset Toolbag scenes to life in interactive 3D for all to see! Marmoset pushed the boundaries to deliver cutting edge 3D rendering to the web and mobile devices. Allows you to embed Marmoset Toolbag mview files, allowing people to view your models in all their glory