the issue is that after I finish moving the items to the order I want them in, any items that were moved loose they're input values when I submit the changes.
each checkbox has an image url set in the value. if I don't rearrange the boxes then the URL stay intact, however if they are moved, only the first URL appears in the submitted array.
function HideDivs(){ if(CountSelectedImages() > 1){
// hide all divs not selected. var divs=document.getElementsByTagName("div") for (var i = 3; i < divs.length; i++) { // skip first 3 divs[i].style.display=divs[i].children[0].children[0].checked?"block":"none"; }
$(".DragDropNotice").text("Drag and Drop images to set display order."); // display notice $('input:checkbox').hide(); // hide all checkboxes after selection
identifies code that should be run once the page is loaded. It should not be nested within a function (HideDivs) as it will not be executed after page-load.
All ids must be unique on the page - you appear to be giving the 3-4 elements the same id.
And your code indicates you have an unclosed div.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
thats not correct. firstly I don't need "$(function()", nested in a javascript function is fine, I don't need it to load on page load. I could use ".click()" if I wanted, but the current function will do fine. second duplicate ids are fine for my purposes and do not effect the PHP form collection. lastly, the closing div tag is just not in the snippet.
firstly I don't need "$(function()", nested in a javascript function is fine, I don't need it to load on page load. I could use ".click()" if I wanted, but the current function will do fine.
Yes I agree, the "$(function()" part of your code will execute fine, but it's totally useless inside of a function that should itself only be run after page load. You could just omit the "$(function()" wrapper.
thats not correct. firstly I don't need "$(function()", nested in a javascript function is fine, I don't need it to load on page load. I could use ".click()" if I wanted, but the current function will do fine. second duplicate ids are fine for my purposes and do not effect the PHP form collection. lastly, the closing div tag is just not in the snippet.
Re the div, this is why I stated "your code indicates..", just in case you hadn't included it. But you obviously don't need my help.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Re the div, this is why I stated "your code indicates..", just in case you hadn't included it. But you obviously don't need my help.
well you haven't actually offered any help in regards to my posted issue. so obviously I'm not missing out on anything from you. maybe if you focused a little more on the issue at hand instead of trying to bring up your post count it might be a little more helpfully.