general asp and java

Results 1 to 2 of 2

Thread: general asp and java

  1. #1
    Join Date
    Dec 1969

    Default general asp and java

    Hi <BR>Does anyone know of any good tutorials on asp and java ie using the both together so <BR>Asp calling a java function or java calling an asp function <BR>that kind of thing.. <BR>thanks ;)<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: general asp and java

    I can try to quickly explain it to you there are only a few things to know.<BR><BR>1. When you are using javascript in asp you are still using asp. You&#039ve just changed your scripting language. By default asp supports 2 scripting languages vbscript/javascript. You can install activeperl and get perlscript also. ( perl in asp? yup). Its still asp because you get the same 5 objects response,request,application,session,server. And other reasons of course. <BR><BR>2. vbscript can call javascript functions (see below) and visa versa. however you cannot call vbscript or jscript functions from perlscript but you can call perlscript functions from vbscript/javascript. Dont ask me why.<BR><BR>3. You cannot share variables between any of the scripting languages. Its impossible each script block will all need there own predefined connection object etc etc. The only way you can get data between languages is to get a return value from a function. Also you can pass your connection and recordset objects to functions.....<BR><BR>examples:<BR><BR>&#060;scrip t language = javascript runat=server&#062;<BR> function sum(intVal1,intVal2){<BR> var sum = intVal1 + intVal2<BR> return sum <BR> }<BR>&#060;/script&#062;<BR><BR><BR>&#039you can use the &#060;%%&#062; with vbscript if its default. it normally is. Im going to continue to use the script tags<BR><BR>&#060;script language=vbscript runat=server&#062; <BR> sumOftwoVals = sum(1,2) &#039 our jsfunction works we can only nab the return val though.<BR>&#060;/script&#062;<BR><BR>Also keep in mind that you can pass objects through a recordset and return them. Thats one way to return recordsets between languages. <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts