arvgta / ajaxify

Ajaxify - The Ajax Plugin
https://4nf.org/
274 stars 124 forks source link

Inline scripts do not start #171

Closed wpbloger closed 4 years ago

wpbloger commented 4 years ago

Hello I use your plugin ajaxify and I have a problem, when navigating to pages, the script on the pages to which the transition is made does not start, in particular: <script type="text/javascript">alert('test');</script> This script will not work when you go to the page with it, although I have set inline parameter in true. I used the latest version for the test.

arvgta commented 4 years ago

Thanks for pointing that out!

I have made a brief test against a (German) partner site that updates the date on every page via an inline script each time, and it seems to work.

You can verify it by navigating between pages - the date(the minutes part) - displayed to the left of the search box in the main content area - is updated successfully on every change of the minute and page transition. The inline JS code is:

<script type="text/javascript">jQuery("#datum").html(gDate("de"))</script>

(the exact same tag values you are using with different contents)

The above site hotlinks to:

(the very newest, but not official version of Ajaxify)

As far as the inline parameter is concerned, the default value is true anyway, so you shouldn't really have to specify anything at all and it should work.

Don't mean to be defensive - of course there is room for error on my side - for example, I have tried to tweak / simplify JS script handling recently.

May I ask which version you are using exactly (version number / CDN etc.) ?

A link to an example test site or maybe a simple "JS fiddle" would be useful... What you could also try out as well is hotlinking to:

...and see if it makes a difference

Furthermore, if you need this to be handled discretely and thus can't supply a link to your test site, then please feel free to contact me via eMail and I promise to handle it discretely...


EDIT:

I have also made another test against the above site:

I have left that test-functionality for you to reproduce alive for the moment, for your convenience...

arvgta commented 4 years ago

Closing...