0

Hi

Hi have the code below. When I run the javascript that I have comment it works, but when I try to run the vbscript, nothing happens. I just wounder what I have done wrong

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   <%-- <script language ="javascript"  type="text/javascript"  >--%>

	<script type="text/vbscript">
  
    sub Click()
		  document.getElementById("txtDown").value=  document.getElementById("txtUp").value
    end sub
	
'	function Click() 
'	{		 document.getElementById("txtDown").value=  document.getElementById("txtUp").value;
'            /*set txt1 = document.getElementById("txtUp") 
'            set txt2 = document.getElementById("txtDown") 
'            txt2.innertext = txt1.innertext*/
'     }   
      

	</script>
</head>
<body>

	
    <form id="form1" runat="server">
    <div>
		<img src="Images/text.GIF" />
		<br />
		<br />
		<input type="text"  id="txtUp"/>
		<br />
		<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button id="btn" onclick ="Click()" /> Read</button>
		<br />
		<br />
		<input type="text" id="txtDown" />
    </div>
    </form>
</body>
</html>

Thanks
Fia

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by __avd
0

IE only.

<head runat="server">
    <title></title>
    <script type="text/vbscript">
     sub aaa ()
          
		   document.getElementById("txtDown").value=  document.getElementById("txtUp").value
     end sub
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <input type="text"  id="txtUp"/>
		<br />
		<br />
		  <button id="btn" onclick ="aaa()" type="button" /> Read</button>
		<br />
		<br />
		<input type="text" id="txtDown" />
    </div>
    </form>
</body>
</html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.