Jump to content

Can PHP open a link without the user seeing anything?


Snot

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.