I have to upload image to server by local or through google image search.
For google image search, when the radio button is selected a new window to google images is opened. However, when I search for required image and select the image it should return the selected image URL to the main page, and it does not appear to be working.
Below is the code that I have used which appears to be insufficient.
<FORM ENCTYPE="multipart/form-data" ACTION="action.php" METHOD=POST>
<input value="1" type="radio" name="select" id="select" onClick="displayForm(this)"></input>Local browsing
<br>
<input value="2" type="radio" name="select" id="select" onClick="window.open('https://images.google.com/')"></input>Google Image Search
<br>
<input type="text" name = "url">
</form>
Can someone explain what is needed to be added to this to make it work?
you only open google page but can't get any src back , i suggest you can input a text-input in the html , when he choose the image need write the url in you text-input , i do it like that!
hope to help you!