Welcome Guest, Not a member yet? Register   Sign In
how to give "src" link for iframe
#1

[eluser]max123[/eluser]
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

eg

Code:
<iframe src ="view1.html" width="20%" height="300">
<p>Your browser does not support iframes.</p>
&lt;/iframe&gt;
#2

[eluser]mddd[/eluser]
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.
#3

[eluser]max123[/eluser]
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
#4

[eluser]LuckyFella73[/eluser]
You can set up a div tag and style with css like:
Code:
div.records {
width:200px;
height:200px;
overflow:scroll;
}

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.
#5

[eluser]max123[/eluser]
Thanx a lot dear. It works. May all ur dreams come true




Theme © iAndrew 2016 - Forum software by © MyBB