외부 자바 스크립트 파일을 호출하려는 공유 웹 파트를 만들고 있습니다. 14 개 \ TEMPLATE의 \ 레이아웃이 CustomJScripts을 \ \ \ 프로그램 파일 \ 공용 Files \ Microsoft Shared \ 웹 서버 확장 함수가 호출 될 때Sharepoint 웹 파트의 외부 Javascript 파일
그 제공 기능은 오류를 찾을 수 없습니다 나는 위치를
C 다음의 파일은 .js 만든 . 자바 스크립트 파일의 위치가 잘못 되었습니까?
protected override void CreateChildControls()
{
Page.ClientScript.RegisterStartupScript(
this.GetType(),
this.ID,
"_spOriginalFormAction = document.forms[0].action;",
true);
ClientScriptManager cs = Page.ClientScript;
if (!cs.IsClientScriptIncludeRegistered("OnMouseOverScript"))
cs.RegisterClientScriptInclude(
this.GetType(),
"OnMouseOverScript",
ResolveUrl("/_layouts/CustomJScripts/MyJS.js"));
}
private void GetData(string strSchCode)
{
Table t = new Table();
TableRow tr = new TableRow();
TableCell tc = new TableCell();
tc.Attributes.Add("onmouseover", "return ShowInfo('AA');");
tr.Controls.Add(tc);
t.Controls.Add(tr);
this.Controls.Add(t);
}
감사 고린 - 마렉 K.을 빠른 회신. 귀하의 코드를 시도했지만 그것도 여전히 다음과 같은 오류를주는 : 마이크로 소프트 JScript 런타임 오류 : 예상 된 객체 – PleaseHelp