61 users online (1 members and 60 guests)  

Thread: reload a page


  Results 1 to 9 of 9

Related

  1. #1
    hermoine's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2007
    Posts
    32

    Lightbulb reload a page

    Hello friends,

    In my project i have a list of students. when i click a students name i am directed to a page where i can change the students details. and when i submit the page the data is updated and i am directed to the first page where i have the list of students. but now i am using
    Code:
    window.open("pagename","framename")
    this directs me to the page i want. but does not update the page. i need to manually refresh the page.

    i have to do all this in the same window(same frame).

    can you suggest a way for me to refresh the page automatically?

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: reload a page

    Are you updating a database with the student details? If so, what language are you using to do that?
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    hermoine's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2007
    Posts
    32

    Lightbulb Re: reload a page

    i am using jsp to upload the db. but i use js to direct to a page. can you tell me a way out?

  4. #4
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: reload a page

    I'm still not sure what you need. Will you need to pass some variables to the page via query string and use those variables to read your database and load the page? Will you need to use JSP to read those variables and then populate the page? Depending on what exactly you're doing, I may or may not be able to help. I know nothing about JSP and just enough javascript to get by.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  5. #5
    hermoine's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2007
    Posts
    32

    Re: reload a page

    no. i will tell with an example.

    in page A there are a list of student names. i click one student name. I am directed to Page B. Here i modify the name. Then i submit. It is directed to andother Page C where the database is updated . Now from Page C i need to go to Page A automatically. So i used
    Code:
    window.open("Page A","framename");
    This way i am able to go back to page A. but the data available there is the old data and not the updated one. It is caching the data i think.

  6. #6
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: reload a page

    This is not my area of expertise, but you might try an "HTTP-EQUIV Refresh" meta tag on your redirected page. Here is an example of how to do that.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  7. #7
    hermoine's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2007
    Posts
    32

    Re: reload a page

    Code:
    <meta http-equiv="Pragma" content="no-cache">
    This worked. Thanks for your idea of using http-equiv.

  8. #8
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: reload a page

    Vinyl-Junkie is the Oracle
    I know I can read a thread without fear of having to think of an answer when I see a V-J post in it

  9. #9
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: reload a page

    Quote Originally Posted by DeadMeatGF View Post
    Vinyl-Junkie is the Oracle
    I know I can read a thread without fear of having to think of an answer when I see a V-J post in it
    I have everyone fooled. I just use Google for a lot of the advice I give around here.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more



Tags for this Thread