Reputation: 2911
I'm using this to toggle between two divs using radio buttons.
$(document).ready(function() {
$("#emailDocuments").hide();
$("input[name$='group1']").click(function() {
var test = $(this).val();
$("div.desc").hide();
$("#" + test).show();
});
});
Without the jquery code the div and it's contents are sized correctly. with this jquery the content in the second div is shortened. How can I fix this?
EDIT: more specifically it's the textarea id="txtareaTemplate" that is shrinking in height and the textarea is an html editor using tinyMCE
Email - Verification Request
<div><label><input type="radio" name="group1" value="printFaxDocuments" checked="true">Print/Fax Documents</label>
<label><input type="radio" name="group1" value="emailDocuments" checked="false">Email Documents</label></div>
<div id="printFaxDocuments" class="desc">Print/Fax
<asp:Button ID="btnDisplayLiveLinkDocument" runat="server" Text="Display LiveLink Document"
Width="511px" onclick="btnDisplayLiveLinkDocument_Click" />
</div>
<div id="emailDocuments" class="desc">
<br />
<table>
<tr>
<td align="right"><asp:Label ID="lblTo" runat="server" Text="To:" ></asp:Label></td>
<td><asp:TextBox ID="txtTo" runat="server" Width="550px"></asp:TextBox></td>
</tr>
<tr>
<td align="right"><asp:Label ID="lblFrom" runat="server" Text="From:" Width="120px"></asp:Label></td>
<td><asp:TextBox ID="txtFrom" runat="server" Width="550px"></asp:TextBox></td>
</tr>
<tr>
<td align="right"><asp:Label ID="lblReplyTo" runat="server" Text="Reply To:" Width="120px"></asp:Label></td>
<td><asp:TextBox ID="txtReplyTo" runat="server" Width="550px"></asp:TextBox></td>
</tr>
<tr>
<td align="right"><asp:Label ID="lblSubject" runat="server" Text="Subject:" Width="120px"></asp:Label></td>
<td><asp:TextBox ID="txtSubject" runat="server" Width="550px"></asp:TextBox></td>
</tr>
<tr>
<td align="right">Attachments:</td>
<td>
</td>
</tr>
<tr >
<td></td>
<td><textarea id="txtareaTemplate" name="content" cols="90" rows="30" runat="server" ></textarea></td>
</tr>
<tr><td></td><td align="right"><asp:Button ID="btnSendEmail" runat="server"
Text="Send Email" Width="200px" onclick="btnSendEmail_Click" /><br /><br />
</table>
</div>
</form>
Upvotes: 0
Views: 158
Reputation: 552
This might be a total red herring but you are missing a before you close the table, it is hard to tell if this is the problem with this little asp fragment of code. I hope that this helps.
It seems unlikely to me that it is jQuery problem they tend to be browser flow issues, of course there might be another cause hard to tell.
Upvotes: 1