Javascript Using iframe?
I'm using the jsp of a popup window using the javascript with iframe to show a table of multiple records.When i disabled the table of multiple records,it doesn't prevent the onclick function (hyperlink).
The sample code is :
<tr>
<td colspan="2" class="fieldBG" align="left" valign="middle" width="100%" style="padding:2x">
<iframe name="targetIFrame" id="targetIFrame" src ="/jsp/targetScheduleIFrame.jsp?companyId=<%=zoniacSession.getUserInfo().getCompanyInfo().getCompanyid()%>&loginEmployeeId=<%=zoniacSession.getUserInfo().getEmployeeId()%>" scrolling="yes" width="100%" height="100%" frameborder="0"></iframe></td>
</tr>
1.The above code is in popup window it links to another page namely targetscheduleIFrame.jsp
2.The targetscheduleIFrame.jsp page contains the below code:
for (int k=0; k<jobTriggers.length; k++)
{
Trigger trigger = jobTriggers[k];
%>
<tr>
<th width="4%" class="fieldBG" align="center" valign="top" style="padding:2px">
<zoniac:rect class="zoniac_Edit" fillcolor="#ffffff" style='cursor:hand' strok开发者_如何学JAVAecolor="#000080" onselectstart="return false" onClick="javascript:deleteQuartzTrigger('<%=trigger.getGroup()%>','<%=trigger.getName()%>');return false;" onMouseOver="window.status='Click here to go to Page'; return true" title="Delete Schedule">DEL</zoniac:rect>
</th>
<td width="14%" class="fieldBG" align="left" valign="top" style="padding:2px">
<a id="hrefDiv" href="javascript:void(0);" onClick="popupWindow('/jsp/targetViewInformation.jsp','TargetViewInfo','700','500','no','no');" class="smallModuleTextLink"><%=trigger.getGroup() + trigger.getName()%></a>
</td>
<td width="9%" class="fieldBG" align="left" valign="top" style="padding:2px">
All days
</td>
<td width="6%" class="fieldBG" align="left" valign="top" style="padding:2px">
<%=(String)trigger.getJobDataMap().get("TriggerTime")%>
</td>
<td width="20%" class="fieldBG" align="left" valign="top" style="padding:2px">
<%=trigger.getDescription()%>
</td>
<td width="12%" class="fieldBG" align="left" valign="top" style="padding:2px">
Jan-22-2010 10:22 AM
</td>
</tr>
<%
}
}
} else {
%>
<tr>
<td colspan="6" class="fieldBG" width="100%" align="center" valign="top" style="padding:2px">
<b>No Records Found</b>
</td>
</tr>
<%
}
%>
What I really Wants:
1.The jsp contains two radio button using inputs to the iframe ,whether it's onclick works or not. 2.The onclick will work one scenario, it will disable another scenario of depends upon the input of radio buttons.
In the parent page which has the iframe, you may have coded the javascript function popupWindow(...)
I suggest you add a radio button check before you push it to the window like
function popupWindow(........){
if(/*see if the radio is checked*/){
// your code here to open the new window
}
}
精彩评论