javascript in asp.net

  • Thread starter Thread starter niju
  • Start date Start date
N

niju

Hi there
how can i call the function "Business" from the following web control

<asp:radiobutton id="optBussiness" runat="server"
GroupName="Address"></asp:radiobutton>


Here is the javascript
----------------------

function loadIntoElement (id, text)
{
if (document.getElementById)
{
var el = document.getElementById(id);
while (el.hasChildNodes())
el.removeChild(el.lastChild);
el.innerHTML = text;
}
}
function Business()
{
loadIntoElement('BusinessName', 'Business Name: <input
name="txtBusinessName" value="<%= BusinessName %>" size="20"
maxlength=20 value="" class="textbox">');
}



Many Thanks
Niju
 
The JavaScript event is onClick and the whole statement will be something
like optBusiness.Attribute.Add("onClick","Business( );"); noting I don't
remember if using the semicolon to delineate the JavaScript function call
will throw an exception.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
Back
Top