Skip to main content
Known Participant
July 5, 2024
Question

Javascript onClick command to open CTRL-F

  • July 5, 2024
  • 1 reply
  • 970 views

Hello 

 

Im looking to add javascript to a onclick in the azure blue output.  What im looking to do is add a button to the output that will open the CTRL-F in the browser, is this possible?  

    This topic has been closed for replies.

    1 reply

    Peter Grainge
    Community Expert
    Community Expert
    July 6, 2024

    Anything that simulates keyboard action would break every security rule in the book.

     

    ChatGPT gives this answer.

    JavaScript itself cannot directly simulate a CTRL+F action (the browser's "Find" functionality) due to browser security restrictions that prevent scripts from interfering with or mimicking user input for security and usability reasons.

     

    It goes on to give an example of how you can create a simple search functionality using JavaScript but it looks like a lot of work in every topic.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Known Participant
    July 8, 2024

    Figured that might be the case, thanks for info Peter!