Copy link to clipboard
Copied
Hey guys,
Every time I load my website, my iFrame keeps breaking out. This means that the iFrame enlarges to a full screen.
I have a snippet of code in the HTML portion of my page now which seems to do the job.
Code:
<script type="text/javascript">
window.onbeforeunload = function () {
return "This will end your session";
}
</script>
Although it seems to work fine in terms of keeping the URL from busting out of the iframe, it loads a prompt: This page is asking you to confirm that you want to leave - data you have entered may not be saved. If someone clicks "leave", the iFrame will enlarge to full screen. When someone clicks "stay", the iFrame will remain as is and not enlarge (this is what I want).
If anyone knows how I can stop this from occurring I would really appreciate your thoughts. Is there any way for it to automatically s"stay"?
Many thanks in advance for any tips you can offer. Not positive, but I think it might be the onbeforeunload which is causing it.
Yes I know how to create a database and a search feature with filtered results because I understand MySQL and PHP. But since you don't, there's no easy way to explain it to you. Also, you're using WIX for your main website which means you're at the mercy of whatever WIX allows which probably isn't much.
At some point you might want to move from Wix to WordPress which is MySQL & PHP driven. WP with the Woo Commerce plugin is a good e-commerce solution for many people who don't know how to
...Copy link to clipboard
Copied
Any chance you could share a link to your site so we can see what's causing your iframe to behave like that?
That isn't "normal" iframe behavior.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It looks like the iframe is being written into the page using javascript (I see no iframe in the source of the page itself before the frame takes over), and somewhere along the line is a frame breaker script.
Is the content of the iframe yours?
I ask because many sites use a javascript frame breaker to keep third parties from using their intellectual property on an unauthorized site.
If it is yours, you should be able comment out all scripts on the iframe source page, and "un-comment" them one at a time until you find the culprit. Hopefully it's not written into your compatibility search function, it may be hard to pull it out without breaking something.
Copy link to clipboard
Copied
The content of the iframe is actually eBay's under my account. I was the one who created the compatibility table on eBay using their app for ebay's website, if that makes sense!
Copy link to clipboard
Copied
Is your e-commerce site located on eBay's servers?
Copy link to clipboard
Copied
Nope! It isn't!
I wanted to use the compatibility part on eBay on my website (wix.com) because it seems very useful and I do not have the knowledge to create the code from scratch. That is why I use eBay.com to create the compatibility table/search and then decided to copy its code and tweak it into my website.
Copy link to clipboard
Copied
waldoguru wrote
Nope! It isn't!
I wanted to use the compatibility part on eBay on my website (wix.com)
Good luck with that. I don't think any eBay widget will work satisfactorily on anything but eBay because of their proprietary code and a need to protect their content from being exploited by non-eBay websites.
Sorry.
Nancy
Copy link to clipboard
Copied
Oh my, I feel so stupid, never thinking about copyright issues!!!
Do you have any suggestions on how to connect a database to a website and then creating drop down list based off on that database (similar to the one on eBay)? I am not a programmer whatsoever and have no experience.
Copy link to clipboard
Copied
Yes I know how to create a database and a search feature with filtered results because I understand MySQL and PHP. But since you don't, there's no easy way to explain it to you. Also, you're using WIX for your main website which means you're at the mercy of whatever WIX allows which probably isn't much.
At some point you might want to move from Wix to WordPress which is MySQL & PHP driven. WP with the Woo Commerce plugin is a good e-commerce solution for many people who don't know how to work with code.
Nancy
Copy link to clipboard
Copied
Wil try wordpress! Thank you so much for your suggestion, I really appreciate it