k102
k102

Reputation: 8079

wrap over iframe

I've got an iframe and input field with suggest in it. The list of suggested items is created in js with follows params:

{
  borderRadius : '2px',
  boxShadow : '3px 4px 8px #DDDDDD',
  background : '#fff',
  border : '#aaa 1px solid',
  fontSize : '12px',
  padding : '2px',
  textAlign : 'left',
  position : 'absolute'
}

And it works fine while the list is not too long: now i see something like shown on the picture: iframe Suggest list is longer than iframe.

So the question is: how can i make this list to appear over the iframe?

Upvotes: 2

Views: 191

Answers (2)

Exor
Exor

Reputation: 402

An iframe is like an embedded window, everything in it is displayed inside it. A workaround will be like specify a definite height for the list and add overflow property in it, so that the list will be displayed inside the iframe but will have a scroll bar.

Upvotes: 1

Karlth
Karlth

Reputation: 3275

You can't.

What you can do is to inject the contents of the iframe file into the main page. Take a look at this: http://api.jquery.com/load/ It will only work though if the pages are in the same domain. Then just put a div instead of the iframe and .load into it.

Upvotes: 1

Related Questions