SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reload a page after form submission

    I am using the following code to add an item to my shopping cart..

    Code:
    <input type="image" src="/images/add.gif" name="id<% = rs("code_no")%>add" value="Add to Cart" onClick="addItem('<% = rs("item")%>','<% = rs("price")%>', document.itemsform.id<% = rs("code_no")%>quant.value, document.itemsform.id<% = rs("code_no")%>number.value, '<% =RS("shipping") %>'); return false;">
    Which works nicely except for the fact the shopping cart value I have showing on my page does not update until I refresh the screen or go to another page.

    Is there somethign I can add to force it to refresh the screen when the item is added please?

    Many thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ding dong.....

  3. #3
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    there's not enough information here...

    what does addItem do? It appears to be a js call, does it submit a form?

    you might try adding:
    <meta http-equiv='Pragma' content='no-cache'>
    to the head to require the browser to 'always' reload

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a note: that 'return false' cancels the form submission.
    ::: certified wild guess :::


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
  •