T.oby
Forum Replies Created
-
Forum: Plugins
In reply to: [Work The Flow File Upload] multiple wtf uploads per pageHey Lynton, thanks for getting back. Good to know. We found another workaround here. Will check the list here for updates. Thanks
Forum: Plugins
In reply to: [Work The Flow File Upload] multiple wtf uploads per pageHey Lynton, I was wondering if there are any news on this.. I have a workaround that I reload the page and only show one wtf widget. But it would be great to be able to show multiple ones. Greetings, Toby
Forum: Plugins
In reply to: [Work The Flow File Upload] multiple wtf uploads per pageNo worries. Thanks for your quick answer. Good to know. It would be a great feature for us ??
Forum: Plugins
In reply to: [Work The Flow File Upload] multiple wtf uploads per pageHey Lynton, I was looking at the changelog and it looks like there are plenty of new features. Really cool. Just wondering whether you had any chance to look into the multiple workflows per page issue? Thanks, Toby
Forum: Plugins
In reply to: [Work The Flow File Upload] multiple wtf uploads per pageHi, thanks for the quick response. Ah I see a two stage workflow could do that. However in my case I would like too keep the uploads visually separated so it wouldn’t be the ideal solution for me. Such a feature in a future release would be great – at least for me ??
Thanks!
Forum: Hacks
In reply to: use jquery append functionThanks for your detailed answer. For the table example it only worked when I put the code in the file. But I did not have to do any hooks. For the other code with the button click example my code was wrong. I should have only used jQuery(“button”).click() and put the code after the button. Thanks for your help!
Forum: Hacks
In reply to: use jquery post onsubmit functionclosed ??
Forum: Hacks
In reply to: use jquery post onsubmit functionSorry about the fuss. There was actually no need to hook the script in WP it simply works like this:
<button>Click</button> <script> jQuery("button").click(function(){ alert("Hi"); }); </script>
??
Forum: Hacks
In reply to: use jquery append functionThanks! I created a file called code.js with:
jQuery("#table1 tbody").append("<tr><td>data1</td></tr>");
and called it in WP with:
<script type="text/javascript" src="/code.js"></script>
This worked and I did not have to include any enqueues in my functions.php. However doing the same for the simple click button example (use jquery post onsubmit function) this did not work. I also tried in the button click example to enqueue jquery and add a hook for the script (not sure if I did it correctly).
Thanks for your help
Forum: Hacks
In reply to: use jquery post onsubmit functionI’m now trying to get this simple button click example to work. In another post (use jquery post onsubmit) I got the hint to put the code to file and enqueue jquery in my functions.php and add an action hook in functions.php. As it was enough for the other example to put the code to file and call it via script src parameter I did the same here:
My file is code.js:
jQuery("button").click(function(){ alert("hello"); });
And my WP page looks like this:
<script type="text/javascript" src="/wp-content/themes/supernova-child/js/js-ex-click.js"></script> <button>Send</button>
I also tried using the two wrappers (as described in jQuery NoConflict Wrappers) to use $(“button”) instead of jQuery(“button”). This unfortunately did not work.
So I tried adding:
wp_enqueue_script( 'jquery');
as well as:
function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); wp_enqueue_script( 'script-name', get_template_directory_uri() . '/code.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
to my functions.php of my theme. Unfortunately this did also not help.
Thanks for any help
Forum: Hacks
In reply to: use jquery post onsubmit functionI am not sure if the click-function really helps because in WordPress even the more simple example of just putting out a “Hello” does not work:
<script> $(document).ready(function(){ $("button").click(function(){ alert("Hallo"); }); }); </script> <button">Send</button>
Forum: Hacks
In reply to: use jquery post onsubmit functionMaybe I should use the click event of a button. This works in JSFiddle (https://jsfiddle.net/H6YZL/2/) with error “NOT FOUND” but not in my WordPress:
<script> $(document).ready(function(){ $(".sendButton").click(function(){ $.post("/code.php", {"arg1": "1", "arg2": "2"}, function(response) { alert('Got this from the server: ' + response); }).done(function() { alert( "second success" ); }).fail(function(xhr, textStatus, errorThrown) { alert( textStatus ); }); }); }); </script> <button class="sendButton">Send</button>
However in the other code I at least got an empty error.
Thanks
Forum: Hacks
In reply to: use jquery post onsubmit functionSorry, I added an error function and it seems all three versions work but throw an error. Is there a way to see what the error is (I tried putting out errorThrown but it was empty)?
jQuery.post("/test6.php", {"arg1": "1", "arg2": "2"}, function(response) { alert('Got this from the server: ' + response); }).done(function() { alert( "second success" ); }).fail(function(xhr, textStatus, errorThrown) { alert( textStatus ); });
Forum: Hacks
In reply to: use jquery append functionThanks! I have tried all three versions (two wrappers and no wrapper) with the last example, which did not work. I also tried deactivating all plugins to test it.
Forum: Hacks
In reply to: use jquery post onsubmit functionSorry, I hope this was not too confusing. The code I posted above has a small error the post function without the wrapper should not have the $ sign in the beginning but just jQuery.post(). I tried all three versions inside the Do() function and outside of it. They all worked outside but not inside of it.
Thanks,
Toby