Problem passing parameters via iframe in IE

I am trying to do an HTTP GET from my website to another website that runs through an iframe.

In Firefox, you can see in the source that the correct url is in the iframe src along with its correct parameters - and it works.

In IE, you can see in the source that the correct url is in the iframe src along with its correct parameters - and it does not work ...

Is there something in IE that doesn't allow passing parameters via iframe to querystring?

I tried updating the iframe in IE, I tried updating my page and the iframe in IE, and I tried to copy the url and paste it again in the iframe src (making it refresh as if I just entered it in the address bar for this iframe) . Not lucky yet!

Does anyone know why this is happening, or are there any suggestions to try to get around this?

Edit: I cannot give a link to this because the site requires a password and credentials to enter our site and our supplier’s site. Despite the fact that I could make a test account on our site, it would not be useful for the testing process, because I can not do the same for the supplier’s site. As for the code, all it does is create an src from the backend code on the page load and set the src attribute from the back ...

//Backend code to set src
mainIframe.Attributes["src"] = srcWeJustCreated;

//Front end iframe code
<iframe id="mainIframe" runat="server" />

Edit: The problem has not been resolved. Auto response accepted because it has expired. I will re-ask this question with additional information and a link to the page when our site is closer to life.


,
Matt

+3
6

IE Iframes. "" "" . , , . , , , , , .

+8

, www.acme.com, iframe - www.myvendor.com.

IIRC, , DNS CNAME myvendor.acme.com, www. myvendor.com. IFRAME .

, Javascript src script (, , ). script IFRAME "" URL .

+1

, " " GET URL-.

"" URL- , , . , URL- :

http://example.com/app/param,value/otherparam,othervalue http://example.com/app/param,value/thirdparam,value3

:

http://example.com/app?param=value&otherparam=othervalue http://example.com/app?param=value&thirdparam=value3

Apache .htaccess, , IIS, , .

EDIT: , , : p :

  • script ( , IE GET ).
  • Javascript URL- .
  • script URL- , .. . .

, URL- iframe :

http://yoursite.com/app/param,value/otherparam,othervalue

URL-:

http://externalsite.com/app?param=value&otherparam=othervalue

0

BYK. , , GETting URL, IE. , src, , , , 4k. , . IE. , Firefox, .

var autoSaveFrame = window.frames['autosave'];
// try to create a temp form object to submit via post, as sending the browser to a very very long URL causes problems for the server and in IE with GET requests.
var host = document.location.host;
var protocol = document.location.protocol;
// Create a form
var f = autoSaveFrame.document.createElement("form");
// Add it to the document body
autoSaveFrame.document.body.appendChild(f);
// Add action and method attributes
f.action = protocol + '//' + host + "/autosave.php"; // firefox requires a COMPLETE url for some reason! Less a cryptic error results!
f.method = "POST"
var postInput = autoSaveFrame.document.createElement('input');
postInput.type = 'text'
postInput.name = 'post';    
postInput.value = post;
f.appendChild(postInput);
//alert(f.elements['post'].value.length);
// Call the form submit method
f.submit();
0

Try using the indirect method. Create a FORM. Set its action parameter to the base url that you want to move. Set the POST method. Set your target for your iframe, and then create the necessary parameters as hidden inputs. Finally, submit the form. It should work as it works with POST.

-1
source

Source: https://habr.com/ru/post/1713370/


All Articles