Hi There,
I have recently started coding in ASP.NET (less than 2 weeks) and over the last day or 2 I've started using some Javascript. I have created a screen with a table and xx number of rows. All but one of the rows are shown immediately. I only want the row that is not shown to be shown (visible) based on some other data. The Javascript function runs and the row is displayed perfectly. The problem I am then faced with is that when I want to hide the row, a blank 'row' (or something) is left behind so there is the gap between the 2 visible questions. When the hidden row is made visible again, this row is shown above the blank row/line from the previous step. Doing this a few time leads to lots of blank rows/lines in the page.
I know that there has to be a way to get this working properly but with my limited time working with this language, I'm afraid that I am hitting a brink wall here and its probably something that is stupid simple ... :)
Your help will be greatly appreciated
************************************************** **********************************
function checkModelOptions(currentObject,currentDivObject)
{
var currentObject = $(currentObject);
var urlData = $("urlData");
var getContainer = currentObject.parentNode.parentNode.parentNode;
// Hide the ModelOptionsQuestion field immediately. Let the process below determine whether it should be shown
$("modelOptionsQuestion").style.display='none';
var optionContainer = $(currentDivObject);
optionContainer.hide();
if(currentObject.value != "")
{
var newUrl = "";
newUrl = getLocation() + "xxxxxxxxxx/Table.aspx?typeOfLookup=checkModelOptions&" + getDecendantsValues(getContainer);
newUrl += "¤tDivObject="+currentDivObject;
urlData.value = newUrl;
loadXMLDoc(newUrl, "");
}
}
************************************************** **********************************
************************************************** **********************************
case "checkModelOptions":
enableModelOptions(jsonObject);
break;
************************************************** **********************************
************************************************** **********************************
function enableModelOptions(jsonObject)
{
$("modelOptionsQuestion").style.display='block';
}
************************************************** **********************************