1283 Posts
Bucklash
8 years ago
3
Topic

Hi folks

SCENARIO: I have a button on a page, which when clicked opens a modal window, in which the Seblod Form Module will be loaded...
My AJAX skills are very basic, and so hope to get a little guidance from someone. Mucking around with a custom HTML module I am able to load an entire page as shown below, but not sure how to load just a module.... Is it way too tricky?
<button id="form-button"><h1>Load Stuff</h1></button>
<script>
	jQuery(document).ready(function() {
		jQuery("#form-button").on("click", function() {
			jQuery("footer").load("index.php?option=com_cck&view=form&layout=edit&type=my_form");
		});
	}); 
		
</script>
<br>
My finished page will ideally have a few forms on it, so to have the user load them using AJAX makes the page a bit quicker and better. I can't imagine that having all the forms load straight away would be better as they might not be used all the time

 

Bucklash

Get a VIP membership
310 Posts
ricco
8 years ago
1
Level 1

Very interesting. I've gave up in the past doing it because I couldn't achieve it.

1283 Posts
Bucklash
8 years ago
0
Level 2

Hi Ricco

I'm gonna find a way, will post back with solution if I get it

Bucklash

8 years ago
0
Level 1

$('#result').load('ajax/test.html #container')  - где #container - нужный блок

Get a Book for SEBLOD