Note that there are some explanatory texts on larger screens.

plurals
  1. POChange block content based on changes in another block
    primarykey
    data
    text
    <p>I am experienced Java/C++ programmer, but totally new to Drupal/PHP. </p> <p><strong>Short question:</strong> </p> <p>How do I refresh all the blocks in my page, based on the input to a particular block?</p> <p><strong>Exact Scenario:</strong></p> <p>I am looking to create a website with display and behaviour similar to <a href="http://www.google.com/finance" rel="nofollow">http://www.google.com/finance</a>. I have started creating a custom module for this in Drupal 7, So we want to have:</p> <ol> <li>a top <strong>input block</strong> where users can enter a particular company's name. </li> <li>a <strong>main block</strong> which starts with general content (e.g. tables plus latest news about the economy etc). As soon as a company is selected in block 1, this changes to news and tables about the chosen company. </li> <li>a side <strong>graph block</strong> displaying some relevant graphs etc. Again, when no company is chosen, this could display the general graphs (e.g. S&amp;P, Dow Jones, NASDAQ), and when a company is chosen, this displays the details for the chosen company. </li> </ol> <p>The way I see it, the website works in a "current context" for the user. So, perhaps I can set a session level variable in Drupal, and refresh all blocks based on the current value of this variable?</p> <p>However, I am not sure how to achieve this, and what is the best way to do this? (AJAX? Taxonomy?)</p> <p>Any pointer, hints, suggestions, examples, sample code are most welcome. </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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