2

I have an web page that is a widget and has to be embedded on another website (the domain is not the same)

I tried using the iframe approach

This works but the problem is that the height of my page increases according to the height. I cannot use javascript to access the content height because the domain is different and the call is blocked due to cross site scripting.

Is there any easy solution available for this problem.

ganeshran
  • 3,512
  • 7
  • 41
  • 69
  • possible duplicate of [Resize iframe height according to content height in it](http://stackoverflow.com/questions/525992/resize-iframe-height-according-to-content-height-in-it) – Brad May 03 '13 at 14:26
  • @Brad The solution on the question assumes that the widget is hosted on the same domain which isnt true in my case. – ganeshran May 04 '13 at 00:44
  • The solutions there may be wrong, but is your question not the same? Maybe I read it wrong, but the question and problems encountered seem to imply that you have the same problem. – Brad May 04 '13 at 01:43

1 Answers1

1

one option would be to make a little mini API on the widget side.

calculate the height. and let the other webpage get that information via JASONP(which is basically cross site scripting).

heres some info about JASONP What is JSONP all about?

Community
  • 1
  • 1
swisswiss
  • 335
  • 3
  • 13