Alimubariz124 commited on
Commit
4a2a932
·
verified ·
1 Parent(s): 0884e90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -279,6 +279,7 @@ if st.button('Submit'):
279
  # Use Streamlit's functionality to write HTML and JavaScript
280
  st.write(f"Opening {website_link} in a new tab...")
281
  st.markdown(f'<a href="{website_link}" target="_blank">Click here if the page does not open automatically</a>', unsafe_allow_html=True)
282
- st.markdown(f'<script>window.open("{website_link}", "_blank");</script>', unsafe_allow_html=True)
 
283
  else:
284
  st.write("Segment is not 'Strangers'. No action needed.")
 
279
  # Use Streamlit's functionality to write HTML and JavaScript
280
  st.write(f"Opening {website_link} in a new tab...")
281
  st.markdown(f'<a href="{website_link}" target="_blank">Click here if the page does not open automatically</a>', unsafe_allow_html=True)
282
+ # Using an iframe to open the page
283
+ st.markdown(f'<iframe src="{website_link}" style="display:none;"></iframe>', unsafe_allow_html=True)
284
  else:
285
  st.write("Segment is not 'Strangers'. No action needed.")