Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-writting AutoPostBack Event in JavaScript

Status
Not open for further replies.

mchoudhury

Programmer
Nov 26, 2004
71
GB
Hi Guys,
I've written this function in ASP.NET, it retrive data on the listdown list from the database. The second drop down list depends on the item inserted on the first drop down. Both list are retrived from the database according to users specification. At present i'm doing my function is ASP.NET:
<asp:DropDownList id="txtcurrentsupplier" DataValueField="TelephoneSupplierID" DataTextField="TelephoneSupplierName" Runat="server" AutoPostBack="True">
</asp:DropDownList></DIV>

<DIV>

<asp:DropDownList id=currentsuppliertariff Runat="server" DataValueField="TelephoneCallPlanName" DataTextField="TelephoneCallPlanName"></asp:DropDownList>

As you can see i'm using autopostback. I've been told not to use autopostback as this refreshes the website.
The alternative way to do this sort of stuff is via JavaScript. But i do not have a clue on how to write the function. Can some one direct me on how to write the function. I'm very poor at JavaScript. For more info please take a look at the usage section of the functionality needs to be exactly the same. I'm pretty much sure it was written in JavaScript.

Thanks MAc
 
Javascript cannot directly access a database. The easiest way would be to load all possible information into a page and then use javascript to change the options. See the thread call Chained Listboxes, I believe.

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakesperean sonnet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top