How to translate value in URL

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default How to translate value in URL

    Hi All,

    I have a nagging problem.
    I try to put a value of the autonumber field of a record into a string
    so it can be read in a new page.
    In the first form I use in HTML the following:

    JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc
    When I open the page I get an error and in the properties I read this:

    http://localhost/Weapon2000/Weapon_related.asp?<%=myAutoNum%>

    Where it should say:
    [url]http://localhost/Weapon2000/Weapon_related.asp?26[/url]

    In ASP code I have written:
    MyAutoNum = Recordset.Fields("txtWID") ---> where txtWID is the autonum field.
    for example 26.

    How do I get the code to return the actual number (26) instead of <%=myAutoNum%>


    This would help a great deal
    Marco
    The Netherlands
    Krechting Guest

  2. Similar Questions and Discussions

    1. Need to translate ID CS2 from English to Spanish
      Can I save my English version so my it can be translated to Spanish in Word and imported back to ID CS2?
    2. The best way to use a textInput to translate a object ?
      Anyone know a easy way to use a text input to translate a object ?
    3. Translate PDF's?
      Is there any way to translate an Adobe PDF docuemnt from one language to an other using software?
    4. please translate
      prototype the new documentation says "this was actionscript1 way of implementing inheritance. If you're using actionscript2, you don't need this...
    5. maths for translate
      does anyone know the real maths behind the 3d translate. I want to take a point in a 3d world then set its rotation in xyz, then finally move...
  3. #2

    Default Re: How to translate value in URL

    "Krechting" wrote:
    : Hi All,
    :
    : I have a nagging problem.
    : I try to put a value of the autonumber field of a record into a string
    : so it can be read in a new page.
    : In the first form I use in HTML the following:
    :
    : JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc
    : When I open the page I get an error and in the properties I read this:
    :
    : http://localhost/Weapon2000/Weapon_related.asp?<%=myAutoNum%>
    :
    : Where it should say:
    : [url]http://localhost/Weapon2000/Weapon_related.asp?26[/url]
    :
    : In ASP code I have written:
    : MyAutoNum = Recordset.Fields("txtWID") ---> where txtWID is the autonum
    field.
    : for example 26.
    :
    : How do I get the code to return the actual number (26) instead of
    <%=myAutoNum%>

    What is the error?

    --
    Roland

    This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose.

    -Technet Script Center-
    [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    -MSDN Library-
    [url]http://msdn.microsoft.com/library/default.asp[/url]


    Roland Hall Guest

  4. #3

    Default Re: How to translate value in URL

    Roland,

    The problem is that there is no way I can get the right value in my URL
    so it can be read by the other page.
    While writing:
    JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc

    I expect that the part were it says: <%=myAutoNum%> will be translated into
    the value being 26. But it doesn't. In the next page it will simply say
    <%=myAutoNum%>. What do I need in the window.open stuff to get a number on
    the other side?

    MArco

    "Roland Hall" <nobody@nowhere> wrote in message news:<OXusALr0DHA.2448@TK2MSFTNGP12.phx.gbl>...
    > "Krechting" wrote:
    > : Hi All,
    > :
    > : I have a nagging problem.
    > : I try to put a value of the autonumber field of a record into a string
    > : so it can be read in a new page.
    > : In the first form I use in HTML the following:
    > :
    > : JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc
    > : When I open the page I get an error and in the properties I read this:
    > :
    > : http://localhost/Weapon2000/Weapon_related.asp?<%=myAutoNum%>
    > :
    > : Where it should say:
    > : [url]http://localhost/Weapon2000/Weapon_related.asp?26[/url]
    > :
    > : In ASP code I have written:
    > : MyAutoNum = Recordset.Fields("txtWID") ---> where txtWID is the autonum
    > field.
    > : for example 26.
    > :
    > : How do I get the code to return the actual number (26) instead of
    > <%=myAutoNum%>
    >
    > What is the error?
    >
    > --
    > Roland
    >
    > This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose.
    >
    > -Technet Script Center-
    > [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    > -MSDN Library-
    > [url]http://msdn.microsoft.com/library/default.asp[/url]
    Krechting Guest

  5. #4

    Default Re: How to translate value in URL

    "Krechting" wrote:
    : Roland,
    :
    : The problem is that there is no way I can get the right value in my URL
    : so it can be read by the other page.
    : While writing:
    : JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc
    :
    : I expect that the part were it says: <%=myAutoNum%> will be translated
    into
    : the value being 26. But it doesn't. In the next page it will simply say
    : <%=myAutoNum%>. What do I need in the window.open stuff to get a number on
    : the other side?
    ok... I'm assuming there is no error. You're just not getting the right
    result.

    These all work:

    Ex.

    <%@ Language=VBScript %>
    <% Option Explicit
    dim MyAutoNum
    MyAutoNum = 26
    %>
    <script type="text/javascript">
    document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    </script>
    <html>
    <body>
    MyAutoNum = <%=MyAutoNum%><br />
    <a
    href="JavaScript:window.open('Weapon_related.asp?< %=myAutoNum%>','winname')"
    >click me</a>
    </body>
    </html>

    What do you see here that is different than what you're doing?
    If nothing, then try putting a response.write(MyAutoNum) after you assign
    the recordset.field value and see what you get?
    Are you supposed to be using:

    MyAutoNum = Recordset.Fields("txtWID").Value

    One other thing I saw, unless it was mistyped in here:
    ASP: MyAutoNum
    JS: myAutoNum
    window.open: myAutoNum

    ASP is not case-sensitive but if you're seeing myAutoNum instead of
    MyAutoNum, then the error is somewhere in the HTML or JS call.

    --
    Roland

    This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose.

    -Technet Script Center-
    [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    -MSDN Library-
    [url]http://msdn.microsoft.com/library/default.asp[/url]


    Roland Hall Guest

  6. #5

    Default Re: How to translate value in URL

    Roland,

    This is what I did but no results.

    <html>
    <head>
    <title>NewPage1</title>
    <%@ Language=VBScript %>
    <% Option Explicit
    dim MyAutoNum
    MyAutoNum = 26
    %>
    <script type="text/javascript">
    document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    </script>
    <script language="JavaScript">
    <!--
    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }

    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }

    function PopUp(url,w,h) {
    var=Text1.Value
    window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    ',height=' + h + ',top=10,left=10');
    }


    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    </head>
    <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    text="#000000" class="CobaltPageBODY">
    <p>
    <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    name="Image1">&nbsp;</p>
    MyAutoNum = <%=MyAutoNum%><br />
    <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    document.MM_returnValue" style="CURSOR: hand"
    href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><img
    alt="Click button to Show Related Equipment" src="related.gif"
    align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    this Record');return document.MM_returnValue"
    href="javascript:window.print()"><img alt="Click button to print
    Record" src="printbutton.gif" align="left" border="0"></a>
    <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue"
    href="javascript:window.print()"></a>&nbsp;</p>
    <p><input id="Submit1" type="submit" value="Query verzenden"
    name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>

    Regards
    MArco

    "Roland Hall" <nobody@nowhere> wrote in message news:<u2Vqept0DHA.2180@TK2MSFTNGP12.phx.gbl>...
    > "Krechting" wrote:
    > : Roland,
    > :
    > : The problem is that there is no way I can get the right value in my URL
    > : so it can be read by the other page.
    > : While writing:
    > : JavaScript:window.open('Weapon_related.asp?<%=myAu toNum%>...... etc
    > :
    > : I expect that the part were it says: <%=myAutoNum%> will be translated
    > into
    > : the value being 26. But it doesn't. In the next page it will simply say
    > : <%=myAutoNum%>. What do I need in the window.open stuff to get a number on
    > : the other side?
    > ok... I'm assuming there is no error. You're just not getting the right
    > result.
    >
    > These all work:
    >
    > Ex.
    >
    > <%@ Language=VBScript %>
    > <% Option Explicit
    > dim MyAutoNum
    > MyAutoNum = 26
    > %>
    > <script type="text/javascript">
    > document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > </script>
    > <html>
    > <body>
    > MyAutoNum = <%=MyAutoNum%><br />
    > <a
    > href="JavaScript:window.open('Weapon_related.asp?< %=myAutoNum%>','winname')"
    > >click me</a>
    > </body>
    > </html>
    >
    > What do you see here that is different than what you're doing?
    > If nothing, then try putting a response.write(MyAutoNum) after you assign
    > the recordset.field value and see what you get?
    > Are you supposed to be using:
    >
    > MyAutoNum = Recordset.Fields("txtWID").Value
    >
    > One other thing I saw, unless it was mistyped in here:
    > ASP: MyAutoNum
    > JS: myAutoNum
    > window.open: myAutoNum
    >
    > ASP is not case-sensitive but if you're seeing myAutoNum instead of
    > MyAutoNum, then the error is somewhere in the HTML or JS call.
    >
    > --
    > Roland
    >
    > This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose.
    >
    > -Technet Script Center-
    > [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    > -MSDN Library-
    > [url]http://msdn.microsoft.com/library/default.asp[/url]
    Krechting Guest

  7. #6

    Default Re: How to translate value in URL

    "Krechting" wrote:

    : <html>
    : <head>
    : <title>NewPage1</title>
    : <%@ Language=VBScript %>
    : <% Option Explicit
    : dim MyAutoNum
    : MyAutoNum = 26
    : %>
    : <script type="text/javascript">
    : document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    : </script>
    : <script language="JavaScript">
    : <!--
    : function MM_callJS(jsStr) { //v2.0
    : return eval(jsStr)
    : }
    :
    : function MM_displayStatusMsg(msgStr) { //v1.0
    : status=msgStr;
    : document.MM_returnValue = true;
    : }
    :
    : function PopUp(url,w,h) {
    : var=Text1.Value
    : window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    : ',height=' + h + ',top=10,left=10');
    : }
    :
    :
    : //-->
    : </script>
    : <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    : </head>
    : <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    : text="#000000" class="CobaltPageBODY">
    : <p>
    : <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    : name="Image1">&nbsp;</p>
    : MyAutoNum = <%=MyAutoNum%><br />
    : <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    : document.MM_returnValue" style="CURSOR: hand"
    :
    href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    g
    : alt="Click button to Show Related Equipment" src="related.gif"
    : align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    : this Record');return document.MM_returnValue"
    : href="javascript:window.print()"><img alt="Click button to print
    : Record" src="printbutton.gif" align="left" border="0"></a>
    : <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    : document.MM_returnValue"
    : href="javascript:window.print()"></a>&nbsp;</p>
    : <p><input id="Submit1" type="submit" value="Query verzenden"
    : name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>

    Marco...

    This goes at the top or you get an error:
    <%@ Language=VBScript %>

    This should be next:
    <% Option Explicit %>

    So, I moved code around a bit from what you listed. I don't have the MM
    routines so I get object errors and you're also not finishing the rest of
    the page but I assume that is to show relevant code and that's fine.
    However, this is the code I used and following is the result (client-side
    source code) from the browser when selecting 'view source'. Look in the
    'result (client-side source code) and you'll see that the values for
    MyAutoNum are correct and show 26 as the value.

    ASP Code:
    <%@ Language=VBScript %>
    <% Option Explicit
    dim MyAutoNum
    MyAutoNum = 26
    %>
    <html>
    <head>
    <title>NewPage1</title>
    <script type="text/javascript">
    document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    </script>
    <script language="JavaScript">
    <!--
    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }

    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }

    function PopUp(url,w,h) {
    var=Text1.Value
    window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    ',height=' + h + ',top=10,left=10');
    }


    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    </head>
    <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    text="#000000" class="CobaltPageBODY">
    <p>
    <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    name="Image1">&nbsp;</p>
    MyAutoNum = <%=MyAutoNum%><br />
    <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    document.MM_returnValue" style="CURSOR: hand"
    href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    g
    alt="Click button to Show Related Equipment" src="related.gif"
    align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    this Record');return document.MM_returnValue"
    href="javascript:window.print()"><img alt="Click button to print
    Record" src="printbutton.gif" align="left" border="0"></a>
    <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue"
    href="javascript:window.print()"></a>&nbsp;</p>
    <p><input id="Submit1" type="submit" value="Query verzenden"
    name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>

    Result (client-side source code):

    <html>
    <head>
    <title>NewPage1</title>
    <script type="text/javascript">
    document.write("MyAutoNum = " + 26 + "<br />");
    </script>
    <script language="JavaScript">
    <!--
    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }

    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }

    function PopUp(url,w,h) {
    var=Text1.Value
    window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    ',height=' + h + ',top=10,left=10');
    }


    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    </head>
    <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    text="#000000" class="CobaltPageBODY">
    <p>
    <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    name="Image1">&nbsp;</p>
    MyAutoNum = 26<br />
    <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    document.MM_returnValue" style="CURSOR: hand"
    href="javascript:PopUp('Weapon_related.asp?WID=26' ,800,500)"><img
    alt="Click button to Show Related Equipment" src="related.gif"
    align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    this Record');return document.MM_returnValue"
    href="javascript:window.print()"><img alt="Click button to print
    Record" src="printbutton.gif" align="left" border="0"></a>
    <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue"
    href="javascript:window.print()"></a>&nbsp;</p>
    <p><input id="Submit1" type="submit" value="Query verzenden"
    name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>

    Your popup also doesn't work and I see errors there.

    1. var=Text1.Value
    This needs a variable name. Ex.
    var someVariable = Text1.value

    I don't have a form to reference so I assume that is part of the code that
    is not present. If you were to pull the value from a form then any of these
    might work:
    var someVariable=document.getElementById("text1").valu e;
    var someVariable=document.all["text1"].value;
    var someVariable=document.forms[0].text1.value;
    var someVariable=document.forms[0].elements[0].text1.value;

    2. Opening a popup window should assign a handle to the window.

    You have:
    window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w + ',height='
    + h + ',top=10,left=10');

    Try:
    var winHandle =
    window.open(url,'winname','resizable=yes,scrollbar s=yes,width='+w+',height='
    +h+',top=10,left=10');

    I don't have certain things to make the page complete and I had to add a
    hidden field so I had something for text1.value but you can see that your
    popup window now works:

    Here is a working link:
    [url]http://rockintheplanet.com/lab/myautonum2.asp[/url]

    Here is the final code I'm working with:

    <%@ Language=VBScript %>
    <% Option Explicit
    dim MyAutoNum
    MyAutoNum = 26
    %>
    <html>
    <head>
    <title>NewPage1</title>
    <script type="text/javascript">
    document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    </script>
    <script language="JavaScript">
    <!--
    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }

    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }

    function PopUp(url,w,h) {
    var someVariable=text1.value;
    var
    winHandle=window.open(url,'winname','resizable=yes ,scrollbars=yes,width=' +
    w + ',height=' + h + ',top=10,left=10');
    }

    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    </head>
    <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    text="#000000" class="CobaltPageBODY">
    <p>
    <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    name="Image1">&nbsp;</p>
    MyAutoNum = <%=MyAutoNum%><br />
    <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    document.MM_returnValue" style="CURSOR: hand"
    href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    g alt="Click button to Show Related Equipment" src="related.gif"
    align="left" border="0"></a>
    <a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue" href="javascript:window.print()"><img alt="Click
    button to print Record" src="printbutton.gif" align="left" border="0"></a>
    <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue" href="javascript:window.print()"></a>&nbsp;</p>
    <input id="text1" name="text1" type=hidden value="somevalue" />
    <p><input id="Submit1" type="submit" value="Query verzenden" name="Submit1"
    onClick="location.href='Weapon_related.asp?WID=26' "></p>

    --
    Roland

    This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose.

    -Technet Script Center-
    [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    -MSDN Library-
    [url]http://msdn.microsoft.com/library/default.asp[/url]


    Roland Hall Guest

  8. #7

    Default Re: How to translate value in URL

    Roland,

    Tnx for the code but I still can't get it to work.
    I really don't know whats going wrong.
    I will post here my complete code, maybe you can see what the failure
    is.

    First my HTML code:

    <%@ Language=VBScript %>
    <% Option Explicit
    dim MyAutoNum
    MyAutoNum = 26
    %>
    <html>
    <head>
    <title>NewPage1</title>
    <script type="text/javascript">
    document.write("MyAutoNum = " + <%=MyAutoNum%> + "<br />");
    </script>
    <script language="JavaScript">
    <!--
    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }

    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }

    function PopUp(url,w,h) {
    var somevariable=Text1.Value
    window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    ',height=' + h + ',top=10,left=10');
    }


    //-->
    </script>
    <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    </head>
    <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    text="#000000" class="CobaltPageBODY">
    <p>
    <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    name="Image1">&nbsp;</p>
    MyAutoNum = <%=MyAutoNum%><br />
    <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    document.MM_returnValue" style="CURSOR: hand"
    href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)">
    <img alt="Click button to Show Related Equipment" src="related.gif"
    align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    this Record');return document.MM_returnValue"
    href="javascript:window.print()">
    <img alt="Click button to print Record" src="printbutton.gif"
    align="left" border="0"></a>
    <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    document.MM_returnValue"
    href="javascript:window.print()"></a>&nbsp;</p>
    <p><input id="Submit1" type="submit" value="Query verzenden"
    name="Submit1" onClick="location.href='Weapon_related.asp?WID=<%= myAutoNum%>'"></p>


    <p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font
    class="CobaltFormHeaderFont">General
    Information</font>
    <table class="CobaltFormTABLE" cellpadding="3" border="0">
    <!-- BEGIN Error -->
    <tr>
    <td class="CobaltErrorDataTD" colspan="4">{Error}</td>
    </tr>
    <!-- END Error -->
    <tr>
    <td class="CobaltFieldCaptionTD" nowrap>Name&nbsp;</td>
    <td class="CobaltDataTD"><input class="CobaltInput" style="WIDTH:
    300px; HEIGHT: 20px" maxlength="100" size="40" value="{TextBox1}"
    name="{TextBox1_Name}"></td>
    <td class="CobaltDataTD" colspan="2"
    bordercolor="#006699">&nbsp;<img id="Image2" height="250"
    alt="{txtImagePathAndFile}" src="{txtImagePathAndFile}" width="400"
    border="1" name="Image2"></td>
    <!-- <td class="CobaltDataTD" colspan="2">&nbsp;<img
    id="Image2" height="250" src="Images/Weapon/120mm MR.jpg" width="400"
    name="Image2"></td> -->
    </tr>

    <tr>
    <td class="CobaltFieldCaptionTD" nowrap>Category</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox3}" name="{TextBox3_Name}" style="WIDTH: 300px; HEIGHT:
    20px" size="40"></td>
    <td class="CobaltColumnTD" nowrap>NBC Protection</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    type="checkbox" value="1" name="{CheckBox2_Name}"
    {CheckBox2}>&nbsp;&nbsp;<input type="hidden" name="{txtWID_Name}"
    value="{txtWID}"></td>
    </tr>

    <tr>
    <td class="CobaltFieldCaptionTD" nowrap>Origin</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox4}" name="{TextBox4_Name}" style="WIDTH: 300px; HEIGHT:
    20px" size="39"></td>
    <td class="CobaltColumnTD">Amphibious</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    type="checkbox" value="1" name="{CheckBox3_Name}" {CheckBox3}></td>
    </tr>

    <tr>
    <td class="CobaltFieldCaptionTD" nowrap>Task</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox5}" name="{TextBox5_Name}" style="WIDTH: 300px; HEIGHT:
    20px" size="40"></td>
    <td class="CobaltColumnTD">Airportable</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    type="checkbox" value="1" name="{CheckBox4_Name}" {CheckBox4}></td>
    </tr>

    <tr>
    <td class="CobaltFieldCaptionTD" nowrap>Crew&nbsp;</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox2}" name="{TextBox2_Name}" style="WIDTH: 176px; HEIGHT:
    20px" size="24"></td>
    <td class="CobaltFieldCaptionTD" nowrap
    bgcolor="#006699"><strong><font
    color="#ffffff">Alternative</font></strong></td>
    <td class="CobaltDataTD">
    <p align="left"><input class="CobaltInput" style="WIDTH: 252px;
    HEIGHT: 20px" size="34" value="{TextBox6}" name="{TextBox6_Name}"></p>
    </td>
    </tr>

    </table>
    </p>
    <form name="{HTMLFormName}" action="{Action}" method="post"
    title="Show Related Equipment">
    <p><font class="CobaltFormHeaderFont">Weapons</font>&nbsp;<input
    type="hidden" name="{txtImagePathAndFile_Name}"
    value="{txtImagePathAndFile}">
    <table class="CobaltPageBODY" cellpadding="3" width="120"
    border="0">
    <tr>
    <td class="CobaltColumnTD">Calibre</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox7}" name="{TextBox7_Name}" style="WIDTH: 72px; HEIGHT:
    20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>Rate of Fire</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox11}" name="{TextBox11_Name}"></td>
    <td class="CobaltColumnTD" nowrap>Traverse</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox16}" name="{TextBox16_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>Maximum Range</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox8}" name="{TextBox8_Name}" style="WIDTH: 72px; HEIGHT:
    20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>Type of Ammo</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox12}" name="{TextBox12_Name}"></td>
    <td class="CobaltColumnTD" nowrap>Diameter</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox17}" name="{TextBox17_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>Effective Range</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox9}" name="{TextBox9_Name}" style="WIDTH: 72px; HEIGHT:
    20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>Type of Grenade</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox13}" name="{TextBox13_Name}"></td>
    <td class="CobaltColumnTD" nowrap>Penetration</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox18}" name="{TextBox18_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>Maximum
    Altitude&nbsp;&nbsp;</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox10}" name="{TextBox10_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>Type of Fuse</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox14}" name="{TextBox14_Name}"></td>
    <td class="CobaltColumnTD" nowrap>Pressure</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox19}" name="{TextBox19_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td>&nbsp;</td>
    <td class="CobaltPageBODY">&nbsp;</td>
    <td class="CobaltColumnTD" nowrap>Radius of
    Casualties&nbsp;&nbsp;&nbsp;</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox15}" name="{TextBox15_Name}"></td>
    <td class="CobaltColumnTD" nowrap>Main Charge</td>
    <td class="CobaltDataTD"><input class="CobaltInput"
    value="{TextBox20}" name="{TextBox20_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    </table>
    </p>

    <p class="CobaltFormHeaderFont"><strong>Specification s</strong>
    <table width="120" border="0" class="CobaltFormTABLE"
    cellpadding="3">
    <tr>
    <td class="CobaltColumnTD"
    nowrap>&nbsp;Length&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox21}" name="{TextBox21_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;Num of Barrels</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox25}" name="{TextBox25_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Width</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox22}" name="{TextBox22_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;Num of Rotor
    Blades&nbsp;</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox26}" name="{TextBox26_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Height</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox23}" name="{TextBox23_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    <td></td>
    <td>&nbsp;</td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Weight</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox24}" name="{TextBox24_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td></td>
    <td>&nbsp;</td>
    </tr>

    </table>
    </p>

    <p><font class="CobaltFormHeaderFont">Performance</font>
    <table cellpadding="3" width="120" border="0">
    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Speed
    Road&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;
    </td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox27}" name="{TextBox27_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td class="CobaltColumnTD" nowrap>&nbsp;Max Speed Air</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox31}" name="{TextBox31_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Speed Terrain</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox28}" name="{TextBox28_Name}" style="WIDTH: 73px;
    HEIGHT: 20px" size="10"></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;In Water</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    type="checkbox" value="1" name="{CheckBox1_Name}" {CheckBox1}></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;Ceiling</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox32}" name="{TextBox32_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Fuel Capacity</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox29}" name="{TextBox29_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>

    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Cruising Range</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox30}" name="{TextBox30_Name}" style="WIDTH: 72px;
    HEIGHT: 20px" size="10"></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>

    </table>
    </p>

    <p><font class="CobaltFormHeaderFont">Comments</font>
    <table width="120" border="0">
    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Comments</td>
    <td class="CobaltDataTD">&nbsp;<textarea class="CobaltTextarea"
    style="WIDTH: 611px; HEIGHT: 204px" name="{TextArea1_Name}" rows="9"
    cols="86">{TextArea1}</textarea></td>
    </tr>

    </table>
    </p>

    <p>
    <table width="120" border="0" cellpadding="3">
    <tr>
    <td class="CobaltColumnTD" nowrap>&nbsp;Last Changed</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox33}" name="{TextBox33_Name}"></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;At Time</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    style="WIDTH: 81px; HEIGHT: 20px" size="10" value="{TextBox34}"
    name="{TextBox34_Name}"></td>
    <td class="CobaltColumnTD" nowrap>&nbsp;Key</td>
    <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    value="{TextBox35}" name="{TextBox35_Name}" style="WIDTH: 124px;
    HEIGHT: 20px" size="17"></td>
    </tr>

    </table>
    </p>

    <p><!-- END Record NewRecord1 --></p>
    </form>
    <p>&nbsp;</p>
    </body>
    </html>



    And now my ASP code:

    <%
    'Include Common Files @1-D6EDE132
    %>
    <!-- #INCLUDE FILE=".\Common.asp"-->
    <!-- #INCLUDE FILE=".\Cache.asp" -->
    <!-- #INCLUDE FILE=".\Template.asp" -->
    <!-- #INCLUDE FILE=".\Sorter.asp" -->
    <!-- #INCLUDE FILE=".\Navigator.asp" -->
    <%
    'End Include Common Files

    'Initialize Page @1-EBA44E15
    ' Variables
    Dim PathToRoot, ScriptPath
    Dim FileName
    Dim Redirect
    Dim Tpl, HTMLTemplate
    Dim TemplateFileName
    Dim ComponentName
    Dim PathToCurrentPage

    ' Events
    Dim CCSEvents
    Dim CCSEventResult

    ' Connections
    Dim DBConnection1

    ' Page controls
    Dim NewRecord1

    Response.Expires = -1000 'Makes the browser not cache this page
    Response.Buffer = True 'Buffers the content so our Response.Redirect
    will work
    If Session("UserLoggedIn") <> "true" Then
    Response.Redirect("login.asp")
    End If

    Redirect = ""
    TemplateFileName = "Weapon_view.html"
    Set CCSEvents = CreateObject("Scripting.Dictionary")
    PathToCurrentPage = "./"
    FileName = "Weapon_view.asp"
    PathToRoot = "./"
    ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"),
    Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName))
    'End Initialize Page

    'Initialize Objects @1-5AC70396
    Set DBConnection1 = New clsDBConnection1
    DBConnection1.Open

    ' Controls
    Set NewRecord1 = new clsRecordNewRecord1
    NewRecord1.Initialize DBConnection1

    CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing)
    'End Initialize Objects

    'Execute Components @1-3E59D8AB
    NewRecord1.Operation
    'End Execute Components

    'Go to destination page @1-6D35F4FD
    If NOT ( Redirect = "" ) Then
    UnloadPage
    Response.Redirect Redirect
    End If
    'End Go to destination page

    'Initialize HTML Template @1-0155E1BE
    CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing)
    Set HTMLTemplate = new clsTemplate
    Set HTMLTemplate.Cache = TemplatesRepository
    HTMLTemplate.LoadTemplate ScriptPath & TemplateFileName
    Set Tpl = HTMLTemplate.Block("main")
    CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing)
    'End Initialize HTML Template

    'Show Page @1-646421B8
    NewRecord1.Show Tpl
    HTMLTemplate.Parse "main", False
    response.write Replace(HTMLTemplate.GetHTML("main"),"</body>","<center><font
    face=""Arial""><small>Generated with CodeCharge
    Studio</small></font></center></body>")
    'End Show Page

    'Unload Page @1-CB210C62
    UnloadPage
    Set Tpl = Nothing
    Set HTMLTemplate = Nothing
    'End Unload Page

    'UnloadPage Sub @1-B3A76CC6
    Sub UnloadPage()
    CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing)
    If DBConnection1.State = adStateOpen Then _
    DBConnection1.Close
    Set DBConnection1 = Nothing
    Set NewRecord1 = Nothing
    End Sub
    'End UnloadPage Sub

    Class clsRecordNewRecord1 'NewRecord1 Class @3-11C1D1C6

    'NewRecord1 Variables @3-A2807656

    ' Public variables
    Public ComponentName
    Public HTMLFormAction
    Public PressedButton
    Public Errors
    Public FormSubmitted
    Public EditMode
    Public Visible
    Public Recordset
    Public TemplateBlock

    Public CCSEvents
    Private CCSEventResult

    Public InsertAllowed
    Public UpdateAllowed
    Public DeleteAllowed
    Public DataSource
    Public Command
    Public ValidatingControls
    Public Controls

    ' Class variables
    Dim txtWID
    Dim imgTheImage
    Dim TextBox1
    Dim TextBox3
    Dim CheckBox2
    Dim TextBox4
    Dim CheckBox3
    Dim TextBox5
    Dim CheckBox4
    Dim TextBox2
    Dim TextBox6
    Dim txtImagePathAndFile
    Dim TextBox7
    Dim TextBox8
    Dim TextBox9
    Dim TextBox10
    Dim TextBox11
    Dim TextBox12
    Dim TextBox13
    Dim TextBox14
    Dim TextBox15
    Dim TextBox16
    Dim TextBox17
    Dim TextBox18
    Dim TextBox19
    Dim TextBox20
    Dim TextBox21
    Dim TextBox22
    Dim TextBox23
    Dim TextBox24
    Dim TextBox25
    Dim TextBox26
    Dim TextBox27
    Dim TextBox28
    Dim TextBox29
    Dim TextBox30
    Dim TextBox31
    Dim TextBox32
    Dim CheckBox1
    Dim TextBox33
    Dim TextBox34
    Dim TextBox35
    Dim TextArea1

    'End NewRecord1 Variables

    'NewRecord1 Class_Initialize Event @3-68ADD9B7
    Private Sub Class_Initialize()

    Visible = True
    Set Errors = New clsErrors
    Set CCSEvents = CreateObject("Scripting.Dictionary")
    Set DataSource = New clsNewRecord1DataSource
    Set Command = New clsCommand
    InsertAllowed = False
    UpdateAllowed = False
    DeleteAllowed = False
    Dim Method
    Dim OperationMode

    If Visible Then
    OperationMode = Split(Request.QueryString("ccsForm"), ":")
    If UBound(OperationMode) > -1 Then
    FormSubmitted = (OperationMode(0) = "NewRecord1")
    End If
    If UBound(OperationMode) > 0 Then
    EditMode = (OperationMode(1) = "Edit")
    End If
    ComponentName = "NewRecord1"
    Method = IIf(FormSubmitted, ccsPost, ccsGet)
    Set txtWID = CCCreateControl(ccsTextBox, "txtWID", "txtWID",
    ccsText, Empty, CCGetRequestParam("txtWID", Method))
    Set TextBox1 = CCCreateControl(ccsTextBox, "TextBox1", "TextBox1",
    ccsText, Empty, CCGetRequestParam("TextBox1", Method))
    Set TextBox3 = CCCreateControl(ccsTextBox, "TextBox3",
    "TextBox3", ccsText, Empty, CCGetRequestParam("TextBox3", Method))
    Set CheckBox2 = CCCreateControl(ccsCheckBox, "CheckBox2",
    "CheckBox2", ccsBoolean, Array("Yes", "No", Empty),
    CCGetRequestParam("CheckBox2", Method))
    CheckBox2.CheckedValue = True
    CheckBox2.UncheckedValue = False
    Set TextBox4 = CCCreateControl(ccsTextBox, "TextBox4",
    "TextBox4", ccsText, Empty, CCGetRequestParam("TextBox4", Method))
    Set CheckBox3 = CCCreateControl(ccsCheckBox, "CheckBox3",
    "CheckBox3", ccsBoolean, Array("Yes", "No", Empty),
    CCGetRequestParam("CheckBox3", Method))
    CheckBox3.CheckedValue = True
    CheckBox3.UncheckedValue = False
    Set TextBox5 = CCCreateControl(ccsTextBox, "TextBox5",
    "TextBox5", ccsText, Empty, CCGetRequestParam("TextBox5", Method))
    Set CheckBox4 = CCCreateControl(ccsCheckBox, "CheckBox4",
    "CheckBox4", ccsBoolean, Array("Yes", "No", Empty),
    CCGetRequestParam("CheckBox4", Method))
    CheckBox4.CheckedValue = True
    CheckBox4.UncheckedValue = False
    Set TextBox2 = CCCreateControl(ccsTextBox, "TextBox2",
    "TextBox2", ccsText, Empty, CCGetRequestParam("TextBox2", Method))
    Set TextBox6 = CCCreateControl(ccsTextBox, "TextBox6",
    "TextBox6", ccsText, Empty, CCGetRequestParam("TextBox6", Method))
    Set TextBox7 = CCCreateControl(ccsTextBox, "TextBox7",
    "TextBox7", ccsText, Empty, CCGetRequestParam("TextBox7", Method))
    Set TextBox8 = CCCreateControl(ccsTextBox, "TextBox8",
    "TextBox8", ccsText, Empty, CCGetRequestParam("TextBox8", Method))
    Set TextBox9 = CCCreateControl(ccsTextBox, "TextBox9", "TextBox9",
    ccsText, Empty, CCGetRequestParam("TextBox9", Method))
    Set TextBox10 = CCCreateControl(ccsTextBox, "TextBox10",
    "TextBox10", ccsText, Empty, CCGetRequestParam("TextBox10", Method))
    Set TextBox11 = CCCreateControl(ccsTextBox, "TextBox11",
    "TextBox11", ccsText, Empty, CCGetRequestParam("TextBox11", Method))
    Set TextBox12 = CCCreateControl(ccsTextBox, "TextBox12",
    "TextBox12", ccsText, Empty, CCGetRequestParam("TextBox12", Method))
    Set TextBox13 = CCCreateControl(ccsTextBox, "TextBox13",
    "TextBox13", ccsText, Empty, CCGetRequestParam("TextBox13", Method))
    Set TextBox14 = CCCreateControl(ccsTextBox, "TextBox14",
    "TextBox14", ccsText, Empty, CCGetRequestParam("TextBox14", Method))
    Set TextBox15 = CCCreateControl(ccsTextBox, "TextBox15",
    "TextBox15", ccsText, Empty, CCGetRequestParam("TextBox15", Method))
    Set TextBox16 = CCCreateControl(ccsTextBox, "TextBox16",
    "TextBox16", ccsText, Empty, CCGetRequestParam("TextBox16", Method))
    Set TextBox17 = CCCreateControl(ccsTextBox, "TextBox17",
    "TextBox17", ccsText, Empty, CCGetRequestParam("TextBox17", Method))
    Set TextBox18 = CCCreateControl(ccsTextBox, "TextBox18",
    "TextBox18", ccsText, Empty, CCGetRequestParam("TextBox18", Method))
    Set TextBox19 = CCCreateControl(ccsTextBox, "TextBox19",
    "TextBox19", ccsText, Empty, CCGetRequestParam("TextBox19", Method))
    Set TextBox20 = CCCreateControl(ccsTextBox, "TextBox20",
    "TextBox20", ccsText, Empty, CCGetRequestParam("TextBox20", Method))
    Set TextBox21 = CCCreateControl(ccsTextBox, "TextBox21",
    "TextBox21", ccsText, Empty, CCGetRequestParam("TextBox21", Method))
    Set TextBox22 = CCCreateControl(ccsTextBox, "TextBox22",
    "TextBox22", ccsText, Empty, CCGetRequestParam("TextBox22", Method))
    Set TextBox23 = CCCreateControl(ccsTextBox, "TextBox23",
    "TextBox23", ccsText, Empty, CCGetRequestParam("TextBox23", Method))
    Set TextBox24 = CCCreateControl(ccsTextBox, "TextBox24",
    "TextBox24", ccsText, Empty, CCGetRequestParam("TextBox24", Method))
    Set TextBox25 = CCCreateControl(ccsTextBox, "TextBox25",
    "TextBox25", ccsText, Empty, CCGetRequestParam("TextBox25", Method))
    Set TextBox26 = CCCreateControl(ccsTextBox, "TextBox26",
    "TextBox26", ccsText, Empty, CCGetRequestParam("TextBox26", Method))
    Set TextBox27 = CCCreateControl(ccsTextBox, "TextBox27",
    "TextBox27", ccsText, Empty, CCGetRequestParam("TextBox27", Method))
    Set TextBox28 = CCCreateControl(ccsTextBox, "TextBox28",
    "TextBox28", ccsText, Empty, CCGetRequestParam("TextBox28", Method))
    Set TextBox29 = CCCreateControl(ccsTextBox, "TextBox29",
    "TextBox29", ccsText, Empty, CCGetRequestParam("TextBox29", Method))
    Set TextBox30 = CCCreateControl(ccsTextBox, "TextBox30",
    "TextBox30", ccsText, Empty, CCGetRequestParam("TextBox30", Method))
    Set TextBox31 = CCCreateControl(ccsTextBox, "TextBox31",
    "TextBox31", ccsText, Empty, CCGetRequestParam("TextBox31", Method))
    Set TextBox32 = CCCreateControl(ccsTextBox, "TextBox32",
    "TextBox32", ccsText, Empty, CCGetRequestParam("TextBox32", Method))
    Set CheckBox1 = CCCreateControl(ccsCheckBox, "CheckBox1",
    "CheckBox1", ccsBoolean, Array("Yes", "No", Empty),
    CCGetRequestParam("CheckBox1", Method))
    CheckBox1.CheckedValue = True
    CheckBox1.UncheckedValue = False
    Set TextBox33 = CCCreateControl(ccsTextBox, "TextBox33",
    "TextBox33", ccsText, Empty, CCGetRequestParam("TextBox33", Method))
    Set TextBox34 = CCCreateControl(ccsTextBox, "TextBox34",
    "TextBox34", ccsText, Empty, CCGetRequestParam("TextBox34", Method))
    Set TextBox35 = CCCreateControl(ccsTextBox, "TextBox35",
    "TextBox35", ccsText, Empty, CCGetRequestParam("TextBox35", Method))
    Set TextArea1 = CCCreateControl(ccsTextArea, "TextArea1",
    "TextArea1", ccsMemo, Empty, CCGetRequestParam("TextArea1", Method))
    Set txtImagePathAndFile = CCCreateControl(ccsTextBox,
    "txtImagePathAndFile", "txtImagePathAndFile", ccsText, Empty,
    CCGetRequestParam("txtImagePathAndFile", Method))
    Set ValidatingControls = new clsControls
    ValidatingControls.addControls Array(txtWID,TextBox1,
    TextBox3, CheckBox2, TextBox4, CheckBox3, TextBox5, CheckBox4,
    TextBox2, TextBox6, txtImagePathAndFile,TextBox7,TextBox8,TextBox9,Tex tBox10,TextBox11,TextBox12,TextBox13,TextBox14,Tex tBox15,TextBox16,TextBox17,
    TextArea1,TextBox18,TextBox19,TextBox20,TextBox21, TextBox22,TextBox23,TextBox24,TextBox25,TextBox26, TextBox27,TextBox28,TextBox29,TextBox30,TextBox31, TextBox32,TextBox33,TextBox34,TextBox35)
    End If
    End Sub
    'End NewRecord1 Class_Initialize Event

    'NewRecord1 Initialize Method @3-36D27969
    Sub Initialize(objConnection)

    If NOT Visible Then Exit Sub


    Set DataSource.Connection = objConnction
    With DataSource
    End With
    End Sub
    'End NewRecord1 Initialize Method

    'NewRecord1 Class_Terminate Event @3-32B847C9
    Private Sub Class_Terminate()
    Set Errors = Nothing
    End Sub
    'End NewRecord1 Class_Terminate Event

    'NewRecord1 Validate Method @3-26F7CEFE
    Function Validate()
    Dim Validation
    Dim Where
    If EditMode Then
    DataSource.BuildTableWhere
    Where = " AND NOT (" & DataSource.Where & ")"
    End If
    If CInt(CCDLookUp("COUNT(*)", " Weapon INNER JOIN Images ON
    Weapon.WID = Images.IID", "WID=" & DBConnection1.ToSQL(txtWID.Value,
    txtWID.DataType) & Where, DBConnection1)) > 0 Then _
    txtWID.Errors.addError("The value in field txtWID is
    already in database.")
    Validation = ValidatingControls.Validate
    CCSEventResult = CCRaiseEvent(CCSEvents, "OnValidate", Me)
    Validate = Validation And (Errors.Count = 0)
    End Function
    'End NewRecord1 Validate Method

    'NewRecord1 Operation Method @3-0C905987
    Sub Operation()
    If NOT ( Visible AND FormSubmitted ) Then Exit Sub

    End Sub

    'End NewRecord1 Operation Method

    'NewRecord1 Show Method @3-EA05062D
    Sub Show(Tpl)
    Dim i
    Dim arrTitle
    Dim HowMany

    If NOT Visible Then Exit Sub

    CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me)
    Set Recordset = DataSource.Open(Command)
    If Recordset.State = adStateOpen Then
    EditMode = NOT Recordset.EOF
    Else
    EditMode = False
    End If
    HTMLFormAction = FileName & "?" &
    CCAddParam(Request.ServerVariables("QUERY_STRING") , "ccsForm",
    "NewRecord1" & IIf(EditMode, ":Edit", ""))
    Set TemplateBlock = Tpl.Block("Record " & ComponentName)
    TemplateBlock.Variable("HTMLFormName") = ComponentName
    TemplateBlock.Variable("HTMLFormEnctype")
    ="application/x-www-form-urlencoded"
    Set Controls = CCCreateCollection(TemplateBlock, Null,
    ccsParseOverwrite, _
    Array(txtWID,TextBox1, TextBox3, CheckBox2, TextBox4,
    CheckBox3, TextBox5, CheckBox4, TextBox2, TextBox6,
    txtImagePathAndFile, TextBox7, TextBox11, TextBox16, TextBox8,
    TextBox12, TextBox17, TextBox9, TextBox13, TextBox18, TextBox10,
    TextBox14, TextBox19, TextBox15, TextBox20, TextBox21, TextBox25,
    TextBox22, TextBox26, TextBox23, TextBox24, TextBox27, TextBox31,
    TextBox28, CheckBox1, TextBox32, TextBox29, TextBox30, TextArea1,
    TextBox33, TextBox34, TextBox35))
    If EditMode Then
    If Errors.Count = 0 Then
    If Recordset.Errors.Count > 0 Then
    PrintDBError "Record NewRecord1",
    DataSource.Connection.LastSQL, Recordset.Errors.ToString
    ElseIf Not Recordset.EOF Then
    If Not FormSubmitted Then
    txtWID.Value = Recordset.Fields("txtWID")
    TextBox1.Value = Recordset.Fields("TextBox1")
    TextBox3.Value = Recordset.Fields("TextBox3")
    CheckBox2.Value =
    Recordset.Fields("CheckBox2")
    TextBox4.Value = Recordset.Fields("TextBox4")
    CheckBox3.Value =
    Recordset.Fields("CheckBox3")
    TextBox5.Value = Recordset.Fields("TextBox5")
    CheckBox4.Value =
    Recordset.Fields("CheckBox4")
    TextBox2.Value = Recordset.Fields("TextBox2")
    TextBox6.Value = Recordset.Fields("TextBox6")
    HowMany =
    Ubound(Split(Recordset.Fields("txtImagePathAndFile "),"\"))
    arrTitle =
    Split(Recordset.Fields("txtImagePathAndFile"),"\")
    For i = 0 To UBound(arrTitle)
    next
    txtImagePathAndFile.Value = "Images/Weapon/" &
    arrTitle(HowMany)
    TextBox7.Value = Recordset.Fields("TextBox7")
    TextBox11.Value =
    Recordset.Fields("TextBox11")
    TextBox16.Value =
    Recordset.Fields("TextBox16")
    TextBox8.Value = Recordset.Fields("TextBox8")
    TextBox12.Value =
    Recordset.Fields("TextBox12")
    TextBox17.Value =
    Recordset.Fields("TextBox17")
    TextBox9.Value = Recordset.Fields("TextBox9")
    TextBox13.Value =
    Recordset.Fields("TextBox13")
    TextBox18.Value =
    Recordset.Fields("TextBox18")
    TextBox10.Value =
    Recordset.Fields("TextBox10")
    TextBox14.Value =
    Recordset.Fields("TextBox14")
    TextBox19.Value =
    Recordset.Fields("TextBox19")
    TextBox15.Value =
    Recordset.Fields("TextBox15")
    TextBox20.Value =
    Recordset.Fields("TextBox20")
    TextBox21.Value =
    Recordset.Fields("TextBox21")
    TextBox25.Value =
    Recordset.Fields("TextBox25")
    TextBox22.Value =
    Recordset.Fields("TextBox22")
    TextBox26.Value =
    Recordset.Fields("TextBox26")
    TextBox23.Value =
    Recordset.Fields("TextBox23")
    TextBox24.Value =
    Recordset.Fields("TextBox24")
    TextBox27.Value =
    Recordset.Fields("TextBox27")
    TextBox31.Value =
    Recordset.Fields("TextBox31")
    TextBox28.Value =
    Recordset.Fields("TextBox28")
    CheckBox1.Value =
    Recordset.Fields("CheckBox1")
    TextBox32.Value =
    Recordset.Fields("TextBox32")
    TextBox29.Value =
    Recordset.Fields("TextBox29")
    TextBox30.Value =
    Recordset.Fields("TextBox30")
    TextArea1.Value =
    Recordset.Fields("TextArea1")
    TextBox33.Value =
    Recordset.Fields("TextBox33")
    TextBox34.Value =
    Recordset.Fields("TextBox34")
    TextBox35.Value =
    Recordset.Fields("TextBox35")
    End If
    Else
    EditMode = False
    End If
    End If
    End If
    If Not FormSubmitted Then
    End If
    If FormSubmitted Then
    With TemplateBlock.Block("Error")
    .Variable("Error") = ValidatingControls.GetErrors &
    Errors.ToString _
    & DataSource.Errors.ToString
    .Parse False
    End With
    End If
    TemplateBlock.Variable("Action") = HTMLFormAction

    CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me)
    If Visible Then Controls.Show
    End Sub
    'End NewRecord1 Show Method

    End Class 'End NewRecord1 Class @3-A61BA892

    Class clsNewRecord1DataSource 'NewRecord1DataSource Class @3-CFF1314B

    'DataSource Variables @3-589A358D
    Public Errors, Connection, Parameters, CCSEvents

    Public Recordset
    Public SQL, CountSQL, Order, Where, Orders
    Public RecordsCount
    Public PageSize
    Public PageCount
    Public AbsolutePage
    Public Fields
    Dim WhereParameters
    Public AllParamsSet

    Private CurrentOperation
    Private CCSEventResult

    ' Datasource fields
    Public TextBox1
    Public TextBox3
    Public CheckBox2
    Public txtWID
    Public TextBox4
    Public CheckBox3
    Public TextBox5
    Public CheckBox4
    Public TextBox2
    Public TextBox6
    Public txtImagePathAndFile
    Public TextBox7
    Public TextBox11
    Public TextBox16
    Public TextBox8
    Public TextBox12
    Public TextBox17
    Public TextBox9
    Public TextBox13
    Public TextBox18
    Public TextBox10
    Public TextBox14
    Public TextBox19
    Public TextBox15
    Public TextBox20
    Public TextBox21
    Public TextBox25
    Public TextBox22
    Public TextBox26
    Public TextBox23
    Public TextBox24
    Public TextBox27
    Public TextBox31
    Public TextBox28
    Public CheckBox1
    Public TextBox32
    Public TextBox29
    Public TextBox30
    Public TextArea1
    Public TextBox33
    Public TextBox34
    Public TextBox35
    'End DataSource Variables

    'DataSource Class_Initialize Event @3-C043C361
    Private Sub Class_Initialize()

    Set CCSEvents = CreateObject("Scripting.Dictionary")
    Set Fields = New clsFields
    Set Recordset = New clsDataSource
    Set Errors = New clsErrors
    AllParamsSet = True
    Set txtWID = CCCreateField("txtWID", "WID", ccsText, Empty,
    Recordset)
    Set TextBox1 = CCCreateField("TextBox1", "name", ccsText,
    Empty, Recordset)
    Set TextBox3 = CCCreateField("TextBox3", "category", ccsText,
    Empty, Recordset)
    Set CheckBox2 = CCCreateField("CheckBox2", "nbc_protect",
    ccsBoolean, Array("true", "false", Empty), Recordset)
    Set TextBox4 = CCCreateField("TextBox4", "land", ccsText,
    Empty, Recordset)
    Set CheckBox3 = CCCreateField("CheckBox3", "amphebian",
    ccsBoolean, Array("true", "false", Empty), Recordset)
    Set TextBox5 = CCCreateField("TextBox5", "task", ccsText,
    Empty, Recordset)
    Set CheckBox4 = CCCreateField("CheckBox4", "airportable",
    ccsBoolean, Array("true", "false", Empty), Recordset)
    Set TextBox2 = CCCreateField("TextBox2", "crew", ccsText,
    Empty, Recordset)
    Set TextBox6 = CCCreateField("TextBox6", "alternative",
    ccsText, Empty, Recordset)
    Set txtImagePathAndFile = CCCreateField("txtImagePathAndFile",
    "ImagePathAndFile", ccsText, Empty, Recordset)
    Set TextBox7 = CCCreateField("TextBox7", "calibre", ccsText,
    Empty, Recordset)
    Set TextBox11 = CCCreateField("TextBox11", "rate_of_fire",
    ccsText, Empty, Recordset)
    Set TextBox16 = CCCreateField("TextBox16", "traverse",
    ccsText, Empty, Recordset)
    Set TextBox8 = CCCreateField("TextBox8", "range_max", ccsText,
    Empty, Recordset)
    Set TextBox12 = CCCreateField("TextBox12", "type_ammo",
    ccsText, Empty, Recordset)
    Set TextBox17 = CCCreateField("TextBox17", "diameter",
    ccsText, Empty, Recordset)
    Set TextBox9 = CCCreateField("TextBox9", "range_eff", ccsText,
    Empty, Recordset)
    Set TextBox13 = CCCreateField("TextBox13", "type_grenade",
    ccsText, Empty, Recordset)
    Set TextBox18 = CCCreateField("TextBox18", "penetration",
    ccsText, Empty, Recordset)
    Set TextBox10 = CCCreateField("TextBox10", "altitude_max",
    ccsText, Empty, Recordset)
    Set TextBox14 = CCCreateField("TextBox14", "type_fuse",
    ccsText, Empty, Recordset)
    Set TextBox19 = CCCreateField("TextBox19", "pressure",
    ccsText, Empty, Recordset)
    Set TextBox15 = CCCreateField("TextBox15", "radius_casualty",
    ccsText, Empty, Recordset)
    Set TextBox20 = CCCreateField("TextBox20", "charge", ccsText,
    Empty, Recordset)
    Set TextBox21 = CCCreateField("TextBox21", "length", ccsText,
    Empty, Recordset)
    Set TextBox25 = CCCreateField("TextBox25", "num_barrels",
    ccsText, Empty, Recordset)
    Set TextBox22 = CCCreateField("TextBox22", "width", ccsText,
    Empty, Recordset)
    Set TextBox26 = CCCreateField("TextBox26", "num_rotor_blades",
    ccsText, Empty, Recordset)
    Set TextBox23 = CCCreateField("TextBox23", "height", ccsText,
    Empty, Recordset)
    Set TextBox24 = CCCreateField("TextBox24", "weight", ccsText,
    Empty, Recordset)
    Set TextBox27 = CCCreateField("TextBox27", "speed_road",
    ccsText, Empty, Recordset)
    Set TextBox31 = CCCreateField("TextBox31", "max_speed_air",
    ccsText, Empty, Recordset)
    Set TextBox28 = CCCreateField("TextBox28", "speed_terrain",
    ccsText, Empty, Recordset)
    Set CheckBox1 = CCCreateField("CheckBox1", "terrain_water",
    ccsBoolean, Array("true", "false", Empty), Recordset)
    Set TextBox32 = CCCreateField("TextBox32", "ceiling", ccsText,
    Empty, Recordset)
    Set TextBox29 = CCCreateField("TextBox29", "capacity_fuel",
    ccsText, Empty, Recordset)
    Set TextBox30 = CCCreateField("TextBox30", "range_cruise",
    ccsText, Empty, Recordset)
    Set TextBox33 = CCCreateField("TextBox33", "datum_controle",
    ccsDate, Array("dd", "/", "mm", "/", "yyyy", " ", "HH", ":", "nn",
    ":", "ss"), Recordset)
    Set TextBox34 = CCCreateField("TextBox34", "time_controle",
    ccsDate, Array("dd", "/", "mm", "/", "yyyy", " ", "HH", ":", "nn",
    ":", "ss"), Recordset)
    Set TextArea1 = CCCreateField("TextArea1", "comments",
    ccsMemo, Empty, Recordset)
    Set TextBox35 = CCCreateField("TextBox35", "weaponkey", ccsText,
    Empty, Recordset)
    Fields.AddFields Array(txtWID,TextBox1, TextBox3, CheckBox2,
    TextBox4, CheckBox3, TextBox5, CheckBox4, TextBox2, TextBox6,
    txtImagePathAndFile, TextBox7, TextBox11, TextBox16, TextBox8,
    TextBox12, TextBox17, TextBox9, TextBox13, TextBox18, TextBox10,
    TextBox14, TextBox19, TextBox15, TextBox20, TextBox21, TextBox25,
    TextBox22, TextBox26, TextBox23, TextBox24, TextBox27, TextBox31,
    TextBox28, CheckBox1, TextBox32, TextBox29, TextBox30, TextBox33,
    TextBox34, TextBox35, TextArea1)
    Dim eben
    eben = Replace(Request.QueryString,"%20"," ")
    SQL = "SELECT Weapon.*, ImagePathAndFile " & _
    "FROM Weapon INNER JOIN Images ON Weapon.WID = Images.IID"
    CountSQL = "SELECT COUNT(*) " & _
    "FROM Weapon INNER JOIN Images ON Weapon.WID = Images.IID"
    Where = "name = '" & eben & "'"
    Order = "name"

    End Sub
    'End DataSource Class_Initialize Event

    'BuildTableWhere Method @3-98E5A92F
    Public Sub BuildTableWhere()
    End Sub
    'End BuildTableWhere Method

    'Open Method @3-B139FD2D
    Function Open(Cmd)
    Errors.Clear
    Set Recordset.DataSource = Me
    Set Cmd.Connection = Connection
    Cmd.CommandOperation = cmdOpen
    Cmd.PageSize = PageSize
    Cmd.ActivePage = AbsolutePage
    Cmd.CommandType = dsTable
    CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect",
    Me)
    Cmd.SQL = SQL
    Cmd.Where = Where
    Cmd.OrderBy = Order
    If Not AllParamsSet Then
    Set Open = New clsEmptyDataSource
    Exit Function
    End If
    CCSEventResult = CCRaiseEvent(CCSEvents,
    "BeforeExecuteSelect", Me)
    If Errors.Count = 0 And CCSEventResult Then _
    Set Recordset = Cmd.Exec(Errors)
    CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect",
    Me)
    Set Recordset.FieldsCollection = Fields
    Set Open = Recordset
    End Function
    'End Open Method

    'DataSource Class_Terminate Event @3-41B4B08D
    Private Sub Class_Terminate()
    If Recordset.State = adStateOpen Then _
    Recordset.Close
    Set Recordset = Nothing
    Set Parameters = Nothing
    Set Errors = Nothing
    End Sub
    'End DataSource Class_Terminate Event

    End Class 'End NewRecord1DataSource Class @3-A61BA892

    %>




    "Roland Hall" <nobody@nowhere> wrote in message news:<uz7qmTx0DHA.556@TK2MSFTNGP11.phx.gbl>...
    > "Krechting" wrote:
    >
    > : <html>
    > : <head>
    > : <title>NewPage1</title>
    > : <%@ Language=VBScript %>
    > : <% Option Explicit
    > : dim MyAutoNum
    > : MyAutoNum = 26
    > : %>
    > : <script type="text/javascript">
    > : document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > : </script>
    > : <script language="JavaScript">
    > : <!--
    > : function MM_callJS(jsStr) { //v2.0
    > : return eval(jsStr)
    > : }
    > :
    > : function MM_displayStatusMsg(msgStr) { //v1.0
    > : status=msgStr;
    > : document.MM_returnValue = true;
    > : }
    > :
    > : function PopUp(url,w,h) {
    > : var=Text1.Value
    > : window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > : ',height=' + h + ',top=10,left=10');
    > : }
    > :
    > :
    > : //-->
    > : </script>
    > : <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > : </head>
    > : <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > : text="#000000" class="CobaltPageBODY">
    > : <p>
    > : <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > : name="Image1">&nbsp;</p>
    > : MyAutoNum = <%=MyAutoNum%><br />
    > : <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > : document.MM_returnValue" style="CURSOR: hand"
    > :
    > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > g
    > : alt="Click button to Show Related Equipment" src="related.gif"
    > : align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > : this Record');return document.MM_returnValue"
    > : href="javascript:window.print()"><img alt="Click button to print
    > : Record" src="printbutton.gif" align="left" border="0"></a>
    > : <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > : document.MM_returnValue"
    > : href="javascript:window.print()"></a>&nbsp;</p>
    > : <p><input id="Submit1" type="submit" value="Query verzenden"
    > : name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    >
    > Marco...
    >
    > This goes at the top or you get an error:
    > <%@ Language=VBScript %>
    >
    > This should be next:
    > <% Option Explicit %>
    >
    > So, I moved code around a bit from what you listed. I don't have the MM
    > routines so I get object errors and you're also not finishing the rest of
    > the page but I assume that is to show relevant code and that's fine.
    > However, this is the code I used and following is the result (client-side
    > source code) from the browser when selecting 'view source'. Look in the
    > 'result (client-side source code) and you'll see that the values for
    > MyAutoNum are correct and show 26 as the value.
    >
    > ASP Code:
    > <%@ Language=VBScript %>
    > <% Option Explicit
    > dim MyAutoNum
    > MyAutoNum = 26
    > %>
    > <html>
    > <head>
    > <title>NewPage1</title>
    > <script type="text/javascript">
    > document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > </script>
    > <script language="JavaScript">
    > <!--
    > function MM_callJS(jsStr) { //v2.0
    > return eval(jsStr)
    > }
    >
    > function MM_displayStatusMsg(msgStr) { //v1.0
    > status=msgStr;
    > document.MM_returnValue = true;
    > }
    >
    > function PopUp(url,w,h) {
    > var=Text1.Value
    > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > ',height=' + h + ',top=10,left=10');
    > }
    >
    >
    > //-->
    > </script>
    > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > </head>
    > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > text="#000000" class="CobaltPageBODY">
    > <p>
    > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > name="Image1">&nbsp;</p>
    > MyAutoNum = <%=MyAutoNum%><br />
    > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > document.MM_returnValue" style="CURSOR: hand"
    > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > g
    > alt="Click button to Show Related Equipment" src="related.gif"
    > align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > this Record');return document.MM_returnValue"
    > href="javascript:window.print()"><img alt="Click button to print
    > Record" src="printbutton.gif" align="left" border="0"></a>
    > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > document.MM_returnValue"
    > href="javascript:window.print()"></a>&nbsp;</p>
    > <p><input id="Submit1" type="submit" value="Query verzenden"
    > name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    >
    > Result (client-side source code):
    >
    > <html>
    > <head>
    > <title>NewPage1</title>
    > <script type="text/javascript">
    > document.write("MyAutoNum = " + 26 + "<br />");
    > </script>
    > <script language="JavaScript">
    > <!--
    > function MM_callJS(jsStr) { //v2.0
    > return eval(jsStr)
    > }
    >
    > function MM_displayStatusMsg(msgStr) { //v1.0
    > status=msgStr;
    > document.MM_returnValue = true;
    > }
    >
    > function PopUp(url,w,h) {
    > var=Text1.Value
    > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > ',height=' + h + ',top=10,left=10');
    > }
    >
    >
    > //-->
    > </script>
    > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > </head>
    > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > text="#000000" class="CobaltPageBODY">
    > <p>
    > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > name="Image1">&nbsp;</p>
    > MyAutoNum = 26<br />
    > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > document.MM_returnValue" style="CURSOR: hand"
    > href="javascript:PopUp('Weapon_related.asp?WID=26' ,800,500)"><img
    > alt="Click button to Show Related Equipment" src="related.gif"
    > align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > this Record');return document.MM_returnValue"
    > href="javascript:window.print()"><img alt="Click button to print
    > Record" src="printbutton.gif" align="left" border="0"></a>
    > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > document.MM_returnValue"
    > href="javascript:window.print()"></a>&nbsp;</p>
    > <p><input id="Submit1" type="submit" value="Query verzenden"
    > name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    >
    > Your popup also doesn't work and I see errors there.
    >
    > 1. var=Text1.Value
    > This needs a variable name. Ex.
    > var someVariable = Text1.value
    >
    > I don't have a form to reference so I assume that is part of the code that
    > is not present. If you were to pull the value from a form then any of these
    > might work:
    > var someVariable=document.getElementById("text1").valu e;
    > var someVariable=document.all["text1"].value;
    > var someVariable=document.forms[0].text1.value;
    > var someVariable=document.forms[0].elements[0].text1.value;
    >
    > 2. Opening a popup window should assign a handle to the window.
    >
    > You have:
    > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w + ',height='
    > + h + ',top=10,left=10');
    >
    > Try:
    > var winHandle =
    > window.open(url,'winname','resizable=yes,scrollbar s=yes,width='+w+',height='
    > +h+',top=10,left=10');
    >
    > I don't have certain things to make the page complete and I had to add a
    > hidden field so I had something for text1.value but you can see that your
    > popup window now works:
    >
    > Here is a working link:
    > [url]http://rockintheplanet.com/lab/myautonum2.asp[/url]
    >
    > Here is the final code I'm working with:
    >
    > <%@ Language=VBScript %>
    > <% Option Explicit
    > dim MyAutoNum
    > MyAutoNum = 26
    > %>
    > <html>
    > <head>
    > <title>NewPage1</title>
    > <script type="text/javascript">
    > document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > </script>
    > <script language="JavaScript">
    > <!--
    > function MM_callJS(jsStr) { //v2.0
    > return eval(jsStr)
    > }
    >
    > function MM_displayStatusMsg(msgStr) { //v1.0
    > status=msgStr;
    > document.MM_returnValue = true;
    > }
    >
    > function PopUp(url,w,h) {
    > var someVariable=text1.value;
    > var
    > winHandle=window.open(url,'winname','resizable=yes ,scrollbars=yes,width=' +
    > w + ',height=' + h + ',top=10,left=10');
    > }
    >
    > //-->
    > </script>
    > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > </head>
    > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > text="#000000" class="CobaltPageBODY">
    > <p>
    > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > name="Image1">&nbsp;</p>
    > MyAutoNum = <%=MyAutoNum%><br />
    > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > document.MM_returnValue" style="CURSOR: hand"
    > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > g alt="Click button to Show Related Equipment" src="related.gif"
    > align="left" border="0"></a>
    > <a onmouseover="MM_displayStatusMsg('Print this Record');return
    > document.MM_returnValue" href="javascript:window.print()"><img alt="Click
    > button to print Record" src="printbutton.gif" align="left" border="0"></a>
    > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > document.MM_returnValue" href="javascript:window.print()"></a>&nbsp;</p>
    > <input id="text1" name="text1" type=hidden value="somevalue" />
    > <p><input id="Submit1" type="submit" value="Query verzenden" name="Submit1"
    > onClick="location.href='Weapon_related.asp?WID=26' "></p>
    >
    > --
    > Roland
    >
    > This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose.
    >
    > -Technet Script Center-
    > [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    > -MSDN Library-
    > [url]http://msdn.microsoft.com/library/default.asp[/url]
    Krechting Guest

  9. #8

    Default Re: How to translate value in URL

    Roland,

    When you read this I have the code going.
    However in a complete different way.
    What I did is:
    Weapon_related.asp?WID={txtWID}

    Why it was not running the way you suggested I still don't know.
    Maybe you can explain.

    Anyway tnx for all the effort you put in!
    Marco


    [email]m.krechting@chello.nl[/email] (Krechting) wrote in message news:<a71c776d.0401081304.59a4d97a@posting.google. com>...
    > Roland,
    >
    > Tnx for the code but I still can't get it to work.
    > I really don't know whats going wrong.
    > I will post here my complete code, maybe you can see what the failure
    > is.
    >
    > First my HTML code:
    >
    > <%@ Language=VBScript %>
    > <% Option Explicit
    > dim MyAutoNum
    > MyAutoNum = 26
    > %>
    > <html>
    > <head>
    > <title>NewPage1</title>
    > <script type="text/javascript">
    > document.write("MyAutoNum = " + <%=MyAutoNum%> + "<br />");
    > </script>
    > <script language="JavaScript">
    > <!--
    > function MM_callJS(jsStr) { //v2.0
    > return eval(jsStr)
    > }
    >
    > function MM_displayStatusMsg(msgStr) { //v1.0
    > status=msgStr;
    > document.MM_returnValue = true;
    > }
    >
    > function PopUp(url,w,h) {
    > var somevariable=Text1.Value
    > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > ',height=' + h + ',top=10,left=10');
    > }
    >
    >
    > //-->
    > </script>
    > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > </head>
    > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > text="#000000" class="CobaltPageBODY">
    > <p>
    > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > name="Image1">&nbsp;</p>
    > MyAutoNum = <%=MyAutoNum%><br />
    > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > document.MM_returnValue" style="CURSOR: hand"
    > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)">
    > <img alt="Click button to Show Related Equipment" src="related.gif"
    > align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > this Record');return document.MM_returnValue"
    > href="javascript:window.print()">
    > <img alt="Click button to print Record" src="printbutton.gif"
    > align="left" border="0"></a>
    > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > document.MM_returnValue"
    > href="javascript:window.print()"></a>&nbsp;</p>
    > <p><input id="Submit1" type="submit" value="Query verzenden"
    > name="Submit1" onClick="location.href='Weapon_related.asp?WID=<%= myAutoNum%>'"></p>
    >
    >
    > <p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font
    > class="CobaltFormHeaderFont">General
    > Information</font>
    > <table class="CobaltFormTABLE" cellpadding="3" border="0">
    > <!-- BEGIN Error -->
    > <tr>
    > <td class="CobaltErrorDataTD" colspan="4">{Error}</td>
    > </tr>
    > <!-- END Error -->
    > <tr>
    > <td class="CobaltFieldCaptionTD" nowrap>Name&nbsp;</td>
    > <td class="CobaltDataTD"><input class="CobaltInput" style="WIDTH:
    > 300px; HEIGHT: 20px" maxlength="100" size="40" value="{TextBox1}"
    > name="{TextBox1_Name}"></td>
    > <td class="CobaltDataTD" colspan="2"
    > bordercolor="#006699">&nbsp;<img id="Image2" height="250"
    > alt="{txtImagePathAndFile}" src="{txtImagePathAndFile}" width="400"
    > border="1" name="Image2"></td>
    > <!-- <td class="CobaltDataTD" colspan="2">&nbsp;<img
    > id="Image2" height="250" src="Images/Weapon/120mm MR.jpg" width="400"
    > name="Image2"></td> -->
    > </tr>
    >
    > <tr>
    > <td class="CobaltFieldCaptionTD" nowrap>Category</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox3}" name="{TextBox3_Name}" style="WIDTH: 300px; HEIGHT:
    > 20px" size="40"></td>
    > <td class="CobaltColumnTD" nowrap>NBC Protection</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > type="checkbox" value="1" name="{CheckBox2_Name}"
    > {CheckBox2}>&nbsp;&nbsp;<input type="hidden" name="{txtWID_Name}"
    > value="{txtWID}"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltFieldCaptionTD" nowrap>Origin</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox4}" name="{TextBox4_Name}" style="WIDTH: 300px; HEIGHT:
    > 20px" size="39"></td>
    > <td class="CobaltColumnTD">Amphibious</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > type="checkbox" value="1" name="{CheckBox3_Name}" {CheckBox3}></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltFieldCaptionTD" nowrap>Task</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox5}" name="{TextBox5_Name}" style="WIDTH: 300px; HEIGHT:
    > 20px" size="40"></td>
    > <td class="CobaltColumnTD">Airportable</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > type="checkbox" value="1" name="{CheckBox4_Name}" {CheckBox4}></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltFieldCaptionTD" nowrap>Crew&nbsp;</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox2}" name="{TextBox2_Name}" style="WIDTH: 176px; HEIGHT:
    > 20px" size="24"></td>
    > <td class="CobaltFieldCaptionTD" nowrap
    > bgcolor="#006699"><strong><font
    > color="#ffffff">Alternative</font></strong></td>
    > <td class="CobaltDataTD">
    > <p align="left"><input class="CobaltInput" style="WIDTH: 252px;
    > HEIGHT: 20px" size="34" value="{TextBox6}" name="{TextBox6_Name}"></p>
    > </td>
    > </tr>
    >
    > </table>
    > </p>
    > <form name="{HTMLFormName}" action="{Action}" method="post"
    > title="Show Related Equipment">
    > <p><font class="CobaltFormHeaderFont">Weapons</font>&nbsp;<input
    > type="hidden" name="{txtImagePathAndFile_Name}"
    > value="{txtImagePathAndFile}">
    > <table class="CobaltPageBODY" cellpadding="3" width="120"
    > border="0">
    > <tr>
    > <td class="CobaltColumnTD">Calibre</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox7}" name="{TextBox7_Name}" style="WIDTH: 72px; HEIGHT:
    > 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>Rate of Fire</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox11}" name="{TextBox11_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>Traverse</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox16}" name="{TextBox16_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>Maximum Range</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox8}" name="{TextBox8_Name}" style="WIDTH: 72px; HEIGHT:
    > 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>Type of Ammo</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox12}" name="{TextBox12_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>Diameter</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox17}" name="{TextBox17_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>Effective Range</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox9}" name="{TextBox9_Name}" style="WIDTH: 72px; HEIGHT:
    > 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>Type of Grenade</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox13}" name="{TextBox13_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>Penetration</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox18}" name="{TextBox18_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>Maximum
    > Altitude&nbsp;&nbsp;</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox10}" name="{TextBox10_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>Type of Fuse</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox14}" name="{TextBox14_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>Pressure</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox19}" name="{TextBox19_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td>&nbsp;</td>
    > <td class="CobaltPageBODY">&nbsp;</td>
    > <td class="CobaltColumnTD" nowrap>Radius of
    > Casualties&nbsp;&nbsp;&nbsp;</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox15}" name="{TextBox15_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>Main Charge</td>
    > <td class="CobaltDataTD"><input class="CobaltInput"
    > value="{TextBox20}" name="{TextBox20_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > </table>
    > </p>
    >
    > <p class="CobaltFormHeaderFont"><strong>Specification s</strong>
    > <table width="120" border="0" class="CobaltFormTABLE"
    > cellpadding="3">
    > <tr>
    > <td class="CobaltColumnTD"
    > nowrap>&nbsp;Length&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox21}" name="{TextBox21_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Num of Barrels</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox25}" name="{TextBox25_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Width</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox22}" name="{TextBox22_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Num of Rotor
    > Blades&nbsp;</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox26}" name="{TextBox26_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Height</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox23}" name="{TextBox23_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > <td></td>
    > <td>&nbsp;</td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Weight</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox24}" name="{TextBox24_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td></td>
    > <td>&nbsp;</td>
    > </tr>
    >
    > </table>
    > </p>
    >
    > <p><font class="CobaltFormHeaderFont">Performance</font>
    > <table cellpadding="3" width="120" border="0">
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Speed
    > Road&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;
    > </td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox27}" name="{TextBox27_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Max Speed Air</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox31}" name="{TextBox31_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Speed Terrain</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox28}" name="{TextBox28_Name}" style="WIDTH: 73px;
    > HEIGHT: 20px" size="10"></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;In Water</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > type="checkbox" value="1" name="{CheckBox1_Name}" {CheckBox1}></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Ceiling</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox32}" name="{TextBox32_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Fuel Capacity</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox29}" name="{TextBox29_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > </tr>
    >
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Cruising Range</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox30}" name="{TextBox30_Name}" style="WIDTH: 72px;
    > HEIGHT: 20px" size="10"></td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > </tr>
    >
    > </table>
    > </p>
    >
    > <p><font class="CobaltFormHeaderFont">Comments</font>
    > <table width="120" border="0">
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Comments</td>
    > <td class="CobaltDataTD">&nbsp;<textarea class="CobaltTextarea"
    > style="WIDTH: 611px; HEIGHT: 204px" name="{TextArea1_Name}" rows="9"
    > cols="86">{TextArea1}</textarea></td>
    > </tr>
    >
    > </table>
    > </p>
    >
    > <p>
    > <table width="120" border="0" cellpadding="3">
    > <tr>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Last Changed</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox33}" name="{TextBox33_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;At Time</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > style="WIDTH: 81px; HEIGHT: 20px" size="10" value="{TextBox34}"
    > name="{TextBox34_Name}"></td>
    > <td class="CobaltColumnTD" nowrap>&nbsp;Key</td>
    > <td class="CobaltDataTD" nowrap><input class="CobaltInput"
    > value="{TextBox35}" name="{TextBox35_Name}" style="WIDTH: 124px;
    > HEIGHT: 20px" size="17"></td>
    > </tr>
    >
    > </table>
    > </p>
    >
    > <p><!-- END Record NewRecord1 --></p>
    > </form>
    > <p>&nbsp;</p>
    > </body>
    > </html>
    >
    >
    >
    > And now my ASP code:
    >
    > <%
    > 'Include Common Files @1-D6EDE132
    > %>
    > <!-- #INCLUDE FILE=".\Common.asp"-->
    > <!-- #INCLUDE FILE=".\Cache.asp" -->
    > <!-- #INCLUDE FILE=".\Template.asp" -->
    > <!-- #INCLUDE FILE=".\Sorter.asp" -->
    > <!-- #INCLUDE FILE=".\Navigator.asp" -->
    > <%
    > 'End Include Common Files
    >
    > 'Initialize Page @1-EBA44E15
    > ' Variables
    > Dim PathToRoot, ScriptPath
    > Dim FileName
    > Dim Redirect
    > Dim Tpl, HTMLTemplate
    > Dim TemplateFileName
    > Dim ComponentName
    > Dim PathToCurrentPage
    >
    > ' Events
    > Dim CCSEvents
    > Dim CCSEventResult
    >
    > ' Connections
    > Dim DBConnection1
    >
    > ' Page controls
    > Dim NewRecord1
    >
    > Response.Expires = -1000 'Makes the browser not cache this page
    > Response.Buffer = True 'Buffers the content so our Response.Redirect
    > will work
    > If Session("UserLoggedIn") <> "true" Then
    > Response.Redirect("login.asp")
    > End If
    >
    > Redirect = ""
    > TemplateFileName = "Weapon_view.html"
    > Set CCSEvents = CreateObject("Scripting.Dictionary")
    > PathToCurrentPage = "./"
    > FileName = "Weapon_view.asp"
    > PathToRoot = "./"
    > ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"),
    > Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName))
    > 'End Initialize Page
    >
    > 'Initialize Objects @1-5AC70396
    > Set DBConnection1 = New clsDBConnection1
    > DBConnection1.Open
    >
    > ' Controls
    > Set NewRecord1 = new clsRecordNewRecord1
    > NewRecord1.Initialize DBConnection1
    >
    > CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing)
    > 'End Initialize Objects
    >
    > 'Execute Components @1-3E59D8AB
    > NewRecord1.Operation
    > 'End Execute Components
    >
    > 'Go to destination page @1-6D35F4FD
    > If NOT ( Redirect = "" ) Then
    > UnloadPage
    > Response.Redirect Redirect
    > End If
    > 'End Go to destination page
    >
    > 'Initialize HTML Template @1-0155E1BE
    > CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing)
    > Set HTMLTemplate = new clsTemplate
    > Set HTMLTemplate.Cache = TemplatesRepository
    > HTMLTemplate.LoadTemplate ScriptPath & TemplateFileName
    > Set Tpl = HTMLTemplate.Block("main")
    > CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing)
    > 'End Initialize HTML Template
    >
    > 'Show Page @1-646421B8
    > NewRecord1.Show Tpl
    > HTMLTemplate.Parse "main", False
    > response.write Replace(HTMLTemplate.GetHTML("main"),"</body>","<center><font
    > face=""Arial""><small>Generated with CodeCharge
    > Studio</small></font></center></body>")
    > 'End Show Page
    >
    > 'Unload Page @1-CB210C62
    > UnloadPage
    > Set Tpl = Nothing
    > Set HTMLTemplate = Nothing
    > 'End Unload Page
    >
    > 'UnloadPage Sub @1-B3A76CC6
    > Sub UnloadPage()
    > CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing)
    > If DBConnection1.State = adStateOpen Then _
    > DBConnection1.Close
    > Set DBConnection1 = Nothing
    > Set NewRecord1 = Nothing
    > End Sub
    > 'End UnloadPage Sub
    >
    > Class clsRecordNewRecord1 'NewRecord1 Class @3-11C1D1C6
    >
    > 'NewRecord1 Variables @3-A2807656
    >
    > ' Public variables
    > Public ComponentName
    > Public HTMLFormAction
    > Public PressedButton
    > Public Errors
    > Public FormSubmitted
    > Public EditMode
    > Public Visible
    > Public Recordset
    > Public TemplateBlock
    >
    > Public CCSEvents
    > Private CCSEventResult
    >
    > Public InsertAllowed
    > Public UpdateAllowed
    > Public DeleteAllowed
    > Public DataSource
    > Public Command
    > Public ValidatingControls
    > Public Controls
    >
    > ' Class variables
    > Dim txtWID
    > Dim imgTheImage
    > Dim TextBox1
    > Dim TextBox3
    > Dim CheckBox2
    > Dim TextBox4
    > Dim CheckBox3
    > Dim TextBox5
    > Dim CheckBox4
    > Dim TextBox2
    > Dim TextBox6
    > Dim txtImagePathAndFile
    > Dim TextBox7
    > Dim TextBox8
    > Dim TextBox9
    > Dim TextBox10
    > Dim TextBox11
    > Dim TextBox12
    > Dim TextBox13
    > Dim TextBox14
    > Dim TextBox15
    > Dim TextBox16
    > Dim TextBox17
    > Dim TextBox18
    > Dim TextBox19
    > Dim TextBox20
    > Dim TextBox21
    > Dim TextBox22
    > Dim TextBox23
    > Dim TextBox24
    > Dim TextBox25
    > Dim TextBox26
    > Dim TextBox27
    > Dim TextBox28
    > Dim TextBox29
    > Dim TextBox30
    > Dim TextBox31
    > Dim TextBox32
    > Dim CheckBox1
    > Dim TextBox33
    > Dim TextBox34
    > Dim TextBox35
    > Dim TextArea1
    >
    > 'End NewRecord1 Variables
    >
    > 'NewRecord1 Class_Initialize Event @3-68ADD9B7
    > Private Sub Class_Initialize()
    >
    > Visible = True
    > Set Errors = New clsErrors
    > Set CCSEvents = CreateObject("Scripting.Dictionary")
    > Set DataSource = New clsNewRecord1DataSource
    > Set Command = New clsCommand
    > InsertAllowed = False
    > UpdateAllowed = False
    > DeleteAllowed = False
    > Dim Method
    > Dim OperationMode
    >
    > If Visible Then
    > OperationMode = Split(Request.QueryString("ccsForm"), ":")
    > If UBound(OperationMode) > -1 Then
    > FormSubmitted = (OperationMode(0) = "NewRecord1")
    > End If
    > If UBound(OperationMode) > 0 Then
    > EditMode = (OperationMode(1) = "Edit")
    > End If
    > ComponentName = "NewRecord1"
    > Method = IIf(FormSubmitted, ccsPost, ccsGet)
    > Set txtWID = CCCreateControl(ccsTextBox, "txtWID", "txtWID",
    > ccsText, Empty, CCGetRequestParam("txtWID", Method))
    > Set TextBox1 = CCCreateControl(ccsTextBox, "TextBox1", "TextBox1",
    > ccsText, Empty, CCGetRequestParam("TextBox1", Method))
    > Set TextBox3 = CCCreateControl(ccsTextBox, "TextBox3",
    > "TextBox3", ccsText, Empty, CCGetRequestParam("TextBox3", Method))
    > Set CheckBox2 = CCCreateControl(ccsCheckBox, "CheckBox2",
    > "CheckBox2", ccsBoolean, Array("Yes", "No", Empty),
    > CCGetRequestParam("CheckBox2", Method))
    > CheckBox2.CheckedValue = True
    > CheckBox2.UncheckedValue = False
    > Set TextBox4 = CCCreateControl(ccsTextBox, "TextBox4",
    > "TextBox4", ccsText, Empty, CCGetRequestParam("TextBox4", Method))
    > Set CheckBox3 = CCCreateControl(ccsCheckBox, "CheckBox3",
    > "CheckBox3", ccsBoolean, Array("Yes", "No", Empty),
    > CCGetRequestParam("CheckBox3", Method))
    > CheckBox3.CheckedValue = True
    > CheckBox3.UncheckedValue = False
    > Set TextBox5 = CCCreateControl(ccsTextBox, "TextBox5",
    > "TextBox5", ccsText, Empty, CCGetRequestParam("TextBox5", Method))
    > Set CheckBox4 = CCCreateControl(ccsCheckBox, "CheckBox4",
    > "CheckBox4", ccsBoolean, Array("Yes", "No", Empty),
    > CCGetRequestParam("CheckBox4", Method))
    > CheckBox4.CheckedValue = True
    > CheckBox4.UncheckedValue = False
    > Set TextBox2 = CCCreateControl(ccsTextBox, "TextBox2",
    > "TextBox2", ccsText, Empty, CCGetRequestParam("TextBox2", Method))
    > Set TextBox6 = CCCreateControl(ccsTextBox, "TextBox6",
    > "TextBox6", ccsText, Empty, CCGetRequestParam("TextBox6", Method))
    > Set TextBox7 = CCCreateControl(ccsTextBox, "TextBox7",
    > "TextBox7", ccsText, Empty, CCGetRequestParam("TextBox7", Method))
    > Set TextBox8 = CCCreateControl(ccsTextBox, "TextBox8",
    > "TextBox8", ccsText, Empty, CCGetRequestParam("TextBox8", Method))
    > Set TextBox9 = CCCreateControl(ccsTextBox, "TextBox9", "TextBox9",
    > ccsText, Empty, CCGetRequestParam("TextBox9", Method))
    > Set TextBox10 = CCCreateControl(ccsTextBox, "TextBox10",
    > "TextBox10", ccsText, Empty, CCGetRequestParam("TextBox10", Method))
    > Set TextBox11 = CCCreateControl(ccsTextBox, "TextBox11",
    > "TextBox11", ccsText, Empty, CCGetRequestParam("TextBox11", Method))
    > Set TextBox12 = CCCreateControl(ccsTextBox, "TextBox12",
    > "TextBox12", ccsText, Empty, CCGetRequestParam("TextBox12", Method))
    > Set TextBox13 = CCCreateControl(ccsTextBox, "TextBox13",
    > "TextBox13", ccsText, Empty, CCGetRequestParam("TextBox13", Method))
    > Set TextBox14 = CCCreateControl(ccsTextBox, "TextBox14",
    > "TextBox14", ccsText, Empty, CCGetRequestParam("TextBox14", Method))
    > Set TextBox15 = CCCreateControl(ccsTextBox, "TextBox15",
    > "TextBox15", ccsText, Empty, CCGetRequestParam("TextBox15", Method))
    > Set TextBox16 = CCCreateControl(ccsTextBox, "TextBox16",
    > "TextBox16", ccsText, Empty, CCGetRequestParam("TextBox16", Method))
    > Set TextBox17 = CCCreateControl(ccsTextBox, "TextBox17",
    > "TextBox17", ccsText, Empty, CCGetRequestParam("TextBox17", Method))
    > Set TextBox18 = CCCreateControl(ccsTextBox, "TextBox18",
    > "TextBox18", ccsText, Empty, CCGetRequestParam("TextBox18", Method))
    > Set TextBox19 = CCCreateControl(ccsTextBox, "TextBox19",
    > "TextBox19", ccsText, Empty, CCGetRequestParam("TextBox19", Method))
    > Set TextBox20 = CCCreateControl(ccsTextBox, "TextBox20",
    > "TextBox20", ccsText, Empty, CCGetRequestParam("TextBox20", Method))
    > Set TextBox21 = CCCreateControl(ccsTextBox, "TextBox21",
    > "TextBox21", ccsText, Empty, CCGetRequestParam("TextBox21", Method))
    > Set TextBox22 = CCCreateControl(ccsTextBox, "TextBox22",
    > "TextBox22", ccsText, Empty, CCGetRequestParam("TextBox22", Method))
    > Set TextBox23 = CCCreateControl(ccsTextBox, "TextBox23",
    > "TextBox23", ccsText, Empty, CCGetRequestParam("TextBox23", Method))
    > Set TextBox24 = CCCreateControl(ccsTextBox, "TextBox24",
    > "TextBox24", ccsText, Empty, CCGetRequestParam("TextBox24", Method))
    > Set TextBox25 = CCCreateControl(ccsTextBox, "TextBox25",
    > "TextBox25", ccsText, Empty, CCGetRequestParam("TextBox25", Method))
    > Set TextBox26 = CCCreateControl(ccsTextBox, "TextBox26",
    > "TextBox26", ccsText, Empty, CCGetRequestParam("TextBox26", Method))
    > Set TextBox27 = CCCreateControl(ccsTextBox, "TextBox27",
    > "TextBox27", ccsText, Empty, CCGetRequestParam("TextBox27", Method))
    > Set TextBox28 = CCCreateControl(ccsTextBox, "TextBox28",
    > "TextBox28", ccsText, Empty, CCGetRequestParam("TextBox28", Method))
    > Set TextBox29 = CCCreateControl(ccsTextBox, "TextBox29",
    > "TextBox29", ccsText, Empty, CCGetRequestParam("TextBox29", Method))
    > Set TextBox30 = CCCreateControl(ccsTextBox, "TextBox30",
    > "TextBox30", ccsText, Empty, CCGetRequestParam("TextBox30", Method))
    > Set TextBox31 = CCCreateControl(ccsTextBox, "TextBox31",
    > "TextBox31", ccsText, Empty, CCGetRequestParam("TextBox31", Method))
    > Set TextBox32 = CCCreateControl(ccsTextBox, "TextBox32",
    > "TextBox32", ccsText, Empty, CCGetRequestParam("TextBox32", Method))
    > Set CheckBox1 = CCCreateControl(ccsCheckBox, "CheckBox1",
    > "CheckBox1", ccsBoolean, Array("Yes", "No", Empty),
    > CCGetRequestParam("CheckBox1", Method))
    > CheckBox1.CheckedValue = True
    > CheckBox1.UncheckedValue = False
    > Set TextBox33 = CCCreateControl(ccsTextBox, "TextBox33",
    > "TextBox33", ccsText, Empty, CCGetRequestParam("TextBox33", Method))
    > Set TextBox34 = CCCreateControl(ccsTextBox, "TextBox34",
    > "TextBox34", ccsText, Empty, CCGetRequestParam("TextBox34", Method))
    > Set TextBox35 = CCCreateControl(ccsTextBox, "TextBox35",
    > "TextBox35", ccsText, Empty, CCGetRequestParam("TextBox35", Method))
    > Set TextArea1 = CCCreateControl(ccsTextArea, "TextArea1",
    > "TextArea1", ccsMemo, Empty, CCGetRequestParam("TextArea1", Method))
    > Set txtImagePathAndFile = CCCreateControl(ccsTextBox,
    > "txtImagePathAndFile", "txtImagePathAndFile", ccsText, Empty,
    > CCGetRequestParam("txtImagePathAndFile", Method))
    > Set ValidatingControls = new clsControls
    > ValidatingControls.addControls Array(txtWID,TextBox1,
    > TextBox3, CheckBox2, TextBox4, CheckBox3, TextBox5, CheckBox4,
    > TextBox2, TextBox6, txtImagePathAndFile,TextBox7,TextBox8,TextBox9,Tex tBox10,TextBox11,TextBox12,TextBox13,TextBox14,Tex tBox15,TextBox16,TextBox17,
    > TextArea1,TextBox18,TextBox19,TextBox20,TextBox21, TextBox22,TextBox23,TextBox24,TextBox25,TextBox26, TextBox27,TextBox28,TextBox29,TextBox30,TextBox31, TextBox32,TextBox33,TextBox34,TextBox35)
    > End If
    > End Sub
    > 'End NewRecord1 Class_Initialize Even
    >
    > 'NewRecord1 Initialize Method @3-36D27969
    > Sub Initialize(objConnection)
    >
    > If NOT Visible Then Exit Sub
    >
    >
    > Set DataSource.Connection = objConnection
    > With DataSource
    > End With
    > End Sub
    > 'End NewRecord1 Initialize Method
    >
    > 'NewRecord1 Class_Terminate Event @3-32B847C9
    > Private Sub Class_Terminate()
    > Set Errors = Nothing
    > End Sub
    > 'End NewRecord1 Class_Terminate Event
    >
    > 'NewRecord1 Validate Method @3-26F7CEFE
    > Function Validate()
    > Dim Validation
    > Dim Where
    > If EditMode Then
    > DataSource.BuildTableWhere
    > Where = " AND NOT (" & DataSource.Where & ")"
    > End If
    > If CInt(CCDLookUp("COUNT(*)", " Weapon INNER JOIN Images ON
    > Weapon.WID = Images.IID", "WID=" & DBConnection1.ToSQL(txtWID.Value,
    > txtWID.DataType) & Where, DBConnection1)) > 0 Then _
    > txtWID.Errors.addError("The value in field txtWID is
    > already in database.")
    > Validation = ValidatingControls.Validate
    > CCSEventResult = CCRaiseEvent(CCSEvents, "OnValidate", Me)
    > Validate = Validation And (Errors.Count = 0)
    > End Function
    > 'End NewRecord1 Validate Method
    >
    > 'NewRecord1 Operation Method @3-0C905987
    > Sub Operation()
    > If NOT ( Visible AND FormSubmitted ) Then Exit Sub
    >
    > End Sub
    >
    > 'End NewRecord1 Operation Method
    >
    > 'NewRecord1 Show Method @3-EA05062D
    > Sub Show(Tpl)
    > Dim i
    > Dim arrTitle
    > Dim HowMany
    >
    > If NOT Visible Then Exit Sub
    >
    > CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me)
    > Set Recordset = DataSource.Open(Command)
    > If Recordset.State = adStateOpen Then
    > EditMode = NOT Recordset.EOF
    > Else
    > EditMode = False
    > End If
    > HTMLFormAction = FileName & "?" &
    > CCAddParam(Request.ServerVariables("QUERY_STRING") , "ccsForm",
    > "NewRecord1" & IIf(EditMode, ":Edit", ""))
    > Set TemplateBlock = Tpl.Block("Record " & ComponentName)
    > TemplateBlock.Variable("HTMLFormName") = ComponentName
    > TemplateBlock.Variable("HTMLFormEnctype")
    > ="application/x-www-form-urlencoded"
    > Set Controls = CCCreateCollection(TemplateBlock, Null,
    > ccsParseOverwrite, _
    > Array(txtWID,TextBox1, TextBox3, CheckBox2, TextBox4,
    > CheckBox3, TextBox5, CheckBox4, TextBox2, TextBox6,
    > txtImagePathAndFile, TextBox7, TextBox11, TextBox16, TextBox8,
    > TextBox12, TextBox17, TextBox9, TextBox13, TextBox18, TextBox10,
    > TextBox14, TextBox19, TextBox15, TextBox20, TextBox21, TextBox25,
    > TextBox22, TextBox26, TextBox23, TextBox24, TextBox27, TextBox31,
    > TextBox28, CheckBox1, TextBox32, TextBox29, TextBox30, TextArea1,
    > TextBox33, TextBox34, TextBox35))
    > If EditMode Then
    > If Errors.Count = 0 Then
    > If Recordset.Errors.Count > 0 Then
    > PrintDBError "Record NewRecord1",
    > DataSource.Connection.LastSQL, Recordset.Errors.ToString
    > ElseIf Not Recordset.EOF Then
    > If Not FormSubmitted Then
    > txtWID.Value = Recordset.Fields("txtWID")
    > TextBox1.Value = Recordset.Fields("TextBox1")
    > TextBox3.Value = Recordset.Fields("TextBox3")
    > CheckBox2.Value =
    > Recordset.Fields("CheckBox2")
    > TextBox4.Value = Recordset.Fields("TextBox4")
    > CheckBox3.Value =
    > Recordset.Fields("CheckBox3")
    > TextBox5.Value = Recordset.Fields("TextBox5")
    > CheckBox4.Value =
    > Recordset.Fields("CheckBox4")
    > TextBox2.Value = Recordset.Fields("TextBox2")
    > TextBox6.Value = Recordset.Fields("TextBox6")
    > HowMany =
    > Ubound(Split(Recordset.Fields("txtImagePathAndFile "),"\"))
    > arrTitle =
    > Split(Recordset.Fields("txtImagePathAndFile"),"\")
    > For i = 0 To UBound(arrTitle)
    > next
    > txtImagePathAndFile.Value = "Images/Weapon/" &
    > arrTitle(HowMany)
    > TextBox7.Value = Recordset.Fields("TextBox7")
    > TextBox11.Value =
    > Recordset.Fields("TextBox11")
    > TextBox16.Value =
    > Recordset.Fields("TextBox16")
    > TextBox8.Value = Recordset.Fields("TextBox8")
    > TextBox12.Value =
    > Recordset.Fields("TextBox12")
    > TextBox17.Value =
    > Recordset.Fields("TextBox17")
    > TextBox9.Value = Recordset.Fields("TextBox9")
    > TextBox13.Value =
    > Recordset.Fields("TextBox13")
    > TextBox18.Value =
    > Recordset.Fields("TextBox18")
    > TextBox10.Value =
    > Recordset.Fields("TextBox10")
    > TextBox14.Value =
    > Recordset.Fields("TextBox14")
    > TextBox19.Value =
    > Recordset.Fields("TextBox19")
    > TextBox15.Value =
    > Recordset.Fields("TextBox15")
    > TextBox20.Value =
    > Recordset.Fields("TextBox20")
    > TextBox21.Value =
    > Recordset.Fields("TextBox21")
    > TextBox25.Value =
    > Recordset.Fields("TextBox25")
    > TextBox22.Value =
    > Recordset.Fields("TextBox22")
    > TextBox26.Value =
    > Recordset.Fields("TextBox26")
    > TextBox23.Value =
    > Recordset.Fields("TextBox23")
    > TextBox24.Value =
    > Recordset.Fields("TextBox24")
    > TextBox27.Value =
    > Recordset.Fields("TextBox27")
    > TextBox31.Value =
    > Recordset.Fields("TextBox31")
    > TextBox28.Value =
    > Recordset.Fields("TextBox28")
    > CheckBox1.Value =
    > Recordset.Fields("CheckBox1")
    > TextBox32.Value =
    > Recordset.Fields("TextBox32")
    > TextBox29.Value =
    > Recordset.Fields("TextBox29")
    > TextBox30.Value =
    > Recordset.Fields("TextBox30")
    > TextArea1.Value =
    > Recordset.Fields("TextArea1")
    > TextBox33.Value =
    > Recordset.Fields("TextBox33")
    > TextBox34.Value =
    > Recordset.Fields("TextBox34")
    > TextBox35.Value =
    > Recordset.Fields("TextBox35")
    > End If
    > Else
    > EditMode = False
    > End If
    > End If
    > End If
    > If Not FormSubmitted Then
    > End If
    > If FormSubmitted Then
    > With TemplateBlock.Block("Error")
    > .Variable("Error") = ValidatingControls.GetErrors &
    > Errors.ToString _
    > & DataSource.Errors.ToString
    > .Parse False
    > End With
    > End If
    > TemplateBlock.Variable("Action") = HTMLFormAction
    >
    > CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me)
    > If Visible Then Controls.Show
    > End Sub
    > 'End NewRecord1 Show Method
    >
    > End Class 'End NewRecord1 Class @3-A61BA892
    >
    > Class clsNewRecord1DataSource 'NewRecord1DataSource Class @3-CFF1314B
    >
    > 'DataSource Variables @3-589A358D
    > Public Errors, Connection, Parameters, CCSEvents
    >
    > Public Recordset
    > Public SQL, CountSQL, Order, Where, Orders
    > Public RecordsCount
    > Public PageSize
    > Public PageCount
    > Public AbsolutePage
    > Public Fields
    > Dim WhereParameters
    > Public AllParamsSet
    >
    > Private CurrentOperation
    > Private CCSEventResult
    >
    > ' Datasource fields
    > Public TextBox1
    > Public TextBox3
    > Public CheckBox2
    > Public txtWID
    > Public TextBox4
    > Public CheckBox3
    > Public TextBox5
    > Public CheckBox4
    > Public TextBox2
    > Public TextBox6
    > Public txtImagePathAndFile
    > Public TextBox7
    > Public TextBox11
    > Public TextBox16
    > Public TextBox8
    > Public TextBox12
    > Public TextBox17
    > Public TextBox9
    > Public TextBox13
    > Public TextBox18
    > Public TextBox10
    > Public TextBox14
    > Public TextBox19
    > Public TextBox15
    > Public TextBox20
    > Public TextBox21
    > Public TextBox25
    > Public TextBox22
    > Public TextBox26
    > Public TextBox23
    > Public TextBox24
    > Public TextBox27
    > Public TextBox31
    > Public TextBox28
    > Public CheckBox1
    > Public TextBox32
    > Public TextBox29
    > Public TextBox30
    > Public TextArea1
    > Public TextBox33
    > Public TextBox34
    > Public TextBox35
    > 'End DataSource Variables
    >
    > 'DataSource Class_Initialize Event @3-C043C361
    > Private Sub Class_Initialize()
    >
    > Set CCSEvents = CreateObject("Scripting.Dictionary")
    > Set Fields = New clsFields
    > Set Recordset = New clsDataSource
    > Set Errors = New clsErrors
    > AllParamsSet = True
    > Set txtWID = CCCreateField("txtWID", "WID", ccsText, Empty,
    > Recordset)
    > Set TextBox1 = CCCreateField("TextBox1", "name", ccsText,
    > Empty, Recordset)
    > Set TextBox3 = CCCreateField("TextBox3", "category", ccsText,
    > Empty, Recordset)
    > Set CheckBox2 = CCCreateField("CheckBox2", "nbc_protect",
    > ccsBoolean, Array("true", "false", Empty), Recordset)
    > Set TextBox4 = CCCreateField("TextBox4", "land", ccsText,
    > Empty, Recordset)
    > Set CheckBox3 = CCCreateField("CheckBox3", "amphebian",
    > ccsBoolean, Array("true", "false", Empty), Recordset)
    > Set TextBox5 = CCCreateField("TextBox5", "task", ccsText,
    > Empty, Recordset)
    > Set CheckBox4 = CCCreateField("CheckBox4", "airportable",
    > ccsBoolean, Array("true", "false", Empty), Recordset)
    > Set TextBox2 = CCCreateField("TextBox2", "crew", ccsText,
    > Empty, Recordset)
    > Set TextBox6 = CCCreateField("TextBox6", "alternative",
    > ccsText, Empty, Recordset)
    > Set txtImagePathAndFile = CCCreateField("txtImagePathAndFile",
    > "ImagePathAndFile", ccsText, Empty, Recordset)
    > Set TextBox7 = CCCreateField("TextBox7", "calibre", ccsText,
    > Empty, Recordset)
    > Set TextBox11 = CCCreateField("TextBox11", "rate_of_fire",
    > ccsText, Empty, Recordset)
    > Set TextBox16 = CCCreateField("TextBox16", "traverse",
    > ccsText, Empty, Recordset)
    > Set TextBox8 = CCCreateField("TextBox8", "range_max", ccsText,
    > Empty, Recordset)
    > Set TextBox12 = CCCreateField("TextBox12", "type_ammo",
    > ccsText, Empty, Recordset)
    > Set TextBox17 = CCCreateField("TextBox17", "diameter",
    > ccsText, Empty, Recordset)
    > Set TextBox9 = CCCreateField("TextBox9", "range_eff", ccsText,
    > Empty, Recordset)
    > Set TextBox13 = CCCreateField("TextBox13", "type_grenade",
    > ccsText, Empty, Recordset)
    > Set TextBox18 = CCCreateField("TextBox18", "penetration",
    > ccsText, Empty, Recordset)
    > Set TextBox10 = CCCreateField("TextBox10", "altitude_max",
    > ccsText, Empty, Recordset)
    > Set TextBox14 = CCCreateField("TextBox14", "type_fuse",
    > ccsText, Empty, Recordset)
    > Set TextBox19 = CCCreateField("TextBox19", "pressure",
    > ccsText, Empty, Recordset)
    > Set TextBox15 = CCCreateField("TextBox15", "radius_casualty",
    > ccsText, Empty, Recordset)
    > Set TextBox20 = CCCreateField("TextBox20", "charge", ccsText,
    > Empty, Recordset)
    > Set TextBox21 = CCCreateField("TextBox21", "length", ccsText,
    > Empty, Recordset)
    > Set TextBox25 = CCCreateField("TextBox25", "num_barrels",
    > ccsText, Empty, Recordset)
    > Set TextBox22 = CCCreateField("TextBox22", "width", ccsText,
    > Empty, Recordset)
    > Set TextBox26 = CCCreateField("TextBox26", "num_rotor_blades",
    > ccsText, Empty, Recordset)
    > Set TextBox23 = CCCreateField("TextBox23", "height", ccsText,
    > Empty, Recordset)
    > Set TextBox24 = CCCreateField("TextBox24", "weight", ccsText,
    > Empty, Recordset)
    > Set TextBox27 = CCCreateField("TextBox27", "speed_road",
    > ccsText, Empty, Recordset)
    > Set TextBox31 = CCCreateField("TextBox31", "max_speed_air",
    > ccsText, Empty, Recordset)
    > Set TextBox28 = CCCreateField("TextBox28", "speed_terrain",
    > ccsText, Empty, Recordset)
    > Set CheckBox1 = CCCreateField("CheckBox1", "terrain_water",
    > ccsBoolean, Array("true", "false", Empty), Recordset)
    > Set TextBox32 = CCCreateField("TextBox32", "ceiling", ccsText,
    > Empty, Recordset)
    > Set TextBox29 = CCCreateField("TextBox29", "capacity_fuel",
    > ccsText, Empty, Recordset)
    > Set TextBox30 = CCCreateField("TextBox30", "range_cruise",
    > ccsText, Empty, Recordset)
    > Set TextBox33 = CCCreateField("TextBox33", "datum_controle",
    > ccsDate, Array("dd", "/", "mm", "/", "yyyy", " ", "HH", ":", "nn",
    > ":", "ss"), Recordset)
    > Set TextBox34 = CCCreateField("TextBox34", "time_controle",
    > ccsDate, Array("dd", "/", "mm", "/", "yyyy", " ", "HH", ":", "nn",
    > ":", "ss"), Recordset)
    > Set TextArea1 = CCCreateField("TextArea1", "comments",
    > ccsMemo, Empty, Recordset)
    > Set TextBox35 = CCCreateField("TextBox35", "weaponkey", ccsText,
    > Empty, Recordset)
    > Fields.AddFields Array(txtWID,TextBox1, TextBox3, CheckBox2,
    > TextBox4, CheckBox3, TextBox5, CheckBox4, TextBox2, TextBox6,
    > txtImagePathAndFile, TextBox7, TextBox11, TextBox16, TextBox8,
    > TextBox12, TextBox17, TextBox9, TextBox13, TextBox18, TextBox10,
    > TextBox14, TextBox19, TextBox15, TextBox20, TextBox21, TextBox25,
    > TextBox22, TextBox26, TextBox23, TextBox24, TextBox27, TextBox31,
    > TextBox28, CheckBox1, TextBox32, TextBox29, TextBox30, TextBox33,
    > TextBox34, TextBox35, TextArea1)
    > Dim eben
    > eben = Replace(Request.QueryString,"%20"," ")
    > SQL = "SELECT Weapon.*, ImagePathAndFile " & _
    > "FROM Weapon INNER JOIN Images ON Weapon.WID = Images.IID"
    > CountSQL = "SELECT COUNT(*) " & _
    > "FROM Weapon INNER JOIN Images ON Weapon.WID = Images.IID"
    > Where = "name = '" & eben & "'"
    > Order = "name"
    >
    > End Sub
    > 'End DataSource Class_Initialize Event
    >
    > 'BuildTableWhere Method @3-98E5A92F
    > Public Sub BuildTableWhere()
    > End Sub
    > 'End BuildTableWhere Method
    >
    > 'Open Method @3-B139FD2D
    > Function Open(Cmd)
    > Errors.Clear
    > Set Recordset.DataSource = Me
    > Set Cmd.Connection = Connection
    > Cmd.CommandOperation = cmdOpen
    > Cmd.PageSize = PageSize
    > Cmd.ActivePage = AbsolutePage
    > Cmd.CommandType = dsTable
    > CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect",
    > Me)
    > Cmd.SQL = SQL
    > Cmd.Where = Where
    > Cmd.OrderBy = Order
    > If Not AllParamsSet Then
    > Set Open = New clsEmptyDataSource
    > Exit Function
    > End If
    > CCSEventResult = CCRaiseEvent(CCSEvents,
    > "BeforeExecuteSelect", Me)
    > If Errors.Count = 0 And CCSEventResult Then _
    > Set Recordset = Cmd.Exec(Errors)
    > CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect",
    > Me)
    > Set Recordset.FieldsCollection = Fields
    > Set Open = Recordset
    > End Function
    > 'End Open Method
    >
    > 'DataSource Class_Terminate Event @3-41B4B08D
    > Private Sub Class_Terminate()
    > If Recordset.State = adStateOpen Then _
    > Recordset.Close
    > Set Recordset = Nothing
    > Set Parameters = Nothing
    > Set Errors = Nothing
    > End Sub
    > 'End DataSource Class_Terminate Event
    >
    > End Class 'End NewRecord1DataSource Class @3-A61BA892
    >
    > %>
    >
    >
    >
    >
    > "Roland Hall" <nobody@nowhere> wrote in message news:<uz7qmTx0DHA.556@TK2MSFTNGP11.phx.gbl>...
    > > "Krechting" wrote:
    > >
    > > : <html>
    > > : <head>
    > > : <title>NewPage1</title>
    > > : <%@ Language=VBScript %>
    > > : <% Option Explicit
    > > : dim MyAutoNum
    > > : MyAutoNum = 26
    > > : %>
    > > : <script type="text/javascript">
    > > : document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > > : </script>
    > > : <script language="JavaScript">
    > > : <!--
    > > : function MM_callJS(jsStr) { //v2.0
    > > : return eval(jsStr)
    > > : }
    > > :
    > > : function MM_displayStatusMsg(msgStr) { //v1.0
    > > : status=msgStr;
    > > : document.MM_returnValue = true;
    > > : }
    > > :
    > > : function PopUp(url,w,h) {
    > > : var=Text1.Value
    > > : window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > > : ',height=' + h + ',top=10,left=10');
    > > : }
    > > :
    > > :
    > > : //-->
    > > : </script>
    > > : <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > > : </head>
    > > : <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > > : text="#000000" class="CobaltPageBODY">
    > > : <p>
    > > : <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > > : name="Image1">&nbsp;</p>
    > > : MyAutoNum = <%=MyAutoNum%><br />
    > > : <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > > : document.MM_returnValue" style="CURSOR: hand"
    > > :
    > > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > > g
    > > : alt="Click button to Show Related Equipment" src="related.gif"
    > > : align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > > : this Record');return document.MM_returnValue"
    > > : href="javascript:window.print()"><img alt="Click button to print
    > > : Record" src="printbutton.gif" align="left" border="0"></a>
    > > : <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > > : document.MM_returnValue"
    > > : href="javascript:window.print()"></a>&nbsp;</p>
    > > : <p><input id="Submit1" type="submit" value="Query verzenden"
    > > : name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    > >
    > > Marco...
    > >
    > > This goes at the top or you get an error:
    > > <%@ Language=VBScript %>
    > >
    > > This should be next:
    > > <% Option Explicit %>
    > >
    > > So, I moved code around a bit from what you listed. I don't have the MM
    > > routines so I get object errors and you're also not finishing the rest of
    > > the page but I assume that is to show relevant code and that's fine.
    > > However, this is the code I used and following is the result (client-side
    > > source code) from the browser when selecting 'view source'. Look in the
    > > 'result (client-side source code) and you'll see that the values for
    > > MyAutoNum are correct and show 26 as the value.
    > >
    > > ASP Code:
    > > <%@ Language=VBScript %>
    > > <% Option Explicit
    > > dim MyAutoNum
    > > MyAutoNum = 26
    > > %>
    > > <html>
    > > <head>
    > > <title>NewPage1</title>
    > > <script type="text/javascript">
    > > document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > > </script>
    > > <script language="JavaScript">
    > > <!--
    > > function MM_callJS(jsStr) { //v2.0
    > > return eval(jsStr)
    > > }
    > >
    > > function MM_displayStatusMsg(msgStr) { //v1.0
    > > status=msgStr;
    > > document.MM_returnValue = true;
    > > }
    > >
    > > function PopUp(url,w,h) {
    > > var=Text1.Value
    > > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > > ',height=' + h + ',top=10,left=10');
    > > }
    > >
    > >
    > > //-->
    > > </script>
    > > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > > </head>
    > > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > > text="#000000" class="CobaltPageBODY">
    > > <p>
    > > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > > name="Image1">&nbsp;</p>
    > > MyAutoNum = <%=MyAutoNum%><br />
    > > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > > document.MM_returnValue" style="CURSOR: hand"
    > > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > > g
    > > alt="Click button to Show Related Equipment" src="related.gif"
    > > align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > > this Record');return document.MM_returnValue"
    > > href="javascript:window.print()"><img alt="Click button to print
    > > Record" src="printbutton.gif" align="left" border="0"></a>
    > > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > > document.MM_returnValue"
    > > href="javascript:window.print()"></a>&nbsp;</p>
    > > <p><input id="Submit1" type="submit" value="Query verzenden"
    > > name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    > >
    > > Result (client-side source code):
    > >
    > > <html>
    > > <head>
    > > <title>NewPage1</title>
    > > <script type="text/javascript">
    > > document.write("MyAutoNum = " + 26 + "<br />");
    > > </script>
    > > <script language="JavaScript">
    > > <!--
    > > function MM_callJS(jsStr) { //v2.0
    > > return eval(jsStr)
    > > }
    > >
    > > function MM_displayStatusMsg(msgStr) { //v1.0
    > > status=msgStr;
    > > document.MM_returnValue = true;
    > > }
    > >
    > > function PopUp(url,w,h) {
    > > var=Text1.Value
    > > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w +
    > > ',height=' + h + ',top=10,left=10');
    > > }
    > >
    > >
    > > //-->
    > > </script>
    > > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > > </head>
    > > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > > text="#000000" class="CobaltPageBODY">
    > > <p>
    > > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > > name="Image1">&nbsp;</p>
    > > MyAutoNum = 26<br />
    > > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > > document.MM_returnValue" style="CURSOR: hand"
    > > href="javascript:PopUp('Weapon_related.asp?WID=26' ,800,500)"><img
    > > alt="Click button to Show Related Equipment" src="related.gif"
    > > align="left" border="0"></a><a onmouseover="MM_displayStatusMsg('Print
    > > this Record');return document.MM_returnValue"
    > > href="javascript:window.print()"><img alt="Click button to print
    > > Record" src="printbutton.gif" align="left" border="0"></a>
    > > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > > document.MM_returnValue"
    > > href="javascript:window.print()"></a>&nbsp;</p>
    > > <p><input id="Submit1" type="submit" value="Query verzenden"
    > > name="Submit1" onClick="location.href='Weapon_related.asp?WID=26' "></p>
    > >
    > > Your popup also doesn't work and I see errors there.
    > >
    > > 1. var=Text1.Value
    > > This needs a variable name. Ex.
    > > var someVariable = Text1.value
    > >
    > > I don't have a form to reference so I assume that is part of the code that
    > > is not present. If you were to pull the value from a form then any of these
    > > might work:
    > > var someVariable=document.getElementById("text1").valu e;
    > > var someVariable=document.all["text1"].value;
    > > var someVariable=document.forms[0].text1.value;
    > > var someVariable=document.forms[0].elements[0].text1.value;
    > >
    > > 2. Opening a popup window should assign a handle to the window.
    > >
    > > You have:
    > > window.open(url, 'name', 'resizable,scrollbars=yes,width=' + w + ',height='
    > > + h + ',top=10,left=10');
    > >
    > > Try:
    > > var winHandle =
    > > window.open(url,'winname','resizable=yes,scrollbar s=yes,width='+w+',height='
    > > +h+',top=10,left=10');
    > >
    > > I don't have certain things to make the page complete and I had to add a
    > > hidden field so I had something for text1.value but you can see that your
    > > popup window now works:
    > >
    > > Here is a working link:
    > > [url]http://rockintheplanet.com/lab/myautonum2.asp[/url]
    > >
    > > Here is the final code I'm working with:
    > >
    > > <%@ Language=VBScript %>
    > > <% Option Explicit
    > > dim MyAutoNum
    > > MyAutoNum = 26
    > > %>
    > > <html>
    > > <head>
    > > <title>NewPage1</title>
    > > <script type="text/javascript">
    > > document.write("MyAutoNum = " + <%=myAutoNum%> + "<br />");
    > > </script>
    > > <script language="JavaScript">
    > > <!--
    > > function MM_callJS(jsStr) { //v2.0
    > > return eval(jsStr)
    > > }
    > >
    > > function MM_displayStatusMsg(msgStr) { //v1.0
    > > status=msgStr;
    > > document.MM_returnValue = true;
    > > }
    > >
    > > function PopUp(url,w,h) {
    > > var someVariable=text1.value;
    > > var
    > > winHandle=window.open(url,'winname','resizable=yes ,scrollbars=yes,width=' +
    > > w + ',height=' + h + ',top=10,left=10');
    > > }
    > >
    > > //-->
    > > </script>
    > > <link rel="stylesheet" type="text/css" href="Themes/Cobalt/Style.css">
    > > </head>
    > > <body link="#000000" vlink="#000000" alink="#ff0000" bgcolor="#fffff7"
    > > text="#000000" class="CobaltPageBODY">
    > > <p>
    > > <!-- BEGIN Record NewRecord1 --><img id="Image1" src="MainBorder.JPG"
    > > name="Image1">&nbsp;</p>
    > > MyAutoNum = <%=MyAutoNum%><br />
    > > <a onmouseover="MM_displayStatusMsg('Show Related Equipment');return
    > > document.MM_returnValue" style="CURSOR: hand"
    > > href="javascript:PopUp('Weapon_related.asp?WID=<%= myAutoNum%>',800,500)"><im
    > > g alt="Click button to Show Related Equipment" src="related.gif"
    > > align="left" border="0"></a>
    > > <a onmouseover="MM_displayStatusMsg('Print this Record');return
    > > document.MM_returnValue" href="javascript:window.print()"><img alt="Click
    > > button to print Record" src="printbutton.gif" align="left" border="0"></a>
    > > <p><a onmouseover="MM_displayStatusMsg('Print this Record');return
    > > document.MM_returnValue" href="javascript:window.print()"></a>&nbsp;</p>
    > > <input id="text1" name="text1" type=hidden value="somevalue" />
    > > <p><input id="Submit1" type="submit" value="Query verzenden" name="Submit1"
    > > onClick="location.href='Weapon_related.asp?WID=26' "></p>
    > >
    > > --
    > > Roland
    > >
    > > This information is distributed in the hope that it will be useful, but
    > > without any warranty; without even the implied warranty of merchantability
    > > or fitness for a particular purpose.
    > >
    > > -Technet Script Center-
    > > [url]http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp[/url]
    > > -MSDN Library-
    > > [url]http://msdn.microsoft.com/library/default.asp[/url]
    Krechting Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139