My first idea was to check this using php in my application: by looking at HTTP_REFERER, I can get the location of the page containing the iframe element. That is: I want to make sure that a similar iframe element from another web server (lets say ) has the possibility to iframe my application located at. what's located at /index.php) only can be shown in iframe elements placed at. However, it's quite imperative that my application (i.e. In short, the iframe element appears on my customer's website (lets say ) - something like this: It's imperative that it's done using iframe as I am placing the application on my own server. I'm currently developing an application (in php) for a website that is to be integrated into their website using iframe. and i still need a way to refresh the main page too. Call parent window js function from iframe scrolling code#My page inside the iframe is ultimately "local" so it sounds like the above code should work, but i'm not sure what event would be best to trigger this javascript. I did find this solution on a different website:ĭocument.getElementById(FrameID).(true) It would be ideal if when they refresh the main page, the iframe gets updated too. I have added a line to make it auto refresh on it's own.īut the users find it annoying that the page refreshes while they're reading it. But the iframe isn't updated unless i explicitly right-click inside the frame and manually select refresh. It does get the latest data from the external site and its saved in "somepage.html". My problem is that when i refresh the main page, i want the iframe to also display the latest data. (i wrapped a div tag around the iframe so technically, i'm doing something like: "divtabframe.innerHTML = ') save it to a file, and then finally, i display this stuff in an IFRAME. Then i modify the html i get to suit my needs. i have a classic asp page that is using the winhttprequest object to get the contents of website from a different server. File: ' ĭocument.getElementById('uploadp').style.display = 'none' ĭocument.getElementById('uploadf').innerHTML = 'result' ĭocument.getElementById('uploadf').style.display = 'block' If you think we should allow other please make a suggestion on the forums. Result = 'There was an error during file upload! The file has a size of 0 File: ' If (uploaded = document.getElementById('numflowers').value)ĭocument.getElementById(finish).style.display = 'block' Result = 'The file was uploaded successfully!' I've searched and searched for the awnser, along with trying different alternative to, such as window.top, parent, and parent.document and so far nothing has worked, I've even tried the onLoad on the iframe with no success. It all works up until the iframe finishes and needs to send the javascript function call back to the parent page, nothing happens, when it should hide the upload progress bar. I'm working on a upload script that uses javascript, and a hidden iframe to upload the files. Is there another solution for me so that the page within the iframe cannot redirect the parent page? What this code does, is that every time the unload of a page happens, it will redirect me to my404.html and this does solve the problem of the iframe trying to redirect my entire site but anytime a user tried to go to a new website by typing it in the address bar, they are redirected to my404.html. If(f & frames & s & s.indexOf(location.protocol + '//' + location.hostname + '/') = 0) Var f = getQval('frame'), s = getQval('src') Return (m = r.exec(m))? unescape(m) : null Var qstr = '?frame=0&src=' + encodeURIComponent(location.href), Which is not very clean at all, this is the javascript that i found that at least works: The problem is, especially with search engines, to point to that page, this is what the URL looks like to send someone to that page: It takes them to the audio page but will load it into the index.html page. I have used iframes for my site and found various javascripts so when a person clicks on say the audio page he Please tell me what is my mistake or how can i achieve values of all 4 fields but when i do print_r for iframe values, it is blank When the button is clicked, i am submitting the iframe and parent both. I have a page which has a form and also one iframe in the same.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |