Refresh problem

Discussion in 'Javascript' started by Steven, Sep 20, 2006.

  1. Steven

    Steven Guest

    Hi.
    I'm have 2 iframes on my page (frame1 and frame 2)

    In frame1 I have a page pg1.htm
    <script type="text/javascript" src="items.js"></script>
    ......
    <script type="text/javascript"
    alert(ITEMS);
    </script>

    where items.js is as follows
    var ITEMS = ['Abc'];

    So when the page loads it displays Abc in an alert box as you would
    expect.

    In frame2 I have pg2.htm which contains a text box where you enter say
    123 and click an update button.
    This loads pg3.htm into frame1. The purpose of pg3 is to re-write the
    items.js file to the following
    var ITEMS = ['123']; //or what ever was entered in

    pg3 loads pg1 back into frame1.

    The problem is the alert still says "Abc", (note the re-write does
    actually hapen), its not using the new value . The only way I can get
    the new value is to add a button as follows

    <input name="reload" type="button" value="Reload"
    onClick="document.location.reload()" />

    How do I get the code to do this without a reload button
    Steven, Sep 20, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brian lanning
    Replies:
    0
    Views:
    592
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,117
    John C. Bollinger
    Oct 8, 2004
  3. Pkenty
    Replies:
    0
    Views:
    389
    Pkenty
    May 28, 2004
  4. Jawahar Rajan
    Replies:
    1
    Views:
    290
    Adrienne
    Oct 1, 2003
  5. phal

    ReFresh problem or target problem

    phal, Sep 15, 2005, in forum: Perl Misc
    Replies:
    6
    Views:
    132
    Scott Bryce
    Sep 15, 2005
Loading...

Share This Page