Guru Ji
asked on
Concatenation In Javascript
I have a Function below
function see(sel,sel2)
{
//alert(sel[sel.selectedIn
alert(sel);
alert(sel2);
if (cell.selectedIndex > 0 )
{
sel.originalcolor=sel.styl
sel2.originalcolor=sel2.st
}
if (cell.selectedIndex == 0 )
{
sel.originalcolor=sel.styl
sel2.originalcolor=sel2.st
}
}
sel And sel2 are the id's of the table cell
I am calling this Function like this below
onchange="see('source','so
How I make it To work To it accept source And source1 And use it instead of sel And sel2. I don't want to create more functions as I want to use one and pass different id's when calling the function
where is the onchange called? Can you put the complete code atleast the flow
ASKER
<select onchange="see('source','so urce1')" size="1" class="style16" style="width: 197px" type="text" / size="20" name="num">
<option value="Please Choose">Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
<option value="Please Choose">Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
ASKER
actually here is the full code with id's too
<td id="source" style="width: 89px; height: 26px"><strong><span class="style8">Source:</sp an></stron g></td>
<td id="source1" style="width: 197px; height: 26px">
<select onchange="see('source','so urce1')" size="1" class="style16" style="width: 197px" type="text" / size="20" name="num">
<option value="Please Choose">Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
<td id="source" style="width: 89px; height: 26px"><strong><span class="style8">Source:</sp
<td id="source1" style="width: 197px; height: 26px">
<select onchange="see('source','so
<option value="Please Choose">Please Choose</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.