How can I write this code:
<script type="text/javascript" id="igClientScript"> function showModalWin(w) { var w = $find('<%= modalwindow.ClientID %>'); w.set_windowState($IG.DialogWindowState.Normal); } </script>
in a separate js file?.
Thaks.
HI,
create a file with that code call it WDW.js and add the following script code to your aspx page
<script src="WDW.js" type="text/javascript"></script>
I knew this, but when I call the function from aspx I receveive error "Can't eval WDW...
The call is OK because if I write in WDW.js:
{ alert("OK"); // var w = $find('<%= modalwindow.ClientID %>'); // w.set_windowState($IG.DialogWindowState.Normal); }
it works fine.
It seems like the sintax
$find('<%= modalwindow.ClientID %>'
is not correct out of html code.