https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


Cannot go back to your ToolsJX-grid-page

  • s94goran
  • s94goran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #2948

Hi Support,

I need some assistance in how to link back to your ToolsJX-grid-page and preserving the original search text (data_search).

See the link marked with yellow below…


Attachment not found




…contains this link:
http://localhost/index.php?option=com_content&view=article&id=9&Itemid=106&lang=en&i=35775


The page showing when clicking the link is an external ordinary php-web-page which has nothing to do with your grid component ToolsJX.

Now I have got a question if there is a way back from the new showing page (let’s call it detail-page) to the list-page (same as the clip-image above)

When the user clicks the back-button in the browser he gets back to the list-page but the serach criteria text string he just wrote is now gone (“m22” in this example above).

I have tried to put the search criteria in a joomla-session-variable and later concaternate it into the back-link.
<form action="index.php?option=com_content&view=article&id=2&data_search=<?php echo $session->get('SearchString');?>" method="post" enctype="multipart/form-data">
  <input type=submit value="Back"><br>
</form>

To make this possible I have tried to put som session code in your GridBuilder.php

// session variables setup for data_search
$session = JFactory::getSession();
$session->set('SearchString', htmlspecialchars($_GET["data_search"]));
I am able to link back and everything works fine except that when I do, the search field is empty.

How can I get back to the list-page and also get back the old “m22”-search-string?


Cheers,
Göran
Oriola AB

Last edit: 10 years 2 months ago by s94goran. Reason: added code format

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #2952

Sorry for late response. If you are not using Advanced Filters, you have to set two get parameters in the url: s_f and data_search.

mysite.com/mygridpage?s_f=searchfield&data_search=searchstring

You have to remember them somehow either by using session or by passing them forward by using some javascript.

Please Log in or Create an account to join the conversation.

  • s94goran
  • s94goran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #2962

Thanks for your answer.

Now my back-link looks like this and it PARTLY works.

<a href="http://localhost/index.php?option=com_content&view=article&id=2&Itemid=106&lang=en&s_f=searchfield&data_search=YYY">Back2</a><br>

The field data_search is populated on the list-web-page with the correct search text but the user is foreced to push the search button manually.

It is of highest importance that the user comes back to the list right where he was before, where the search was executed.

How can this be accomplished? Javascript?

Cheers,
Göran

Last edit: 10 years 2 months ago by s94goran. Reason: added code format

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #2965

Hi,

It should search automatically. Do you have this somewhere online?

Please Log in or Create an account to join the conversation.

  • s94goran
  • s94goran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #2970

Thank you.
That did the trick.
I forgot to handle the attributes right

/index.php?option=com_content&view=article&id=3&Itemid=107&lang=en&s_f=batch&data_search=1A

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.141 seconds

Contact Us

Contact us on Discord

Contact us on Facebook