I have a problem in writing a jsp. My scenario is when i click a button (which is in the table cell) the page must go to register.jsp in right frame(there are two frames and this button is also in second frame)I am not able to get it. Please help me.\[code\]<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Insert title here</title> <script type="text/javascript"> function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cell4 = row.insertCell(4); var element4 = document.createElement("input"); element4.type = "button"; element4.value = "http://stackoverflow.com/questions/14453432/Edit"; element4.name = "e5[]"; element4.attachEvent('onclick',Hi); cell4.appendChild(element4); } function Hi() { document.write('<a target="two" href="http://stackoverflow.com/questions/14453432/register.jsp"/>'); } </script></html>\[/code\]