I have a GMaps.js file that I wrote which contains a bunch of functions related to the Google Maps API. In my ASP.NET page, I have a link to that file, a body attribute that loads the initialize function in my Javascript file, and a divider with the id of canvas to contain the actual map object.
Here is where I get stuck. I have a Javascript function called getDirections. This contains two strings plus a call to gDirections (Google Maps API). I have a text box and button in my ASP.NET page like this:
<asp:TextBox ID="addressinput" runat="server"></asp:TextBox> <asp:Button ID="gobutton" runat="server" Text="Go!" />
What I am looking for is a way to have the onclick attribute of my button to be tied to a Javascript function in my external Javascript file. I also need a way to allow a variable in my Javascript to be assigned the value of addressinput.Text (the textbox listed above). Is there any possible way to do this?

New Topic/Question
Reply




MultiQuote



|