www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] javascript frame reload issues (only while using mac web sharing)

  1. #1
    Join Date
    Feb 2010
    Location
    San Jose, CA
    Posts
    2

    resolved [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.

    Solution: View the email page through http://localhost/email.html.

    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:

    window.frames['mailframe'].location.reload();
    document.getElementById('mailframe').location.reload();
    mailframe.location.reload();

    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.

    Thank you!
    ~Ari

  2. #2
    Join Date
    Feb 2010
    Location
    San Jose, CA
    Posts
    2
    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.

    PROBLEM SOLVED!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles