|
| |||||||||
| Tags: asp, asp page, java, jscript, vbscript |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to interaction VBScript and JScript in ASP page
Hi all, I am using ASP for web development in my new project. The need to use scripting language used by the current rewrite those scripts? Or, is it possible to call in a scripting language built-in functions other scripting languages? I want to know how to make the ASP applications, VBScript and JScript scripting scripts interact in order to maximize access to the characteristics of the two scripting languages support. check and reply. |
|
#2
| ||||
| ||||
| How to interaction VBScript and JScript in ASP page
In the VBScript and JScript, there are a large number of built-in function is the same or similar. However, in a scripting language built-in functions are not always in another scripting language also has the corresponding function. For example, VBScript provides a number of strings and formatting of data for the operation of the functions that does not exist in the JScript. These functions include StrReverse (), Filter (), as well as FormatCurrency () and so on. On the other hand, JScript provides for the management of an array, the string functions in VBScript code, etc. is also not defined, such as join (), reverse (), pow (), bit manipulation, escape () and unescape () and so on. check and reply. |
|
#3
| ||||
| ||||
| How to interaction VBScript and JScript in ASP page
If you need to call a VBScript script JScript built-in functions, you should write a VBScript user defined function, and then call the utility as the JScript script like JScript function calls the user-defined functions. For example, if you want to call VBSCript built-in function is FormatCurrency (), you can state the following custom function: Code: <SCRIPT LANGUAGE = "VBSCRIPT" RUNAT = "SERVER"> Function FormatValue (Value) FormatValue = FormatCurrency (Value) End Function </ SCRIPT> |
|
#4
| ||||
| ||||
| How to interaction VBScript and JScript in ASP page
In some cases, mixed-use VBScript and JScript function is very useful, but in different languages to share data between the script may also be useful. To achieve this shared approach is simple: no matter what language is used, as long as the page-level variable declarations can be an arbitrary reference. Using methods similar to the object, you can arbitrarily choose the appropriate language to read, modify attributes or invoke an object method. Of course, the given object's properties and methods to create the object instance is defined by the language. As the previous example VBScript procedure call, when calling from the JScript in a VBScript object with no parameters, the method, its invoke method calls to comply with the rules JScript and vice versa. Check and reply. |
|
#5
| ||||
| ||||
| Re: How to interaction VBScript and JScript in ASP page
VBScript reference from the JScript array is more complex. Although in VBScript, we can directly access the JScript array of related methods and properties, but there is no direct access to the JScript array of individual elements. In other words, we can read VBScript script JScript array length property, as follows: x = myJSArray.length But you can not directly read the individual elements of the array, the following VBScript code is not correct: x = myJSArray (3)
__________________ Grand Theft Auto 4 PC Video Game |
|
#6
| ||||
| ||||
| Re: How to interaction VBScript and JScript in ASP page
Within an ASP project with the flexibility to choose different scripting language has many advantages, these scripts even more interactivity between the developers integrate different languages provided by the built-in functions and other functions has brought more opportunities, but also makes the realization of VBScript can also be used for general-purpose scripting library JScript environment possible. Check and reply. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to interaction VBScript and JScript in ASP page" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Internet Explorer 8: Jscript completion Error | Disha N | Technology & Internet | 5 | 17-02-2011 10:31 AM |
| How to add VBScript code in a page | Aahlaadith | Software Development | 6 | 30-11-2010 12:38 AM |
| Problems Inserting a VBScript into HTML Page? | Viensterrr | Software Development | 4 | 29-01-2010 04:58 PM |
| Image Maps and Browser Detection of JScript | Juan-Carlos | Software Development | 5 | 18-12-2009 06:16 AM |
| Can't Register Jscript and VBscript error 0x80004005 | minepassport | Vista Help | 2 | 05-07-2009 10:28 PM |