Reputation: 24815
I'm currently writing a widget that anyone can put on their website.
Currently, when clicking on a button, an iFrame opens with a long url (with encrypted data). But, if the amount of data to be encrypted gets to much, there might be an issue since in IE8 the URL length can only be 2k.
What I want to do (without jQuery) is to POST this data to the iFrame instead of using GET.
I've seen the method of creating a hidden form, with target="iframename"
, but this isn't really helpful since I don't want to be creating forms on another website which isn't mine.
Is there another solution to POST to an iFrame without having to generate a form.
Targetet browsers are IE8+ (and chrome/ff/safari etc). IE7&6 are not supported by our widget.
Upvotes: 0
Views: 4676
Reputation: 1976
I've seen the method of creating a hidden form, with target="iframename", but this isn't really helpful since I don't want to be creating forms on another website which isn't mine.
That is actually no problem, you can use Javascript to write to your iFrame, and thus you can create the form on your side, then .submit() the form inside the iframe to get your site in question.
Check out Write elements into a child iframe using Javascript or jQuery
Upvotes: 2