Iframe in Moodle

Iframe in Moodle

by priya a -
Number of replies: 2

Hi All,

I want to open moodle login page in my own website with the help of iframe. I used the following code in my website to open moodle. But, it shows the attached error. Can anyone help me in this regard. 

<div class="container-fluid">

<div class="row">

<div class="embed-responsive embed-responsive-16by9">

  <iframe class="embed-responsive-item" src="172.17.16.23/login/index.php"></iframe>

</div>


Attachment 1.JPG
Average of ratings: -
In reply to priya a

Re: Iframe in Moodle

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Can you open your login page in a browser with that address? Have you tried adding https:// at the beginning?
In reply to Emma Richardson

Re: Iframe in Moodle

by priya a -

Hi Emma,

Thanks for your reply. I got it with the following code:

<div class="container-fluid">
<div class="row">
<div class="col-lg-6 col-md-6 col-12">
<iframe src="http://localhost/login/index.php" style="border:0px #ffffff none;" name="myiFrame" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="400px" width="600px" allowfullscreen></iframe>