Hello, I'm not sure where to post this but I'll put it here.
I have a project that has a simple aspx and some ascx.
In these ascx I want to use javascript, at first I simply put the javascript right into the ascx with the script tags.
When doing this I could easy use $find("<%= myControl.ClientID %>") to find the control and use the various clientside methods that the diffrent radcontrols come with.
Now as the project has grown and so has my javascripts I decided to move them to a separate jsfile. And this is where my problem started.
I have a RadScriptManager in my aspx and the aspx has the ascx, but when I try to use $find("<%= myControl.ClientID %>") I get null back.
BUT if I use $find("myControl") then I can find it, the problem with that is that I have to find the genereated name, and If I place my ascx in diffrent parts in the aspx I would have to change this every time.
Why doesn't it work after I moved it to its own js file?
I guess I could move it back, but it's so much better and cleaner to have it in its own js file, that way I can also debugg it and see what happends since I can't do that if I have it in the ascx script tag.
Any help in this matter would be very welcome, I'm guessing I'm missing something here, something that I don't understand.
Thanks
I have a project that has a simple aspx and some ascx.
In these ascx I want to use javascript, at first I simply put the javascript right into the ascx with the script tags.
When doing this I could easy use $find("<%= myControl.ClientID %>") to find the control and use the various clientside methods that the diffrent radcontrols come with.
Now as the project has grown and so has my javascripts I decided to move them to a separate jsfile. And this is where my problem started.
I have a RadScriptManager in my aspx and the aspx has the ascx, but when I try to use $find("<%= myControl.ClientID %>") I get null back.
BUT if I use $find("myControl") then I can find it, the problem with that is that I have to find the genereated name, and If I place my ascx in diffrent parts in the aspx I would have to change this every time.
Why doesn't it work after I moved it to its own js file?
I guess I could move it back, but it's so much better and cleaner to have it in its own js file, that way I can also debugg it and see what happends since I can't do that if I have it in the ascx script tag.
Any help in this matter would be very welcome, I'm guessing I'm missing something here, something that I don't understand.
Thanks