Snot Posted February 21, 2011 Share Posted February 21, 2011 I have hardware setup to preform an action on camera when i enter a url into the address bar. Pretty much you will be able to feed tarantulas. I'd like to setup a button that my user can click that will active the url without being moved off of the current page. I can't figure out how to stop the browser from following the link to a blank page. It messes the whole thing up because the feeder only runs for a second and if you get sent to the blank page and have to navigate back the the live video feed page you could miss the feeding. Thanks for the help Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted February 21, 2011 Share Posted February 21, 2011 All i can think of is AJAX, I just learned it tonight maybe have a look at jquery ajax and a tutorial i found: http://articles.sitepoint.com/article/ajax-jquery Could be what our looking for. So in a nutshell, ajax allows you to do stuff withoutleaving the page Quote Link to comment Share on other sites More sharing options...
jay7981 Posted February 21, 2011 Share Posted February 21, 2011 create a function that does what you want and make the button call that function with onclick just make the anchor # and the target _blank ex: function .......code here $feed = function(); <a href="#" onclick="$function" target="_blank">Feed Em!</a> syntaxing for this example may be off ... im giving you and idea not the code as i am really tired and have 10000000s of lines of code in my head at the moment. Quote Link to comment Share on other sites More sharing options...
Snot Posted February 21, 2011 Author Share Posted February 21, 2011 Nice. Thanks for the help guys. This will defo give me a place to start. Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.