Results 1 to 6 of 6

Thread: ASP and jscript

  1. #1

    Default ASP and jscript


    HELP HOW TO:
    1. call a jscript function in ASP
    2. perform record insertiion using jscript

    i have this code running to execute insert sql cmd

    <% @LANGUAGE="jscript" %>

    <%
    //open dns connection
    var strcon="DSNName";
    ocon=Server.CreateObject("ADODB.Connection");
    ocon.Open(strcon);

    //run execute command to insert new record
    ocon.execute("INSERT INTO tblname(fld1,fld2,...) VALUES(val1,val2,...);");
    ocon.close();

    %>


    now since this code is running as ASP file
    im planning to encapsulate the codes to a function and trigger a function call from
    other page where is it will execute record insertion. i rewrite the code to this:


    <% @LANGUAGE="jscript" %>

    <%
    function add(){
    //open dns connection
    var strcon="DSNName";
    ocon=Server.CreateObject("ADODB.Connection");
    ocon.Open(strcon);

    //run execute command to insert new record
    ocon.execute("INSERT INTO tblname(fld1,fld2,...) VALUES(val1,val2,...);");
    ocon.close();
    }
    %>


    but an error return...

  2. #2

    Default Re: ASP and jscript

    may i have the error?

    which part or line bai?


    yeah! bling bling men...abz'

  3. #3

    Default Re: ASP and jscript

    tnx kibs. nasulban na w/ SILENT KILL anyway if you have sample pd i post nlang sa reply. we use ajax and ASP nlang pra sa background process.

  4. #4

    Default Re: ASP and jscript

    Quote Originally Posted by hybrid_X
    tnx kibs. nasulban na w/ SILENT KILL anyway if you have sample pd i post nlang sa reply. we use ajax and ASP nlang pra sa background process.

    hehehe... dili nalang ko oink... mangutana pa man gani ko ni silent kill... bright kaayo ni si silent kill oink... unsa kahay kinaon ani...


    yeah! bling bling men...abz'

  5. #5

    Default Re: ASP and jscript

    kibs kong unsai gi kaon nmo mao pud nang gi kaon ni SK

  6. #6

    Default Re: ASP and jscript

    Quote Originally Posted by hybrid_X
    kibs kong unsai gi kaon nmo mao pud nang gi kaon ni SK

    ahak nimo bai oink... hehe


    yeah! bling bling men...abz'

  7.    Advertisement

Similar Threads

 
  1. For Hire: PROGRAMMERS - ASP and SQL with experience
    By black_vixen in forum Jobs
    Replies: 0
    Last Post: 10-24-2011, 11:53 PM
  2. Looking For: ASP and C# programmers (2 positions available) URGENT
    By dodie in forum Jobs
    Replies: 7
    Last Post: 04-07-2009, 10:38 PM
  3. HOW TO ADD RECORD to database from ASP using jscript
    By hybrid_X in forum Programming
    Replies: 4
    Last Post: 05-22-2007, 04:56 PM
  4. Replies: 5
    Last Post: 04-22-2007, 11:09 PM
  5. Web programming like PHP, ASP, HTML AND FLASH ANIMATIONS
    By michaxze in forum Websites & Multimedia
    Replies: 10
    Last Post: 07-30-2005, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top