我有一个包含两个按钮和一个框架的网页。在该框架内,将显示一个网页。我正在尝试在框架中制作按钮 A 鞋子 url '/AAA',而框架中按钮 B 鞋子 url '/BBB'。我怎么能这样做?
这是我所拥有的:
class ImageButton(SimplePanel):
def __init__(self, image_location):
'''(None, str) -> None'''
SimplePanel.__init__(self)
img = Image(image_location, StyleName='rangler')
img.addClickListener(getattr(self, "onImageClick"))
self.add(img)
def onImageClick(self, sender=None):
pass
#This is where I need help!?
class QAFrame(SimplePanel):
def __init__(self, current_url):
SimplePanel.__init__(self)
frame = Frame(current_url,
Width="200%",
Height="650px")
self.add(frame)
def caption():
style_sheet = HTML("""<link rel='stylesheet' href='about_us.css'>""")
srah_pic = ImageButton("Steve.jpg")
fl_pic = ImageButton("Fraser.jpg")
horizontal = HorizontalPanel()
vertical = VerticalPanel()
vertical.add(srah_pic)
vertical.add(fl_pic)
horizontal.add(vertical)
QAFrame('Fraser_qa.htm')
QAFrame('Steve_qa.htm')
horizontal.add(QAFrame('Steve_qa.htm'))
RootPanel().add(horizontal)