I created an API.AI chat bot and used "web demo" integration of it in my html file.I mean API.AI gave me an embedded iframe, something like this:
<iframe id="ifrm" width="350" height="430" src="https://console.api.ai/api-client/demo/embedded/...."></iframe>
and I used it in my HTML file.
Now I want to get the text of <input>
tag, which is inside the above <iframe>
.
<input type="text" name="q" id="query" placeholder="Ask something...">
I've tried different ways to get this <input>
text. For example:
$('#ifrm').contents().find("#query")
but the result was "undefined"
.
Does anybody know what I should do to have the text of this input tag in my HTML file?
Thanks in advance