Client Side scripting

Results 1 to 2 of 2

Thread: Client Side scripting

  1. #1
    Join Date
    Dec 1969

    Default Client Side scripting

    Often times I have a mix of server controls and navigation buttons. For instance, I have a listbox to choose an item, then a button next to it which will launch a window to see more information on that item. The listbox is databound. Anyway, the problem is that in order to get the index of the selected item, I need to do something like "form1.listbox.option()". However when the page is rendered and sent to the client, .NET makes up it's own form name since the form is set to runat=server. Anyway to force it to name the form the way I want? Or alternately to get it to rewrite my client side code to it's name?

  2. #2
    Join Date
    Dec 1969

    Default RE: Client Side scripting

    yeah.. whatever ID you use for your form is available through javascript.<BR><BR>&#060;form id="frm" runat="server"/&#062;<BR><BR>To get to it in javascript:<BR><BR>alert(docuemnt.frm)<BR><BR>that will return an [object]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts