Home Notices Documents Classes Download Others Rice
Classes  >  jsexecutor  >  SetSRC(string,string,string)
jsexecutor class : SetSRC(string,string,string) method

Description

It creates a script tag to current page, and sets the src attribute in order to load JavaScript code.

Syntax

jsexecutorInstance.SetSRC(string url, string id, string charSet)

Arguments

ClassNameDescription
stringurlAn url of JavaScript code to be loaded.
stringidA value of id attribute.
stringcharSetAn appropriate encoding name.

Return value

None.

Sample code

1:

jsexecutor jse = new jsexecutor();

2:

string url = "http://somewhere...";

3:

string id = "js"; // An identifier for the script tag to be created.

4:

string charSet = "utf-8";

5:

jse.SetSRC(jsCode, id, charSet);

Notes

This method creates new script tag with id attribute, and sets the src and chaset attribute.

Note for Ver 1.0.0.1

The order of the arguments has been changed.

Links for reference

None.

Copyright © Rice All rights reserved.