Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to remember how many times they have viewed the form. You didn't mention PHP but you have that as a tag so I'll assume that is what you are using. You could create a session variable for storing how many times the user has viewed the page/form. (this psuedo-code was written late at night and not tested but you should be able to get the jist of it) </p> <pre><code>if (!isset($_SESSION['viewCnt'])) $_SESSION['viewCnt'] = 1; else { //not the first time viewing the page/form, so increment counter and setup ajax $_SESSION['viewCnt'] = $_SESSION['viewCnt']+1; echo' &lt;script&gt; $(function() { //do your ajax call here to fill div6 }); &lt;/script&gt; '; } echo' &lt;div id="1" style="display:'.($_SESSION["viewCnt"] == 1 ? 'block' : 'none').';"&gt;&lt;/div&gt; &lt;div id="2" style="display:none;"&gt;&lt;/div&gt; &lt;div id="3" style="display:none;"&gt;&lt;/div&gt; &lt;div id="4" style="display:none;"&gt;&lt;/div&gt; &lt;div id="5" style="display:none;"&gt;&lt;/div&gt; &lt;div id="6" style="display:'.($_SESSION["viewCnt"] == 1 ? 'none' : 'block').';"&gt;&lt;/div&gt; '; </code></pre> <p>If you don't want to use session variable then you can use cookies or HTML5 web storage: <a href="http://www.w3schools.com/html/html5_webstorage.asp" rel="nofollow">http://www.w3schools.com/html/html5_webstorage.asp</a></p> <p>NOTE: the session method will start over with each new sign in to the application and the cookie method will start over depending on its expiration date or when the user clears their temporary internet files</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload