This is what is said by the person who is staying behind, spoken to the person who is leaving, based on what I read elsewhere.
And as for what the departing person says to the person who is remaining/staying, that seems to be "selamat tinggal."
So, what about two people who've met somewhere, and who are BOTH departing? Would it be the case that both people could say "selamat jalan" to each other i.e. the phase doesn't really mean that the speaker is staying behind, but is commenting on what the other person is doing (i.e. leaving)?
Might not be completely relevant, but in Korean we have the same convention and in the situation you described both parties would say the equivalent of "salamat jalan". So it could be the same in Indonesian?
Okay. Where did this come from? Why isn't in the notes with Selamat tinggal?