Monday, January 28, 2013

Basic Syntax conversion 2


1. Change class name   

document.all("detailChoices").className = "Hidden"  =>      $("#detailChoices").attr("class", "Hidden"); 

2. Make ReadOnly

frmPayment.MethodOfPayment.readonly = True  =>         $('#MethodOfPayment').attr('readonly', true);

3. Error Handling


VBScript error-handling requires two elements that work together.
You can turn it on with the On Error Resume Next statement and turn it off with On Error GoTo 0.

ex:-

On Error Resume Next
     window.location = “/reports/test.asp”
On Error Go To 0


try {
     window.location = “/reports/test.asp”;
} catch (err) {
}

No comments:

Post a Comment