Hi All,
I am trying to open a web url on a click of new tab. But when i try to do so i get " www.airbnb.com(given url) refused to connect."
Can anyone help or guide me to solve this?
import flask
import dash
import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc
from dash.dependencies import Output, Input, State
from dash.exceptions import PreventUpdate
from datetime import datetime
from sharedstate import MainConfig
from app import app
from apps import dbcontrol, mappView
html.Div([
dcc.Location(id='url', refresh=False),
dcc.Tabs(id="tabs", value='tab-1', children=[
dcc.Tab(label='Database control', value='tab-1'),
dcc.Tab(label='mapp View', value='tab-2'),
]),
html.Div(id='tabs-content')
]),
@app.callback(Output(‘tabs-content’, ‘children’),
[Input(‘tabs’, ‘value’)])
def render_content(tab):
if tab == ‘tab-1’:
return html.Div([
html.Div(dbcontrol.layout),
])
elif tab == ‘tab-2’:
return html.Div([
html.Iframe(
width=1300,
height=820,
src=‘https://www.airbnb.com/’,
),
html.Div(mappView.layout),
]),
mappView.layout
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from os import listdir, makedirs
from os.path import isfile, join
import shutil
import time
from datetime import datetime
from datetime import datetime as dt
from sharedstate import PullToDb
from app import app
layout = html.Div([
html.Div(id=‘div-signal-page-load’, style={‘display’: ‘none’}),
html.Div(id=‘div-signal-refresh’, style={‘display’: ‘none’}),
])