Results 1 to 8 of 8

Thread: Refresh one page from another.

  1. #1
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Refresh one page from another.

    Hi Friends,
    I am working on a application which uses two Html windows which are indepedent of each other.

    my requirement is, if I click on link in Page1,if the Page2 is opened then Page2should refresh.(refresh page2 from page1)

    Friends,I need to know whether its possible? and any Javascript methods are helpful in solving this.


    thanks,
    Raavi

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    it is possible if you open page2 from page1 with javascript. then you would use: myWindow=window.open('http://www.mysite.com'); and when you click a link: myWindow.window.location.href="http://www.mysite.com"; //refresh
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you for reply.

    But in this case, the windows are not parent and child.
    they are different and they are opened independently.
    is refresh is possible in this case?


    thanks in advance.

  4. #4
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    I think it's possible if you use ajax to dynamically inject into the second page. It may be a bit risky. If you are familiar with dynamic post requests, try this out.

    What you'd have to do is have this kind of php in the header of the page recieiving the request.

    for example

    <? if ($_POST['link'] == "refresh") {echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php\">";} else {;} ?>

    using ajax, I think if this was in the header of a normal page, it should refresh it.

    I can make you a mock up and zip send it to you if you have no idea what I am talking about. I am most sure it would be the best way to accomplish this. Be sure that you block external addresses though (in your php).
    Last edited by Falkon303; 02-24-2009 at 05:20 AM.
    document.write is document.wrong

  5. #5
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you..

    I am not much aware of Ajax and Php.
    Can U please send me the zip file.

  6. #6
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by raavi View Post
    Thank you..

    I am not much aware of Ajax and Php.
    Can U please send me the zip file.

    sure thing, but you are the one in charge of the security of it. All I offer you is a bare bones script, and also, after I am off work.

    - Ben
    document.write is document.wrong

  7. #7
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Hah! I ate my words raavi!

    It is more difficult than I had thought using ajax to accomplish this, but here is some source code that should do the trick.

    http://newsgroups.derkeiler.com/Arch.../msg00960.html
    document.write is document.wrong

  8. #8
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile



    no issues....

Bookmarks

Posting Permissions

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