Side navigation
Ticket #4105: custom1.html
File custom1.html, 2.1 KB (added by htoug, February 10, 2009 01:46PM UTC)
Exmple of the error - reduced to 1 page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da_DK">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" >
<title>scapegoat2.adapt.dk</title>
<script type="text/javascript" src="/awe2public/js/jquery-latest.js"></script>
<script type="text/javascript">
function fieldset_add() {
var me=$(this);
var clone=$('div.customform-fieldsets-new').clone(true).removeClass('customform-fieldsets-new').show().addClass('customform-fieldsets');
var button=$(clone).find('input.add-customform-field:button');
me.before(clone);
button.trigger('click');
}
function field_add() {
var clone=$(this).parent().find('tr.customform-field-new').clone(true).removeClass('customform-field-new').show().addClass('customform-field');
$(this).parent().find('tr.customform-field-new').before(clone);
}
$(document).ready(function() {
$('#formsets input.add-customform-fieldset:button').click(fieldset_add);
$('#formsets input.add-customform-field:button').click(field_add);
// The following line causes the error in IE7 when clone is called in field_add
$('#formsets select').change(function(){ alert('change'); });
});
</script>
<style type="text/css">
.customform-field-new {
background-color: fuchsia;
}
.customform-fieldsets-new {
background-color: yellow;
}
</style>
</head>
<body>
<form name="info" action="#">
<div id="formsets">
<div class="customform-fieldsets-new">
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr class="customform-field-new">
<td>
<input name="field:name" type="text" value="">
</td>
<td>
<select name="field:type">
<option value="">- none -</option>
<option value="string">text</option>
</select>
</td>
</tr>
</tbody>
</table>
<input type="button" class="add-customform-field" value="Add Field" name="add-customform-field">
<br><br>
</div>
<input type="button" class="add-customform-fieldset" value="Add Fieldset" name="add-customform-fieldset"><br>
</div>
</form>
</body>
</html>
Download in other formats:
Original Format
File custom1.html, 2.1 KB (added by htoug, February 10, 2009 01:46PM UTC)
Exmple of the error - reduced to 1 page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da_DK">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" >
<title>scapegoat2.adapt.dk</title>
<script type="text/javascript" src="/awe2public/js/jquery-latest.js"></script>
<script type="text/javascript">
function fieldset_add() {
var me=$(this);
var clone=$('div.customform-fieldsets-new').clone(true).removeClass('customform-fieldsets-new').show().addClass('customform-fieldsets');
var button=$(clone).find('input.add-customform-field:button');
me.before(clone);
button.trigger('click');
}
function field_add() {
var clone=$(this).parent().find('tr.customform-field-new').clone(true).removeClass('customform-field-new').show().addClass('customform-field');
$(this).parent().find('tr.customform-field-new').before(clone);
}
$(document).ready(function() {
$('#formsets input.add-customform-fieldset:button').click(fieldset_add);
$('#formsets input.add-customform-field:button').click(field_add);
// The following line causes the error in IE7 when clone is called in field_add
$('#formsets select').change(function(){ alert('change'); });
});
</script>
<style type="text/css">
.customform-field-new {
background-color: fuchsia;
}
.customform-fieldsets-new {
background-color: yellow;
}
</style>
</head>
<body>
<form name="info" action="#">
<div id="formsets">
<div class="customform-fieldsets-new">
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr class="customform-field-new">
<td>
<input name="field:name" type="text" value="">
</td>
<td>
<select name="field:type">
<option value="">- none -</option>
<option value="string">text</option>
</select>
</td>
</tr>
</tbody>
</table>
<input type="button" class="add-customform-field" value="Add Field" name="add-customform-field">
<br><br>
</div>
<input type="button" class="add-customform-fieldset" value="Add Fieldset" name="add-customform-fieldset"><br>
</div>
</form>
</body>
</html>