data-endpoint-container

Sets ajax endpoint from contents of a selector.

Required if you are not using data-endpoint.

The specified selector (input, div, etc) should contain a relative, absolute or full URL that points to the remote file that will be requested.

In special cases, this is sometimes useful to externalize endpoint, to use the same form with a different endpoint for example.

Usages


  • data-endpoint-container="#container_id"
  • data-endpoint-container=".some_class"

Examples


  • data-endpoint-container="#foo"
  • data-endpoint-container=".bar"

Live examples

This form looks like this:


<span id="test">./endpoint-container-span-handler.php</span>

<br/><br/>

<input
        type="button"
        value="Click me"
        class="btn domajax click"
        data-endpoint-container="#test"
        data-output="#output"
        />

<div id="output"></div>

This form looks like this:


<div id="test">./endpoint-container-div-handler.php</div>

<br/>

<input
        type="button"
        value="Click me"
        class="btn domajax click"
        data-endpoint-container="#test"
        data-output="#output"
        />

<div id="output"></div>

This form looks like this:


<input type="text" readonly id="test" value="./endpoint-container-input-handler.php"/>

<br/>

<input
        type="button"
        value="Click me"
        class="btn domajax click"
        data-endpoint-container="#test"
        data-output="#output"
        />

<div id="output"></div>

This form looks like this:


<textarea id="test">./endpoint-container-textarea-handler.php</textarea>

<br/>

<input
        type="button"
        value="Click me"
        class="btn domajax click"
        data-endpoint-container="#test"
        data-output="#output"
        />

<div id="output"></div>


See also    data-endpoint 

Table of contents

All the documentation at a glance

Domajax options

And more with domajax