questhaven
Programmer
Hi there - I am working with a page that uses frames - the right frame - called "main" contains a link for a pop-up address book. The window that pops up contains links for different email addresses that can be selected. When the link is clicked it triggers a javascript function that updates that field in the right frame of the parent window. The code that I have works in IE but not in Netscape. Does anyone see any issues with the code?
Thanks again!
THE CODE IN THE RIGHT FRAME:
<form name="f1" action="record_share.asp" method="post">
<p>Share with: <BR>
<img src="images/ContactIcon.gif" title="Click here to use your personal address book" onclick="openAddressBook('open');return false;" style="cursor:hand;"></img>
<input name="txtUserName" value="" width=155" maxlength="100">
<INPUT type="submit" name="submit" value="Share Images">
</FORM>
-------------------------------------------------------
THE POPUP CODE:
<html><title>Address Book</title><head>
<link rel="stylesheet" type="text/css" href="dolphin1.css">
<script language=javascript>
function updateField(str) {
window.opener.f1.txtUserName.value = str;
window.close();
}
</script>
</head>
<body>
<br>
<table align=center bgcolor=#ffffff border=0 cellspacing=0>
<tr>
<td>
<a class=tabsel2>Address Book</a><br>
<img src="images/graph1.jpg" align="top" height=2 width="100%">
</td>
</tr>
<tr>
<td align=left>
<a href="javascript:updateField('test@test.com')">
<font size=2pt>test@test.com</font></a>
</td>
</tr>
<TABLE>
</BODY>
</HEAD>
</HTML>
-----------------------------------------
THE FRAMESET CODE:
<frameset rows="100,*,23" FRAMESPACING="0" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frame name="topframe" src="headerframe.asp" noresize scrolling="no" frameborder="no" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" target="_top">
<frameset cols="220,*" border="0" frameborder="1" FRAMESPACING="3" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frameset rows="100%, 0%" border="0" frameborder="1" FRAMESPACING="0" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frame name="contents" style="border-left:0px solid white; border-top:0px solid white; border-bottom:0px solid white" target="contents" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="no" BORDERCOLOR="#B9C6F1" scrolling="yes" src="summary.asp?NOTEID=<%=new_note_id%>">
<frame name="note_use" style="border-left:0px solid white; border-top:0px solid white; border-bottom:0px solid white" target="contents" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="no" BORDERCOLOR="#B9C6F1" scrolling="yes" src="note_use.asp">
</frameset>
<frame name="main" FRAMEBORDER="no" scrolling="yes" BORDERCOLOR="#B9C6F1" src="slides.asp">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="footerframe.html" frameborder="no" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
</frameset>
Thanks again!
THE CODE IN THE RIGHT FRAME:
<form name="f1" action="record_share.asp" method="post">
<p>Share with: <BR>
<img src="images/ContactIcon.gif" title="Click here to use your personal address book" onclick="openAddressBook('open');return false;" style="cursor:hand;"></img>
<input name="txtUserName" value="" width=155" maxlength="100">
<INPUT type="submit" name="submit" value="Share Images">
</FORM>
-------------------------------------------------------
THE POPUP CODE:
<html><title>Address Book</title><head>
<link rel="stylesheet" type="text/css" href="dolphin1.css">
<script language=javascript>
function updateField(str) {
window.opener.f1.txtUserName.value = str;
window.close();
}
</script>
</head>
<body>
<br>
<table align=center bgcolor=#ffffff border=0 cellspacing=0>
<tr>
<td>
<a class=tabsel2>Address Book</a><br>
<img src="images/graph1.jpg" align="top" height=2 width="100%">
</td>
</tr>
<tr>
<td align=left>
<a href="javascript:updateField('test@test.com')">
<font size=2pt>test@test.com</font></a>
</td>
</tr>
<TABLE>
</BODY>
</HEAD>
</HTML>
-----------------------------------------
THE FRAMESET CODE:
<frameset rows="100,*,23" FRAMESPACING="0" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frame name="topframe" src="headerframe.asp" noresize scrolling="no" frameborder="no" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" target="_top">
<frameset cols="220,*" border="0" frameborder="1" FRAMESPACING="3" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frameset rows="100%, 0%" border="0" frameborder="1" FRAMESPACING="0" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frame name="contents" style="border-left:0px solid white; border-top:0px solid white; border-bottom:0px solid white" target="contents" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="no" BORDERCOLOR="#B9C6F1" scrolling="yes" src="summary.asp?NOTEID=<%=new_note_id%>">
<frame name="note_use" style="border-left:0px solid white; border-top:0px solid white; border-bottom:0px solid white" target="contents" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="no" BORDERCOLOR="#B9C6F1" scrolling="yes" src="note_use.asp">
</frameset>
<frame name="main" FRAMEBORDER="no" scrolling="yes" BORDERCOLOR="#B9C6F1" src="slides.asp">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="footerframe.html" frameborder="no" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
</frameset>