Since I'm not very familiar with JavaScript, I need a little help.
I have a simple form with 1 heading line, 1 search button, 1 description field and the submit button.
<form action="test_form.php" method="get" id="test_form1">
Überschrift: <input name="label" id="label" type="text" /> <input name="google" type="button" value="google" /><br />
Beschreibung: <textarea id="description" name="description" rows="5" cols="33">Beschreibung eingeben</textarea><br />
</form>
<button type="submit" form="test_form1" value="Submit">Eintragen</button>
If I enter something in the heading line and click the google button, the Google page should open in a new tab and the text from the heading line should automatically be appended to the link as a search parameter.
E.g. in the heading line "animated images" is then when you click on the Google button a new tab should open with the URL "https://www.google.com/search?q=animated+Images".
If it does not appear in the headline, when you click Google, the Google page should just open in a new tab ("https://www.google.com").
The whole thing should happen without submitting the actual form.