peterdoherty
Well-known member
- Joined
- Feb 24, 2003
- Messages
- 49
Hi there I am having a bit of a problem using Hyperlink columns in ASP. What I want a javascript fo do is when a hyperlink is clickd upon a javascript function s executed. Below is the javascript function and the ASP datagrid hyperlink column that I wish to call the javascript from
<asp:HyperLinkColumn Text="Edit Appointment" Target="_new" DataNavigateUrlField="Appointment_ID" HeaderText="Edit Appointment" NavigateUrl="EditAppointment(3);">
<script language="javascript">
function EditAppointment(Integer id)
{
EditWin = window.open("Appointment.aspx?appointment_id="+id, "EditAppointment", "width = 400, height = 635, top = 100, left = 100, scrollbars = no, directories = no, status= no, toolbar = no, resizable = no");
}
</script>
When the Edit Appointmnet link is clicked on I would like to execute the javascript function EditApppointment and pass in the DataNAvigateURLField. Any ideas??
PS the EditAppointment(3); is only there for testing purposes to actually see if the javascript function will be called on the click of the hyperlink. I was going to move on to how to replace this with the DataBNAvigateURLField later.
<asp:HyperLinkColumn Text="Edit Appointment" Target="_new" DataNavigateUrlField="Appointment_ID" HeaderText="Edit Appointment" NavigateUrl="EditAppointment(3);">
<script language="javascript">
function EditAppointment(Integer id)
{
EditWin = window.open("Appointment.aspx?appointment_id="+id, "EditAppointment", "width = 400, height = 635, top = 100, left = 100, scrollbars = no, directories = no, status= no, toolbar = no, resizable = no");
}
</script>
When the Edit Appointmnet link is clicked on I would like to execute the javascript function EditApppointment and pass in the DataNAvigateURLField. Any ideas??
PS the EditAppointment(3); is only there for testing purposes to actually see if the javascript function will be called on the click of the hyperlink. I was going to move on to how to replace this with the DataBNAvigateURLField later.