Click URL to visit a new app within same window/tab is not working

Ok so I have this code within my main app. I want to user to click this URL and continue with the same window/tab.

Right now it just shows a blank page saying the page to visit doesn’t allow connection…Any idea how to fix this? :grinning: Thank you!!

st.markdown('Please <a href="https://happylife.streamlit.app" target="_self">click</a>', unsafe_allow_html=True)

Error in Firefox

Error in Chrome

Hey @John_K,

What version of Streamlit are you using?

Also… just curious: Is the app containing the link embedded? Possibly subtly through a whole-page frame? If so, a link to another Streamlit Community Cloud app within that same frame will need the embed query parameter set, I’d expect.

st.markdown('Please <a href="https://happylife.streamlit.app/?embed=true" target="_self">click</a>', unsafe_allow_html=True)
1 Like

Hi @Caroline I have the exact same issue, just wanna to set the link to open in the same tab as self target.
I tried many streamlit vertsions that didn’t fix it for me , last trial was using streamlit==1.8.1 and it also didn’t fix it for me as well. any suggestions to solve it. many thx

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.