Hi I have a situation where I call a RadWindow to open using javascript within a user control.
This works fine the first time I call the window to open, however, if I call it again, then I get a javascript error. My code is as follows:
I read somewhere that it has something to do with the ID of the window being opened, so I tried to set the window ID from javascript using the following code:
But this didn't work either. I need the user control to be reusable, so if anyone can tell me where I am going wrong, I would be grateful.
Kind Regards
This works fine the first time I call the window to open, however, if I call it again, then I get a javascript error. My code is as follows:
| <script type="text/javascript" language="javascript"> |
| function openRadWindow() |
| { |
| // Get the Details of the postcode textbox |
| var txt = document.getElementById("<%=txtAppPostcode.ClientID %>").value; |
| if(txt == ''){ |
| alert('A partial address must be entered'); |
| return; |
| } |
| // Open Our Rad Window |
| var oWnd = radopen("pointer.aspx?SearchText=" + txt, "rwPointer" ); |
| oWnd.Skin = "Vista"; |
| oWnd.Center(); |
| document.getElementById("<%=txtAppPostcode.ClientID %>").value = ''; |
| } |
| </script> |
| <script type="text/javascript" language="javascript"> |
| function openRadWindow() |
| { |
| var dt = new Date(); |
| // Get the Details of the postcode textbox |
| var txt = document.getElementById("<%=txtAppPostcode.ClientID %>").value; |
| if(txt == ''){ |
| alert('A partial address must be entered'); |
| return; |
| } |
| // Open Our Rad Window |
| var oWnd = radopen("pointer.aspx?SearchText=" + txt, "rwPointer" ); |
| oWnd.ID = dt.getMilliseconds(); |
| oWnd.Skin = "Vista"; |
| oWnd.Center(); |
| document.getElementById("<%=txtAppPostcode.ClientID %>").value = ''; |
| } |
| </script> |
Kind Regards