Get value of a textbox and use it in vbsciprt

M

msnews

I need to read the value typed into a textbox (textbox.txt) and then use it
in some code that looks like this:

Sub Button3_OnClick
on error resume next
dim CompName Compuser = document.frmMain.LLUValue.value ' (this doesn't
work. Can't get http text box to work)
window.open "/SMSReporting/Report.asp?ReportID=12&variable=" & CompUser
End Sub

I need to use the vbscript because I have to open a new page, which I don't
think is possible with the server side controls and I can't find a way to
use the document method to read the asp.net object.


Thanks.

Here is the whole page

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="remote.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="VBScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<BODY ms_positioning="GridLayout">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="#d6ecd8"
border="0">
<tr>
<td vAlign="middle" align="center" bgColor="#a0a0a0" colSpan="4"
height="20"><font face="Verdana, Arial" color="#ffffff" size="1"><b>SMS
2003 Remote Control</b></font>
</td>
</tr>
<tr bgColor="#a8d7b3">
<td vAlign="middle" noWrap height="20"><font face="Verdana, Arial"
size="1"><b>&nbsp;&nbsp;&nbsp;&nbsp;</b></font></SPAN>
</td>
</tr>
</table>
<form id="Form1" method="post" runat="server">
<asp:button id="Button2" style="Z-INDEX: 101; LEFT: 123px; POSITION:
absolute; TOP: 124px" runat="server"
Text="RemoteControl"></asp:button>
<asp:textbox id="TextBox1" style="Z-INDEX: 102; LEFT: 120px; POSITION:
absolute; TOP: 76px" runat="server"
Height="25px" Width="237px"></asp:textbox><asp:label id="Label1"
style="Z-INDEX: 103; LEFT: 380px; POSITION: absolute; TOP: 80px"
runat="server"
Width="84px" Height="23px"
Font-Bold="True">MachineName</asp:label></form>
<td vAlign="top" width="697" colSpan="2" height="11"><span
class="blacktext"><FONT size="2">
<P><INPUT id="button3" style="Z-INDEX: 104; LEFT: 129px; WIDTH: 126px;
POSITION: absolute; TOP: 232px; HEIGHT: 24px"
type="button" value="Button">&nbsp;&nbsp;&nbsp;
<asp:TextBox id="TextBox2" style="Z-INDEX: 105; LEFT: 125px; POSITION:
absolute; TOP: 192px"
runat="server" Width="222px"></asp:TextBox>
</FONT></span>
</td>
<tr>
<td width="452"></td>
</tr>
<tr>
<SCRIPT language="VBScript">


Sub Button3_OnClick
on error resume next
dim CompName
Compuser = document.frmMain.LLUValue.value
window.open "/SMSReporting/Report.asp?ReportID=12&variable=" & CompUser

End Sub
</SCRIPT>
</P>
</BODY>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top