[RESOLVED] javascript frame reload issues (only while using mac web sharing)
Hello.
I'm on a Mac, 10.5.8.
I made an html/javascript page to reload my work email every 2 minutes. Also, if it finds a new email, it loads a hidden frame which implements PHP to send my email to let me know that I have a new email, simulating a push notification.
The problem: The PHP doesn't work unless I load the page by first using web sharing, and then viewing the email page through the http://localhost/email.html or whatever.
New problem: The entire email page is loaded within a frame, and I'm using
mailframe.location.reload();
to reload the frame in order to reload for new emails. But when I view this page through the http://localhost/email.html, for some reason the frame handling isn't working. I tried a bunch of debugging things (I don't know if this works in other browsers, but since I use Safari I can use the address bar to do things like javascript:alert(window.frames['mailframe'].location), but I haven't been able to figure out the way to make the frame reload. These are the methods I've tried:
I often search google and end up at different sites like this one to search for solutions to my problems, but I had a strong feeling this is a very obscure problem since it implements the specific use of mac's web sharing, and having the problem there but not when the file is directly loaded, blah blah etc. So I made this profile on this site specifically to ask this question.
I forgot, I loaded the page from the local file, which allowed for frame handling and reloading, and the PHP page was then loaded through the webserver, http://localhost/sendmail.php, which allowed for the PHP to work.
Bookmarks