javascript in asp.net

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
 
C

clintonG

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/
 
N

niju

HI there
I again hit the wall. How can i retrive the value of
<input name="txtBusinessName" value="<%= BusinessName %>" size="20"
maxlength=20 value="" class="textbox">');

from code behind page?

Cheers

Niju
 
K

Kevin Spencer

Request.Form("txtBusinessName")

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Paranoia is just a state of mind.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top