Wix: (Javascript) Click button on one page to jump to another page and filter info

Solution 1: Relocation worked as desired.
Solution 2: Information was stored as desired, and recalled using the session.getItem().

[HOME PAGE]

import wixLocation from ‘wix-location’;
import {session} from ‘wix-storage’;

export function exploreSearchButton_click(event) {

if(($w('#categoryDropdown').value.length>0)&&($w('#stateLocationDropdown').value.length>0)) 
{ 
    session.setItem("location",$w('#stateLocationDropdown').value); 

    switch($w('#categoryDropdown').value) 
    { 
        case "Doctor" : 
            session.setItem("category",0); 
            wixLocation.to("/medical-field"); 
            break; 
        case "Dentist" : 
            session.setItem("category",1); 
            wixLocation.to("/medical-field"); 
            break; 
			... 
        case "Police Officer":  
             session.setItem("category",0); 
            wixLocation.to("/civil-service-law"); 
            break; 
        case "Fire Fighter":  
             session.setItem("category",1); 
            wixLocation.to("/civil-service-law"); 
            break; 
      ... 
        default:  
            console.log("Did not jump to another page."); 
    } 
} 

}

[MEDICAL PAGE]

import { session } from ‘wix-storage’ ;

$w . onReady ( function () {

**let**  newCategory  =  parseInt ( session . getItem ( "category" )); 

**if** ( newCategory >= 0 ) 
{ 
    $w ( '#categoriesCheckboxGroup' ). selectedIndices  = [ newCategory ]; 
    $w ( '#stateLocationDropdown' ). value  =  session . getItem ( "location" ); 
} 
        displayServicesInRepeater ( "medical-field" );  

I have an unrelated problem of the stateLocationDropdown.value.length is not acknowledged to be greater than 0. Therefore a the medical page is not automatically filtered. I presume that I just need to change the timing in which " displayServicesInRepeater () is called.
*If I am wrong and you don’t mind dropping a brief comment, let me know. Otherwise I do not want to detour from the original question and answer of this post.
Thank you all for your assistance.