Hi, have a small script with jquery and SPServices and it works very well inside a html-Webpart. the problem is that it always starts automatically and I would like to start it over some link or button. Like normal button inside the Wiki Page , inside HTML. I have tried a few options but none of them works.
<script type="text/javascript" src="...../jquery-1.8.3.min.js"></script><script type="text/javascript"> $(function () {var query = "<Query></Query>"; $().SPServices({ operation: "GetListItems", listName: "Teilnehmerinen", async: false, CAMLQuery: query, completefunc: function (xData, status) {if($(xData.responseXML).find("z\\:row").length <= '1') { $(window.location).href('href', 'http://www.google.com'); }else { $(window.location).href('href', 'http://www.google.de'); }; } }); });</script>