Stay on row of dynamic table after form submit

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Stay on row of dynamic table after form submit

    Hello. Using PHP and MySQL. Is there a way to keep the focus on a row in
    dynamic table to prevent from jumping back to the top after every "add-to-cart"
    click? Currently, some of my product catalogs require more scrolling than
    other, depending on the product. (I know I could add more "next page-prior
    page" pages but I prefer not to do that) If the user scrolls down below the
    rows that are displayed on the first page load that is displayed, then adds an
    item to the cart, the screen refreshes back to the top and the user has to
    scroll back down. Very cumbersome. The dynamic table is actually a form. In
    summary, when the user clicks add-to-cart, I need the screen to stay on that
    product row after the page reload instead of displaying the dynamic table back
    at the top.

    Can that be done?


    harrillj Guest

  2. Similar Questions and Discussions

    1. Form does not submit in Mac
      Hi all, I am using the submitForm() on my submit button. I have set the URL to "/Save.aspx" which will get the submitted information and doing...
    2. Submit form
      I am creating a control which will upload files. The problem I am having is the button event I have created does not seem to see the files getting...
    3. Can't stay logged in after submitting form
      I have several pages in a user only area. I can go from page to page to page until I submit a form (which goes to my email via formmail), then I...
    4. Form Field/ Form Submit Problems (probably an easy answer...)
      Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works...
    5. table submit question...help!
      I made a table in MS excel, I save it as a webpage and upload it to my apache linux server, Im looking for a script to submit that table from the...
  3. #2

    Default Re: Stay on row of dynamic table after form submit

    I suppose you could get creative with anchors. Perhaps you could create an
    anchor at that table row with a name that contains the key for the product
    you're adding to the cart. For example:

    <a name="anchor_21"></a>

    Then, when you submit your form to add the cart, you could capture that
    product key and use it in the redirect to get back to that section of the
    page. Perhaps something like:

    <%
    ' process add-to-cart code here
    response.redirect("/path/to/this/page.asp#anchor_" & request("productid"))
    %>

    This is an *extreme* simplification, but that's probably what I'd do. And
    if the redirect code won't accept anchor info, you could pass the id back to
    the product page in the querystring and write a client-side script to move
    you down the page onLoad.

    Just a couple of wild, untested thoughts :-)

    Best regards,
    Chris


    Chris In Madison Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139