Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behaviour #236

Closed
braguzz opened this issue Aug 6, 2015 · 11 comments
Closed

strange behaviour #236

braguzz opened this issue Aug 6, 2015 · 11 comments

Comments

@braguzz
Copy link

braguzz commented Aug 6, 2015

I got this error

Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin '' in a call to 'postMessage'.

I use your amazing script in

http://www.provincia.livorno.it/altri/amministrazione-trasparente/organizzazione/organi-di-indirizzo-politico-amministrativo-dal-13-ottobre-2014/

@davidjbradshaw
Copy link
Owner

That's strange, can you put the uncompressed version on the script, so I can take a look.

Are you setting targetOrigin?

@braguzz
Copy link
Author

braguzz commented Aug 6, 2015

done.

no targetorigin setted

2015-08-06 17:12 GMT+02:00 David J. Bradshaw [email protected]:

That's strange, can you put the uncompressed version on the script, so I
can take a look.

Are you setting targetOrigin?


Reply to this email directly or view it on GitHub
#236 (comment)
.

@davidjbradshaw
Copy link
Owner

You page is creating an iframe with src="" in it. This has a different ID each time I load the page. Try the dev branch version which should now cope with that.

@braguzz
Copy link
Author

braguzz commented Aug 7, 2015

no errors with dev version.
thanks

but probably now I misanderstood know how the script works.

look at my page.
when the page for example is resized to 1024x768 , the target fram is too wide, and I'd like to see scrolling panel for the widht.

I want too much?

thanks again,
PB

@davidjbradshaw
Copy link
Owner

Set the min width and scrolling options.

@braguzz
Copy link
Author

braguzz commented Aug 7, 2015

I have setted in this way but it doesnt work

iFrameResize({
log : false, // Enable console logging
enablePublicMethods : true, // Enable methods within
iframe hosted page
inPageLinks : true,
scrolling : true,
minWidth :600,
//heightCalculationMethod : lowestElement,
//widthCalculationMethod : leftMostElement,
resizedCallback : function(messageData){ // Callback fn when resize
is received
$('p#callback').html(
'Frame ID: ' + messageData.iframe.id +
' Height: ' + messageData.height +
' Width: ' + messageData.width +
' Event type: ' + messageData.type
);
},
messageCallback : function(messageData){ // Callback fn when
message is received
$('p#callback').html(
'Frame ID: ' + messageData.iframe.id +
' Message: ' + messageData.message
);
alert(messageData.message);
},
closedCallback : function(id){ // Callback fn when iFrame is closed
$('p#callback').html(
'IFrame (' + id +
') removed from page.'
);
}
});

2015-08-07 11:33 GMT+02:00 David J. Bradshaw [email protected]:

Set the min width and scrolling options.


Reply to this email directly or view it on GitHub
#236 (comment)
.

@davidjbradshaw
Copy link
Owner

You don't need most of that code. This issue tracker is for bugs. If you want me to develop code for you, then I'm available for hire.

@braguzz
Copy link
Author

braguzz commented Aug 7, 2015

if I put
heightCalculationMethod: : 'lowestElement',

I have a js error:

Uncaught SyntaxError: Unexpected token :

2015-08-07 12:06 GMT+02:00 David J. Bradshaw [email protected]:

You don't need most of that code. This issue tracker is for bugs. If you
want me to develop code for you, then I'm available for hire.


Reply to this email directly or view it on GitHub
#236 (comment)
.

@braguzz
Copy link
Author

braguzz commented Aug 7, 2015

Sorry, I dont know if my specific behaviour is a misconfiguration or a error or simply this script cant handle.

I'd like that the iframe shows only the orizontal scroll, but it shows both.

thanks again,
PB

@davidjbradshaw
Copy link
Owner

The scroll option is currently all or none.

@braguzz
Copy link
Author

braguzz commented Aug 7, 2015

ok

2015-08-07 12:37 GMT+02:00 David J. Bradshaw [email protected]:

The scroll option is currently all or none.


Reply to this email directly or view it on GitHub
#236 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants