How to pass parameters from ASP to HTML?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to pass parameters from ASP to HTML?

  1. #1
    Hema Guest

    How to pass parameters from ASP to HTML?


    <HTML>
    <HEAD>
    <script language="VBScript">
    sub canceltakeover()
    window.close()
    end sub
    sub savetakeover()
    Msgbox("Data Saved")
    window.close()
    end sub
    sub onload()
    Dim objADORs
    Dim DF
    Dim strServer
    Dim strConnect
    Dim strSQL
    strServer = "http://www2.vddnet.com"
    strConnect = "Provider=MSDAORA.1;User ID=vdba;password=akimbo;Data
    Source=stvdb1dev"
    strSQL = "Select Additional_commission_desc from quotemch where
    quote_no=13965"
    Set DF = RDS1.CreateObject("RDSServer.DataFactory", strServer)
    Set objADORs = DF.Query(strConnect, strSQL)
    RDS.Server = strServer
    RDS.SQL = strSQL
    RDS.Connect = strConnect
    RDS.Refresh
    end sub
    </script>
    </HEAD>
    <BODY onload="onload()">
    <!-- RDS.DataSpace ID RDS1-->
    <OBJECT ID="RDS1" WIDTH=1 HEIGHT=1
    CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E36">
    </OBJECT>

    <!-- RDS.DataControl with parameters
    set at run time -->
    <OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
    ID=RDS WIDTH=1 HEIGHT=1>
    </OBJECT>

    <FORM>
    <TABLE DATASRC=#RDS>

    <TR>
    <TD>
    <textarea DATAFLD="Additional_commission_desc" name="htmlcode1" value="option_textarea"
    rows=5 cols=50></textarea>
    </TD>
    </TR>
    <TABLE>
    <TR>
    <TD><INPUT TYPE="submit" VALUE="SAVE" NAME="submit1" onclick="savetakeover()"></TD>
    <TD><INPUT TYPE="submit" VALUE="CANCEL" NAME="submit2" onclick="canceltakeover()"></TD>
    </TR>
    </TABLE>
    </TABLE>
    </FORM>
    </BODY>
    </HTML>

    *********************************
    function popupPage() {
    var page = "popup.html";
    windowprops = "height=250,width=500,location=no,left=200,top=150"
    + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
    window.open(page, "Popup", windowprops);
    }
    function closeWindow() {
    window.parent.close();
    }
    **********************************
    <INPUT name="ChangesDesc" id="ChangesDesc" align=left style="FONT-SIZE:
    smaller; LEFT: 72px; WIDTH: 40px; TOP: 0px; HEIGHT: 24px" onclick="return
    popupPage()" type=button value=Desc >
    **********************************
    How to pass parameters from ASP to HTML where I am talking to database?



  2. #2
    Sachin Guest

    Re: How to pass parameters from ASP to HTML?

    hi
    do something like:-
    jsVar = <%=ASPVar%>;
    cheers
    Sachin
    "Hema " <hemakumar65@hotmail.com> wrote in message
    news:3ae44d49$1@news.devx.com...
    >
    > <HTML>
    > <HEAD>
    > <script language="VBScript">
    > sub canceltakeover()
    > window.close()
    > end sub
    > sub savetakeover()
    > Msgbox("Data Saved")
    > window.close()
    > end sub
    > sub onload()
    > Dim objADORs
    > Dim DF
    > Dim strServer
    > Dim strConnect
    > Dim strSQL
    > strServer = "http://www2.vddnet.com"
    > strConnect = "Provider=MSDAORA.1;User

    ID=vdba;password=akimbo;Data
    > Source=stvdb1dev"
    > strSQL = "Select Additional_commission_desc from quotemch where
    > quote_no=13965"
    > Set DF = RDS1.CreateObject("RDSServer.DataFactory", strServer)
    > Set objADORs = DF.Query(strConnect, strSQL)
    > RDS.Server = strServer
    > RDS.SQL = strSQL
    > RDS.Connect = strConnect
    > RDS.Refresh
    > end sub
    > </script>
    > </HEAD>
    > <BODY onload="onload()">
    > <!-- RDS.DataSpace ID RDS1-->
    > <OBJECT ID="RDS1" WIDTH=1 HEIGHT=1
    > CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E36">
    > </OBJECT>
    >
    > <!-- RDS.DataControl with parameters
    > set at run time -->
    > <OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
    > ID=RDS WIDTH=1 HEIGHT=1>
    > </OBJECT>
    >
    > <FORM>
    > <TABLE DATASRC=#RDS>
    >
    > <TR>
    > <TD>
    > <textarea DATAFLD="Additional_commission_desc" name="htmlcode1"

    value="option_textarea"
    > rows=5 cols=50></textarea>
    > </TD>
    > </TR>
    > <TABLE>
    > <TR>
    > <TD><INPUT TYPE="submit" VALUE="SAVE" NAME="submit1"

    onclick="savetakeover()"></TD>
    > <TD><INPUT TYPE="submit" VALUE="CANCEL" NAME="submit2"

    onclick="canceltakeover()"></TD>
    > </TR>
    > </TABLE>
    > </TABLE>
    > </FORM>
    > </BODY>
    > </HTML>
    >
    > *********************************
    > function popupPage() {
    > var page = "popup.html";
    > windowprops = "height=250,width=500,location=no,left=200,top=150"
    > + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
    > window.open(page, "Popup", windowprops);
    > }
    > function closeWindow() {
    > window.parent.close();
    > }
    > **********************************
    > <INPUT name="ChangesDesc" id="ChangesDesc" align=left

    style="FONT-SIZE:
    > smaller; LEFT: 72px; WIDTH: 40px; TOP: 0px; HEIGHT: 24px" onclick="return
    > popupPage()" type=button value=Desc >
    > **********************************
    > How to pass parameters from ASP to HTML where I am talking to database?
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center