I'm trying to do some Javascript stuff on the second page of multiple page AJAX form but it doesn't run.
I have put custom javascript block in the beginning of second page but can't see it on the page source either.
Any suggestion?
Thanks
I have put custom javascript block in the beginning of second page but can't see it on the page source either.
Any suggestion?
Thanks
Hi Petike,
What is the JS code supposed to do ?
What is the JS code supposed to do ?
Hi,
Some DOM manipulation to use floating labels.
I put my code to the template script file which is working until I go to the second page of my form so I tried to put on yhe second page again in chronoforms custom script but doesn't work for me.
Some DOM manipulation to use floating labels.
I put my code to the template script file which is working until I go to the second page of my form so I tried to put on yhe second page again in chronoforms custom script but doesn't work for me.
Whatever functions you call to do that, you will need to call it again after the ajax reloads the content.
Can you help me how?
I tried ajax functions like ajaxComplete or ajaxSucces events as I thought inside it I can run my functin but it's not running after I going to second apge of the form.
My script works perfectly when ajax is off.
I tried ajax functions like ajaxComplete or ajaxSucces events as I thought inside it I can run my functin but it's not running after I going to second apge of the form.
My script works perfectly when ajax is off.
Place your functions in page 1, then call them in page 2 using HTML view like this:
<script>my_function();</script>the "my_function();" should be already defined in page1
That's what I tried, made a function on page 1:
const floatingLabel = () => {
//stuff to do
};
second page I tried with html block:
Uncaught ReferenceError: floatingLabel is not defined
const floatingLabel = () => {
//stuff to do
};
second page I tried with html block:
<script>floatingLabel();</script>or just simple javascript block:
floatingLabel();First page works perfectly, second page on the console:
Uncaught ReferenceError: floatingLabel is not defined
Do you have DOM Ready ticked on the first one? Because then it would only be available within that block.
Oh....that was the one. I didn't know that.
Thanks a lot
Thanks a lot
This topic is locked and no more replies can be posted.