JavaScript zipcode checker with iframe in combination with Javascript

I have a problem with my site, it's based on Joomla 2.5.16 I will try to explain my problem as good as possible.

On my site i have a zipcode checker, were people can check the availability of fiber to the home. The zipcode checker works with a iframe, in combination with a javascript code that i put in the header.

The Javascript code determines the height of the iframe. as you can see at www.nederlandkiestvoorglasvezel.nl/glasvezel-vergelijken the height of the iframe is wrong. it seems like something be overwritten the javascriptcode.

Cause when i test the iframe and the javascriptcode outside Joomla, de zipcode checker works fine. you can see it here: http://www.nederlandkiestvoorglasvezel.nl/iframeTest.htm

However, seem to have received to be erroneous data, yet overwritten the same code in your Joomla site the correct value, I see no reason after another everything after passing the following: Parent reveived message!: 440

So I hope someone can tell whats the problem, i have tried several opties and got help from my hosting but we can't fix it.

Regards,

Rutger

Answer:1

I hope it's as silly as this. Look at the height you've set in the iframe with something like firebug. You'll notice that the height property is set to {"s":"__cb","f":"oauth2relay368429625","c":0,"a":[40,false],"t":"852486603","l":false,"g":true,"r":"oauth2relay368429625"}px.

You should probably fix that, and then it'll work :)

Edit - more details. This chunk of code is causing it:

// Listen to message from child window
eventer(messageEvent,function(e) {
console.log('parent received message!: ',e.data);
document.getElementById('internetdealerframe').height = e.data + 'px';
},false); 

Since you're passing around more than just a number, the entire string is being used as a height.

Edit #2

It doesn't look like you're actually passing a valid height anywhere in those postMessage calls - The first one that has any kind of 'height' in it contains the following: !_{"s":"/I0_1387279282212::_renderstart","f":"I0_1387279282212","r":"I0_1387279282212","t":"24007401","a":[{"height":20,"width":90,"title":"+1"}],"g":false}. And I'm thinking that you don't actually want the iframe to be 20 pixels high.

Answer:2

I'm using the following filter to remove accents from the word inputed by the user on an input field, and then use the resulting string on the filter. .filter('removeAcentos', function(){ ...

I'm using the following filter to remove accents from the word inputed by the user on an input field, and then use the resulting string on the filter. .filter('removeAcentos', function(){ ...

  1. angularjs filter remove item from array
  2. angular filter remove duplicates
  3. angular filter remove spaces
  4. angular filter remove leading zeros
  5. angular filter remove html tags
  6. angular filter remove
  7. angular filter remove decimal
  8. angular filter remove underscore
  9. angular filter remove characters
  10. angular 6 filter remove item from array
  11. angular number filter remove comma
  12. angularjs remove filter
  13. angular kendo grid filter remove

I am trying to remove elements of an array which contains either Groups(containing shapes) or simply Shapes(line, Rect, Circle etc) as its elements. My function is something like below: ...

I am trying to remove elements of an array which contains either Groups(containing shapes) or simply Shapes(line, Rect, Circle etc) as its elements. My function is something like below: ...

I'm assuming I'm doing something really dumb here. I basically have an array that I'm passing into a function. I want to remove an element of that array and do a bunch of stuff to it, and then iterate ...

I'm assuming I'm doing something really dumb here. I basically have an array that I'm passing into a function. I want to remove an element of that array and do a bunch of stuff to it, and then iterate ...

  1. using array shift
  2. using memcpy to shift array

I am building a script that calculates the genetics of animals that are bred together. Each animal has a set of genes (e.g. BbEeKk) and the program should calculate all the genetic possibilities of ...

I am building a script that calculates the genetics of animals that are bred together. Each animal has a set of genes (e.g. BbEeKk) and the program should calculate all the genetic possibilities of ...

  1. polynomial equations using linked list
  2. polynomial equations in hindi
  3. polynomial equations by factoring
  4. polynomial equations in factored form
  5. polynomial equations in real life
  6. polynomial equations with the highest exponent of x as 2
  7. polynomial equations in factored form calculator
  8. polynomial equations in tamil
  9. polynomial equations in excel
  10. polynomial equations with answers
  11. polynomial equations in matlab
  12. polynomial equations with real coefficients
  13. polynomial equations with complex roots
  14. polynomial equations in c
  15. polynomial equations by factoring calculator
  16. polynomial equations with fractions
  17. polynomial equations in data structure
  18. polynomial equations with complex solutions
  19. polynomial equations in r
  20. polynomial equations in one variable