• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to give "src" link for iframe

I want to load a view file inside an iframe. So how can I give the path to "src" property. In codeigniter view has to be loaded through a controller


<iframe src ="view1.html" width="20%" height="300">
<p>Your browser does not support iframes.</p>

The page you load in an iframe is just the same as any other page. So you must put in the full url to that page. Same as when you would make a link to the page using "A HREF".
Off topic: I would not recommend using iframes for loading stuff from your own site. Why would you. There are better ways.

I want to show more records in a small area. Therefor I thought of putting an iframe so that user can scroll down inside the iframe to view all the records.

Please mention if there are other better ways

You can set up a div tag and style with css like:
div.records {

If content is higher than div height a scrollbar becomes visible.

Load the records in controller and pass records-data to the view
and echo inside the div-tag.

Thanx a lot dear. It works. May all ur dreams come true

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.