473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Select Control's Question

Hello,
<%@ Language=VBScript %>
<%
Response.Write "<FORM name=form1>"
dim x
Response.Write "<select name=""select1"">"
Response.Write "<option value=1>One</option>"
Response.Write "<option value=2>Two</option>"
Response.Write "<option value=3>Three</option>"
Response.Write "</select>"
Response.Write "</FORM>"
%>
I want a event,when select1 change,x=select1's value.
Thank you

Jul 19 '05 #1
10 1460
Jack wrote on 16 jan 2004 in microsoft.public.inetserver.asp.general:
Hello,
<%@ Language=VBScript %>
<%
Response.Write "<FORM name=form1>"
dim x
Response.Write "<select name=""select1"">"
Response.Write "<option value=1>One</option>"
Response.Write "<option value=2>Two</option>"
Response.Write "<option value=3>Three</option>"
Response.Write "</select>"
Response.Write "</FORM>"
%>
I want a event,when select1 change,x=select1's value.
Thank you


You cannot get that serverside.

Serverside is closed once your page is on the client.

You will need to submit the form to the server and use
request.form or request.querystring
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Thank you,
<%@ Language=VBScript %>
<SCRIPT LANGUAGE=VBScript>
dim y
</SCRIPT>
<%
dim x
Response.Write "<FORM name=form1 METHOD=""POST"">"
Response.Write "<INPUT type=""submit"" value=""Submit"" id=submit1
name=submit1>"
Response.Write "</FORM>"
%>
I don't know how can submit y to x in form1.
Can you give me some advice?

Jul 19 '05 #3
x is a client-side variable. y is server-side. Neither of them has a
value. What do you want to do with them?

Ray at work

"Jack" <si*****************@noyahoo.co.jp> wrote in message
news:e4**************@tk2msftngp13.phx.gbl...
Thank you,
<%@ Language=VBScript %>
<SCRIPT LANGUAGE=VBScript>
dim y
</SCRIPT>
<%
dim x
Response.Write "<FORM name=form1 METHOD=""POST"">"
Response.Write "<INPUT type=""submit"" value=""Submit"" id=submit1
name=submit1>"
Response.Write "</FORM>"
%>
I don't know how can submit y to x in form1.
Can you give me some advice?

Jul 19 '05 #4
Thank you,
I want submit a client-side variable to server-side,because my application
need it.
Can anyone help me

Jul 19 '05 #5

<%
If Request.Form("hiddenInput") <> "" Then
Response.Write "Your client side assigned value was posted: " &
Request.Form("hiddenInput")
End If
%>
<form name="jack" method="post">
<input name="hiddenInput" type="hidden">
<input type="submit">
</form>

<script language=vbscript>
document.jack.hiddenInput.value="Here's a value"
</script>

Ray at home

"Jack" <si*****************@noyahoo.co.jp> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Thank you,
I want submit a client-side variable to server-side,because my application need it.
Can anyone help me

Jul 19 '05 #6
This is more of a client-side question.

one way you could do it:

<html>
<head>
<script language="javascript">
var y="whatever you want";

function submitform()
{
document.myform.yvalue.value=y;
document.myform.submit();
}
</script>
</head>
<body>

<form method="post" name="myform" action="myscript.asp">
<input type="hidden" name="yvalue" value="">
<a href="javascript.submitform();">Submit</a>
</form>

</body>
</html>

Then in myscript.asp you can get the value with

dim x
x=request.form("yvalue")

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Jack" <si*****************@noyahoo.co.jp> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Thank you,
I want submit a client-side variable to server-side,because my application need it.
Can anyone help me

Jul 19 '05 #7
Thank you very much,but
<%@ Language=VBScript %>
<%
Response.Write "Server:"
Response.Write "<INPUT type=""text"" id=text1 name=text1
value="&Request.Form("hiddenInput")&">"
%>
<form name="jack" method="post">
<input name="hiddenInput" type="hidden">
<INPUT type="text" id=text3 name=text3>
<input type="submit">
</form>
<script language=vbscript>
document.jack.hiddenInput.value=document.jack.text 3.value
</script>

When click submit,why text1 can't show text3's value?
I wait anyone's help.

Jul 19 '05 #8
You're telling it to display the value of a form element named "hiddenInput"
instead of "text3."

Ray at home

"Jack" <si*****************@noyahoo.co.jp> wrote in message
news:O9****************@TK2MSFTNGP12.phx.gbl...
Thank you very much,but
<%@ Language=VBScript %>
<%
Response.Write "Server:"
Response.Write "<INPUT type=""text"" id=text1 name=text1
value="&Request.Form("hiddenInput")&">"
%>
<form name="jack" method="post">
<input name="hiddenInput" type="hidden">
<INPUT type="text" id=text3 name=text3>
<input type="submit">
</form>
<script language=vbscript>
document.jack.hiddenInput.value=document.jack.text 3.value
</script>

When click submit,why text1 can't show text3's value?
I wait anyone's help.

Jul 19 '05 #9
Jack wrote on 17 jan 2004 in microsoft.public.inetserver.asp.general:
Thank you very much,but
<%@ Language=VBScript %>
<%
Response.Write "Server:"
Response.Write "<INPUT type=""text"" id=text1 name=text1
value="&Request.Form("hiddenInput")&">"
%>
<form name="jack" method="post">
<input name="hiddenInput" type="hidden">
<INPUT type="text" id=text3 name=text3>
<input type="submit">
</form>
<script language=vbscript>
document.jack.hiddenInput.value=document.jack.text 3.value
</script>

When click submit,why text1 can't show text3's value?
I wait anyone's help.

this:

document.jack.hiddenInput.value=document.jack.text 3.value

is executed at page loading, so BEFORE you fill text3.

==========

try:

<%@ Language=VBScript %>

Server:
<INPUT type="text"
value="<%=Request.Form("hiddenInput")%>">

<br><br>

<form name="jack" method="post"
onsubmit=
"document.jack.hiddenInput.value=document.jack.tex t3.value"

<input name="hiddenInput" type="hidden">
<INPUT type="text" name=text3>
<input type="submit">
</form>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #10
Thank you very much

Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JohnSouth104 | last post by:
Hi I want to warn the user that changing the selected item in a pull-down will clear some data he has already entered in a file download box. I've tried using confirm() to return true or false...
3
by: larry | last post by:
Hi, I am a newbie to Internet programming. I have some questions about spacing in HTML control names and subsequently being able to access these input elements in JavaScript If you don't have...
6
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
3
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me...
5
by: GTi | last post by:
Whats wring with this code? <select class=EditField size="1" name="PlantUnitID" title="Select line"> <option value="0" >Standalone Unit</option> <option value="1" selected >Connected Unit...
3
by: shripaldalal | last post by:
hi all, i have the following fields.... Document_Name, Document_No, Document_Date, Order_No, Order_Date, Peripheral The first 5 you can understand, peripheral is a memo field which...
2
by: entfred | last post by:
I was experimenting with trying to select the same item in a select box twice in a row and found out that you need to do a refresh (view - refresh) in Internet Explorer. This is so you can click...
5
by: visu | last post by:
Hi this is a question asked in this group two years back.. No answer for this question till date. now i am in the same situation of the questioner.. to find a solution for this problem. Can any...
6
by: dbuchanan | last post by:
There are three parts to this 1.) How do I cascade menus? 2.) And, how do I cascade menus with a multi-select CheckBoxList?
4
by: troy_lee | last post by:
I have a form that acts a filter. All of the filtering objects are in the header and the results are displayed in a continuous form in the detail section. In the header, I have a text box...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.