sowjanya
11-02-2007, 07:50 PM
1) Script Title:
Switch Content Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
I have some problem using javascript:openwindow() function in the Switch Content Script. Its always giving me an error saying Object Expected.
Here is the code I have used.
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td> </td></tr>
<tr>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0" align="center" >
<tr class="tdbgdark" height="26" VALIGN="middle"><td>
<h5 id="bobcontent1-title" >Notes: (<bean:write name="projectPage" property="notesSize" scope="request"/>)</h5>
</td>
<td align="right"><b>
<input type="button" name="ADD" value="ADD" id="ADD" class="btnbutton" onClick= "javascript:openWindow('Notes_AddLink.do?piNbr=<%=PI %>','Notes',700,600)"> <input type="button" name="SEARCH" value="SEARCH" class="btnbutton" id="SEARCH"></b></td>
</tr>
<tr> <td colspan="2">
<div id="bobcontent1" class="switchgroup1">
<B>ABEA </B><tiles:insert page="/Notes_View.do" flush="true"/>
</div>
</td></tr></table>
</td>
</tr>
</table>
Here every thing is working fine but when I attempt to open the new window by clicking on the ADD button its giving me the error as Object Expected and if I remove the button nothing is wrong. Please help me out in placing the button in my code i.e in resolving this issue.
Thank you.
Switch Content Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
I have some problem using javascript:openwindow() function in the Switch Content Script. Its always giving me an error saying Object Expected.
Here is the code I have used.
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td> </td></tr>
<tr>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0" align="center" >
<tr class="tdbgdark" height="26" VALIGN="middle"><td>
<h5 id="bobcontent1-title" >Notes: (<bean:write name="projectPage" property="notesSize" scope="request"/>)</h5>
</td>
<td align="right"><b>
<input type="button" name="ADD" value="ADD" id="ADD" class="btnbutton" onClick= "javascript:openWindow('Notes_AddLink.do?piNbr=<%=PI %>','Notes',700,600)"> <input type="button" name="SEARCH" value="SEARCH" class="btnbutton" id="SEARCH"></b></td>
</tr>
<tr> <td colspan="2">
<div id="bobcontent1" class="switchgroup1">
<B>ABEA </B><tiles:insert page="/Notes_View.do" flush="true"/>
</div>
</td></tr></table>
</td>
</tr>
</table>
Here every thing is working fine but when I attempt to open the new window by clicking on the ADD button its giving me the error as Object Expected and if I remove the button nothing is wrong. Please help me out in placing the button in my code i.e in resolving this issue.
Thank you.