How to use jquery+thickbox open the SubForm, and pass the value to parent form
Posted
by
Curie
on Stack Overflow
See other posts from Stack Overflow
or by Curie
Published on 2012-08-31T09:36:23Z
Indexed on
2012/08/31
9:38 UTC
Read the original article
Hit count: 475
jQuery
like this example:
aa.jsp(parent form)
<head>
<script language="javascript" type="text/javascript" src="<%=basePath%>js/jquery-1.7.2.min.js"></script>
<script language="javascript" type="text/javascript" src="<%=basePath%>js/thickbox.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>js/thickbox.css">
</head>
<body>
<a href="bb.jsp?TB_iframe=true&placeValuesBeforeTB_=savedValues&height=400&width=170" title="input value" class="thickbox">
<input type="text" name="txtA" id="txtA"/>
</a>
</body>
I use the js of jquery and thickbox in the head. And apply them. Click txt textbox to open sub page.
bb.jsp(sub form):
<body>
<input type="text" name="txtB" id="txtB">
</body>
There is one textbox txtB in sub page.
How could I type the context in textbox txtB of bb.jsp, and pass the context to parent page of aa.jsp. Then the context will be diaplayed in textbox txtA in parent page.
© Stack Overflow or respective owner