+ 3

Iframe by Url of Text Box(like browsers)

At Top There should be Input Type text, below there should be iframe, When we enter url above, Webpage should be loaded in below iframe like native browsers.

16th Nov 2017, 6:50 PM
KM Sanjay
KM Sanjay - avatar
13 Answers
+ 5
@Sanjay Okay perfect. If you already know JS and those other things, then you should be able to read through jQuery fairly quick and I believe you'll love using it over Javascript in most situations. Vanilla JS solution: var theTextBox = document.getElementById("yourTextBox"); var theFrame = document.getElementById('yourFrame'); theFrame.src = theTextBox.value;
16th Nov 2017, 7:15 PM
AgentSmith
+ 5
@John Agreed completely. That's how I am also, and prefer to understand the different angles to the best of my ability. I think I may be getting a little soft with my advice here. lol Most people want instant gratification.
16th Nov 2017, 7:21 PM
AgentSmith
+ 4
jQuery: $("#yourFrame").attr("src", $('#yourTextBox').val());
16th Nov 2017, 6:57 PM
AgentSmith
+ 4
@John Yeah, I'm realizing that after he responded back and I checked his profile. I supplied him with the links to both of those courses and explained to him that what I posted was jQuery. As for HTML only, it's not possible to do that after the page has loaded already. That's why Javascript and such things are insanely useful for manipulating things after the page has already loaded.
16th Nov 2017, 7:09 PM
AgentSmith
+ 4
thank you it may be helpful for Me,
16th Nov 2017, 7:15 PM
KM Sanjay
KM Sanjay - avatar
+ 3
i have no idea plz Reply with detailed answer
16th Nov 2017, 6:58 PM
KM Sanjay
KM Sanjay - avatar
+ 3
https://www.sololearn.com/Course/JavaScript/ https://www.sololearn.com/Course/jQuery/ ^Read up on those. The example I gave you is jQuery, but I highly recommend reading through both of those so you understand best.
16th Nov 2017, 7:07 PM
AgentSmith
+ 3
i know CSS JavaScript Well & I have my Own Android App which is created using HTML,CSS , JavaScript.
16th Nov 2017, 7:11 PM
KM Sanjay
KM Sanjay - avatar
+ 2
JavaScript CSs And Html i know
16th Nov 2017, 7:09 PM
KM Sanjay
KM Sanjay - avatar
+ 2
@Netkos Depends on what level of understanding you are going for. I'm letting it confuse me cause I'm also reading the macro source file to see how.
16th Nov 2017, 7:16 PM
John Wells
John Wells - avatar
+ 1
@Netkos he hasn't started JS class and you're giving jQuery to him. The real question is there a HTML only answer for him. Not to my knowledge, but I'm still learning it and loading other documents hasn't been my priority. I could do it using JS. Can you do a HTML only answer?
16th Nov 2017, 7:06 PM
John Wells
John Wells - avatar
+ 1
I just did a similar img load for someone else today. https://code.sololearn.com/W1hhuR5fGR6O/?ref=app
16th Nov 2017, 7:10 PM
John Wells
John Wells - avatar
0
<html><body> <script> var theTextBox=document.getElementById("yourTextBox"); var theFrame=document.getElementById('yourFrame'); theFrame.src = theTextBox.value; </script> <input id="yourTextBox" type="text" class=input_mid placeholder="Enter" value="" name="q" size="20"></input> <iframe id="yourFrame" allowfullscreen="allowfullscreen" frameborder="0"></iframe> </body></html> 👆👆👆👆👆please Tell What Should Be done To make this Work
17th Nov 2017, 6:11 AM
KM Sanjay
KM Sanjay - avatar