adds angular code to post to server and FF code to trigger image activity