dgrafx
asked on
html() issue
see this:
<script>
$(document).ready(function
$(".closegroup").live("cli
$('#x2').html($('#x1').htm
return false;
});
});
</script>
<a href="" class="closegroup" onclick="return false;">Close</a>
<span id="x1">
<select name="tester" id="tester">
<option value="0">Not Set
<option value="4">4
<option value="5">5
<option value="6">6
</select>
</span><br><br>
<span id="x2" style="border:solid 1px red;">
</span>
select a value from select box then click close
the select box that appears in x2 is reset to not set.
is there a way to retain the value of elements when one does something like this?
keep in mind that this is a real simple ex only and that in real life there would be many form elements.
ASKER
I am aware of WHY - I asked if someone knew of some new fangled function ...
What I actually am doing is removing the specified elements from the form scope.
So my second question is how do I remove from form scope - I can then simply hide().
Then show() and how does one put them back again.
thanks
What I actually am doing is removing the specified elements from the form scope.
So my second question is how do I remove from form scope - I can then simply hide().
Then show() and how does one put them back again.
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i've discovered that values are retained with i.e. 8 (didn't try 7 or ff) but with i.e. 9 values are not retained and i had been testing with 9
i will try disabled - i had assumed that disabled elements were still in the form scope
i'll report back in a few hours
thanks
i will try disabled - i had assumed that disabled elements were still in the form scope
i'll report back in a few hours
thanks
ASKER
ok - you are right is saying that disabled fields are not in the form scope.
so how would one code jquery to disable all form fields within a specific id (<span id="x1">misc form fields</span>)?
thanks
so how would one code jquery to disable all form fields within a specific id (<span id="x1">misc form fields</span>)?
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for all the input
Do you really need to move the elements? I suggest you consider giving the container "display:none" or absolutely positioning it off the left side of the page.