Thank you.Code:<script async src="https://cse.google.com/cse.js?cx=765fafd9751a049f3"> </script> <div class="gcse-search"></div>
Thank you.Code:<script async src="https://cse.google.com/cse.js?cx=765fafd9751a049f3"> </script> <div class="gcse-search"></div>
Last edited by james438; 03-08-2023 at 02:20 AM. Reason: format
Hi there Tedah3143,
you need to have two files, the first linking to the second, like this...
- open-google-search.html
Code:<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"> <title>Open Google Search</title> <link rel="stylesheet" href="screen.css" media="screen"> </head> <body> <a href="google-search.html" target="blank">open "Google Search" in new window</a> </body> </html>- google-search.html
Code:<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"> <title>Google Search</title> </head> <body> <div class="gcse-search"></div> <script async src="https://cse.google.com/cse.js?cx=765fafd9751a049f3"></script> </body> </html>
Obviously, these are just basic files and both may have any amount of extra content.
coothead
~ the original bald headed old fart ~
To make the Google search engine code open in a new browser tab, you can add a target attribute to the anchor tag in the generated code. Here's an example:
In the above code, replace "https://www.google.com/cse?q=query" with the appropriate search URL you want to use. When someone clicks on the search button, it will open the search results in a new browser tab due to the target="_blank" attribute.Code:<script async src="https://cse.google.com/cse.js?cx=765fafd9751a049f3"></script> <div class="gcse-search"> <a href="https://www.google.com/cse?q=query" target="_blank"></a> </div>
Last edited by james438; Yesterday at 02:31 AM. Reason: format
Hi there Finacustech,
your suggested link...
...will definitely take one to a new tab but this will, unfortunately, be the result...Code:<a href="https://www.google.com/cse?q=query" target="_blank"></a>
.
https://programmablesearchengine.google.com/about/
What the O.P actually wants is to be taken to a new tab that looks like this...
I assume that you did not fully read the question.
coothead
~ the original bald headed old fart ~
Bookmarks