Hi All

First, thanks of  all of u. Now i would like to tell u what i want to do. I 
have a table calld employee, which contain employee information of the company. 
in asp code i have stored entire record set in an array variable. In form i 
have all the field from employee table. First field is employee id associated 
with a combo box. All empid display in combo box after execution of the code. i 
want when user change combobox selection, associated records from that emloyee 
id should be display in other textbox fields. I have tried it with java script 
function, i was try to pass array variable to java script function but can't 
get success. Plz suggest me right solution for it. Your suuggetion are alway 
valuable for me

Thanks in advance

Bala
  ----- Original Message ----- 
  From: PogoWolf 
  To: [EMAIL PROTECTED] 
  Sent: Friday, January 28, 2005 6:14 AM
  Subject: RE: [Visual_Basic_Languages_for_everyone] ASP variable


  This all depends on what you are trying to do.
  ASP can't read JS, because ASP is run at the server, and the JS is run on
  the client.

  However you CAN use ASP to WRITE a JS function.

  Something like:



        <script language="JavaScript">
        <!--
              <% for i = 0 to 3 %>                       <-- Notice the
  ASP code here
                    form[<%= i %>].element = "<%= i %>"  <-- and Here
              <% next %>                                 <-- and here!
        //-->
        </script>
        
        
        
  Will produce this code in the browser: 

              
        <script language="JavaScript">
        <!--
              form[0].element = "0"
              form[1].element = "1"
              form[2].element = "2"
              form[3].element = "3"
        
        //-->
        </script>
        

  Now you have a JS array created from your ASP array.

  Now, if you are trying to call a funcion in JS upon a select based on your
  ASP code...
  You can NOT call the Function and expect it to 'see' the ASP var.  However,
  you can 
  Set the var in your JS function from ASP.    Something like..

  <script language="JavaScript">
    function FOO ()
      {
        ASPVar = <%=SomeValue%>
        .. Rest of function ..
      }

        

  View this link for more information:
  http://www.15seconds.com/issue/000210.htm



  ________________________________

  From: BALA [mailto:[EMAIL PROTECTED] 
  Sent: Friday, January 28, 2005 9:22 AM
  To: vb4; vb1; vb2; vb3
  Subject: [Visual_Basic_Languages_for_everyone] ASP variable




  Hi All

  how can i pass asp array variable to java script function. please suggest
  me.

  Bala



  ________________________________

  Yahoo! Groups Links


  *      To visit your group on the web, go to:
        http://groups.yahoo.com/group/Visual_Basic_Languages_for_everyone/
          
  *      To unsubscribe from this group, send an email to:
        [EMAIL PROTECTED]
  <mailto:[EMAIL PROTECTED]
  ect=Unsubscribe> 
          
  *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
  <http://docs.yahoo.com/info/terms/> . 






------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/visual_basic_programmer/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 




[Non-text portions of this message have been removed]






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to