I have a combo in LISTING 2 that I'm trying to force a sumbit when a user
makes a change. Can anyone see why it doesn't fire LISTING 2 code?
It just doesn't do anything. What I'm really trying to do is access the
value of the combo after a user makes a change. I'm just hardcoding the
teamID querystring in this example.
LISTING 1
-------------
<script type=text/javascript>
function showTeams()
{
document.addFor m.action = "./mypage.asp?team ID=5";
document.addFor m.submit();
}
</script>
LISTING 2
------------
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry"
onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select> 9 2714
Works fine for me in IE. I suggest, since this is a client-side issue and
not an ASP one, that you investigate further in a client-side group, such as
m.p.scripting.j script.
Ray at home
"scott" <sb*****@milesl umber.com> wrote in message
news:O2******** ******@TK2MSFTN GP12.phx.gbl... I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example.
LISTING 1 ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
Works for me. But, I closed the form </form>.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message
news:O2******** ******@TK2MSFTN GP12.phx.gbl... I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example.
LISTING 1 ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
OK guys, I found the real problem because my simple submitted version worked
for me also.
IThe combo in LISTING 2 fires the Onchange event perfect. However, LISTING 3
will not fire my ONCHANGE event because I've inserted a "hidden" field after
the form tag. Now, if I have a hidden form element anywhere inside the form
tags, onchange won't fire.
Why would a 'hidden' form element cause a javascript onchange event to not
work?
LISTING 1 (WORKS)
-------------
<script type=text/javascript>
function showTeams()
{
document.addFor m.action = "./mypage.asp?team ID=5";
document.addFor m.submit();
}
</script>
LISTING 2 (WORKS)
------------
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry"
onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select>
LISTING 3 (DOESN'T WORK)
------------
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry"
onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select>
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:Ox******** ******@TK2MSFTN GP12.phx.gbl... Works for me. But, I closed the form </form>.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:O2******** ******@TK2MSFTN GP12.phx.gbl... I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example.
LISTING 1 ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
what's the full name of the jscript group?
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Works fine for me in IE. I suggest, since this is a client-side issue and not an ASP one, that you investigate further in a client-side group, such as m.p.scripting.j script.
Ray at home
"scott" <sb*****@milesl umber.com> wrote in message news:O2******** ******@TK2MSFTN GP12.phx.gbl...I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example.
LISTING 1 ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
>> Now, if I have a hidden form element anywhere inside the form tags,
onchange won't fire.
Sure it will....
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select>
<input type="hidden">
</form>.
Listing 3 is identical to Listing 2. When you post to the client-side group
(microsoft.publ ic.scripting.js cript), include *all* of what you say doesn't
work.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message
news:e0******** ******@TK2MSFTN GP15.phx.gbl... OK guys, I found the real problem because my simple submitted version
worked for me also.
IThe combo in LISTING 2 fires the Onchange event perfect. However, LISTING
3 will not fire my ONCHANGE event because I've inserted a "hidden" field
after the form tag. Now, if I have a hidden form element anywhere inside the
form tags, onchange won't fire.
Why would a 'hidden' form element cause a javascript onchange event to not work?
LISTING 1 (WORKS) ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 (WORKS) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
LISTING 3 (DOESN'T WORK) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Ox******** ******@TK2MSFTN GP12.phx.gbl... Works for me. But, I closed the form </form>.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:O2******** ******@TK2MSFTN GP12.phx.gbl... I have a combo in LISTING 2 that I'm trying to force a sumbit when a
user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to do is access the value of the combo after a user makes a change. I'm just hardcoding the teamID querystring in this example.
LISTING 1 ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
i will goto jscript group, but just to let you know, the "hidden" form
element will ONLOY work as you posted, try giving it a name and value and
the onchange event causes error.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:Or******** *****@tk2msftng p13.phx.gbl... Now, if I have a hidden form element anywhere inside the form tags, onchange won't fire.
Sure it will....
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select> <input type="hidden"> </form>.
Listing 3 is identical to Listing 2. When you post to the client-side group (microsoft.publ ic.scripting.js cript), include *all* of what you say doesn't work.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:e0******** ******@TK2MSFTN GP15.phx.gbl... OK guys, I found the real problem because my simple submitted version worked for me also.
IThe combo in LISTING 2 fires the Onchange event perfect. However, LISTING 3 will not fire my ONCHANGE event because I've inserted a "hidden" field after the form tag. Now, if I have a hidden form element anywhere inside the form tags, onchange won't fire.
Why would a 'hidden' form element cause a javascript onchange event to not work?
LISTING 1 (WORKS) ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 (WORKS) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
LISTING 3 (DOESN'T WORK) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Ox******** ******@TK2MSFTN GP12.phx.gbl... > Works for me. But, I closed the form </form>. > > Bob Lehmann > > "scott" <sb*****@milesl umber.com> wrote in message > news:O2******** ******@TK2MSFTN GP12.phx.gbl... >> I have a combo in LISTING 2 that I'm trying to force a sumbit when a user >> makes a change. Can anyone see why it doesn't fire LISTING 2 code? >> It just doesn't do anything. What I'm really trying to do is access >> the >> value of the combo after a user makes a change. I'm just hardcoding >> the >> teamID querystring in this example. >> >> LISTING 1 >> ------------- >> <script type=text/javascript> >> >> function showTeams() >> { >> document.addFor m.action = "./mypage.asp?team ID=5"; >> document.addFor m.submit(); >> } >> </script> >> >> >> >> LISTING 2 >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> > >
OK....
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select>
<input type="hidden" name="hdn" value="12">
</form>
Still works.
<ot>
So what error are you getting? Post a *complete* sample of your code.
</ot>
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message
news:u0******** ******@TK2MSFTN GP15.phx.gbl... i will goto jscript group, but just to let you know, the "hidden" form element will ONLOY work as you posted, try giving it a name and value and the onchange event causes error.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Or******** *****@tk2msftng p13.phx.gbl... Now, if I have a hidden form element anywhere inside the form tags, onchange won't fire.
Sure it will....
<form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select> <input type="hidden"> </form>.
Listing 3 is identical to Listing 2. When you post to the client-side group (microsoft.publ ic.scripting.js cript), include *all* of what you say doesn't work.
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:e0******** ******@TK2MSFTN GP15.phx.gbl... OK guys, I found the real problem because my simple submitted version worked for me also.
IThe combo in LISTING 2 fires the Onchange event perfect. However, LISTING 3 will not fire my ONCHANGE event because I've inserted a "hidden" field after the form tag. Now, if I have a hidden form element anywhere inside the form tags, onchange won't fire.
Why would a 'hidden' form element cause a javascript onchange event to not work?
LISTING 1 (WORKS) ------------- <script type=text/javascript>
function showTeams() { document.addFor m.action = "./mypage.asp?team ID=5"; document.addFor m.submit(); } </script> LISTING 2 (WORKS) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
LISTING 3 (DOESN'T WORK) ------------ <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select>
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Ox******** ******@TK2MSFTN GP12.phx.gbl... > Works for me. But, I closed the form </form>. > > Bob Lehmann > > "scott" <sb*****@milesl umber.com> wrote in message > news:O2******** ******@TK2MSFTN GP12.phx.gbl... >> I have a combo in LISTING 2 that I'm trying to force a sumbit when a user >> makes a change. Can anyone see why it doesn't fire LISTING 2 code? >> It just doesn't do anything. What I'm really trying to do is access >> the >> value of the combo after a user makes a change. I'm just hardcoding >> the >> teamID querystring in this example. >> >> LISTING 1 >> ------------- >> <script type=text/javascript> >> >> function showTeams() >> { >> document.addFor m.action = "./mypage.asp?team ID=5"; >> document.addFor m.submit(); >> } >> </script> >> >> >> >> LISTING 2 >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> > >
ERROR: nothing happens, the yellow js error icons says "Object doesn't
support this property or method"
Note: If I delete name and value on hidden element, works fine.
FULL CODE:
<html>
<head>
<title>Calend ar Admin</title>
<link rel="stylesheet " type="text/css" href="library/IntranetStyle01 .css">
<style type="text/css">
TD {
font-family:verdana, arial,sans-serif;
font-size:10pt;
color:#333366;
}
.FormTextBox {
border:solid 1pt #008080;
font-family:verdana, sans-serif;
font-size:10pt;
color:#000000;
background-color:#ffffee;
}
</style>
<script type=text/javascript>
function showTeams()
{
document.addFor m.action = "combo_test1.as p?action=add&te amID=6";
document.addFor m.submit();
}
</script>
<body>
<form action="combo_t est1.asp" method="post" name="addForm">
<input type="hidden" name="action" value="add_proc ess">
<select class="FormText Box" name="cboCatego ry"
onchange="javas cript:showTeams ();">
<OPTION value="1">Work Schedule</OPTION>
<OPTION value="2">Meeti ng</OPTION>
<OPTION value="3">Mills </OPTION>
<OPTION value="5">Teams </OPTION>
</select>
</form>
</body>
</html>
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l... OK.... <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select> <input type="hidden" name="hdn" value="12"> </form>
Still works.
<ot> So what error are you getting? Post a *complete* sample of your code. </ot>
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:u0******** ******@TK2MSFTN GP15.phx.gbl... i will goto jscript group, but just to let you know, the "hidden" form element will ONLOY work as you posted, try giving it a name and value and the onchange event causes error.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Or******** *****@tk2msftng p13.phx.gbl... >>> Now, if I have a hidden form element anywhere inside the form tags, > onchange won't fire. > > Sure it will.... > > <form action="mypage. asp" method="post" name="addForm"> > > <select class="FormText Box" name="cboCatego ry" onchange="showT eams();"> > > <OPTION value="1">Work Schedule</OPTION> > <OPTION value="2">Meeti ng</OPTION> > <OPTION value="3">Mills </OPTION> > <OPTION value="5">Teams </OPTION> > </select> > <input type="hidden"> > </form>. > > Listing 3 is identical to Listing 2. When you post to the client-side > group > (microsoft.publ ic.scripting.js cript), include *all* of what you say > doesn't > work. > > Bob Lehmann > > "scott" <sb*****@milesl umber.com> wrote in message > news:e0******** ******@TK2MSFTN GP15.phx.gbl... >> OK guys, I found the real problem because my simple submitted version > worked >> for me also. >> >> IThe combo in LISTING 2 fires the Onchange event perfect. However, >> LISTING > 3 >> will not fire my ONCHANGE event because I've inserted a "hidden" field > after >> the form tag. Now, if I have a hidden form element anywhere inside the > form >> tags, onchange won't fire. >> >> Why would a 'hidden' form element cause a javascript onchange event to >> not >> work? >> >> >> LISTING 1 (WORKS) >> ------------- >> <script type=text/javascript> >> >> function showTeams() >> { >> document.addFor m.action = "./mypage.asp?team ID=5"; >> document.addFor m.submit(); >> } >> </script> >> >> >> >> LISTING 2 (WORKS) >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> LISTING 3 (DOESN'T WORK) >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> >> >> "Bob Lehmann" <no****@dontbot herme.zzz> wrote in message >> news:Ox******** ******@TK2MSFTN GP12.phx.gbl... >> > Works for me. But, I closed the form </form>. >> > >> > Bob Lehmann >> > >> > "scott" <sb*****@milesl umber.com> wrote in message >> > news:O2******** ******@TK2MSFTN GP12.phx.gbl... >> >> I have a combo in LISTING 2 that I'm trying to force a sumbit when >> >> a > user >> >> makes a change. Can anyone see why it doesn't fire LISTING 2 code? >> >> It just doesn't do anything. What I'm really trying to do is access >> >> the >> >> value of the combo after a user makes a change. I'm just hardcoding >> >> the >> >> teamID querystring in this example. >> >> >> >> LISTING 1 >> >> ------------- >> >> <script type=text/javascript> >> >> >> >> function showTeams() >> >> { >> >> document.addFor m.action = "./mypage.asp?team ID=5"; >> >> document.addFor m.submit(); >> >> } >> >> </script> >> >> >> >> >> >> >> >> LISTING 2 >> >> ------------ >> >> <form action="mypage. asp" method="post" name="addForm"> >> >> >> >> <select class="FormText Box" name="cboCatego ry" >> >> onchange="javas cript:showTeams ();"> >> >> >> >> <OPTION value="1">Work Schedule</OPTION> >> >> <OPTION value="2">Meeti ng</OPTION> >> >> <OPTION value="3">Mills </OPTION> >> >> <OPTION value="5">Teams </OPTION> >> >> </select> >> >> >> >> >> >> >> > >> > >> >> > >
problem solved, i was using the reserved word "action" as a form element
name. thanks for all help.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l... OK.... <form action="mypage. asp" method="post" name="addForm">
<select class="FormText Box" name="cboCatego ry" onchange="showT eams();">
<OPTION value="1">Work Schedule</OPTION> <OPTION value="2">Meeti ng</OPTION> <OPTION value="3">Mills </OPTION> <OPTION value="5">Teams </OPTION> </select> <input type="hidden" name="hdn" value="12"> </form>
Still works.
<ot> So what error are you getting? Post a *complete* sample of your code. </ot>
Bob Lehmann
"scott" <sb*****@milesl umber.com> wrote in message news:u0******** ******@TK2MSFTN GP15.phx.gbl... i will goto jscript group, but just to let you know, the "hidden" form element will ONLOY work as you posted, try giving it a name and value and the onchange event causes error.
"Bob Lehmann" <no****@dontbot herme.zzz> wrote in message news:Or******** *****@tk2msftng p13.phx.gbl... >>> Now, if I have a hidden form element anywhere inside the form tags, > onchange won't fire. > > Sure it will.... > > <form action="mypage. asp" method="post" name="addForm"> > > <select class="FormText Box" name="cboCatego ry" onchange="showT eams();"> > > <OPTION value="1">Work Schedule</OPTION> > <OPTION value="2">Meeti ng</OPTION> > <OPTION value="3">Mills </OPTION> > <OPTION value="5">Teams </OPTION> > </select> > <input type="hidden"> > </form>. > > Listing 3 is identical to Listing 2. When you post to the client-side > group > (microsoft.publ ic.scripting.js cript), include *all* of what you say > doesn't > work. > > Bob Lehmann > > "scott" <sb*****@milesl umber.com> wrote in message > news:e0******** ******@TK2MSFTN GP15.phx.gbl... >> OK guys, I found the real problem because my simple submitted version > worked >> for me also. >> >> IThe combo in LISTING 2 fires the Onchange event perfect. However, >> LISTING > 3 >> will not fire my ONCHANGE event because I've inserted a "hidden" field > after >> the form tag. Now, if I have a hidden form element anywhere inside the > form >> tags, onchange won't fire. >> >> Why would a 'hidden' form element cause a javascript onchange event to >> not >> work? >> >> >> LISTING 1 (WORKS) >> ------------- >> <script type=text/javascript> >> >> function showTeams() >> { >> document.addFor m.action = "./mypage.asp?team ID=5"; >> document.addFor m.submit(); >> } >> </script> >> >> >> >> LISTING 2 (WORKS) >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> LISTING 3 (DOESN'T WORK) >> ------------ >> <form action="mypage. asp" method="post" name="addForm"> >> >> <select class="FormText Box" name="cboCatego ry" >> onchange="javas cript:showTeams ();"> >> >> <OPTION value="1">Work Schedule</OPTION> >> <OPTION value="2">Meeti ng</OPTION> >> <OPTION value="3">Mills </OPTION> >> <OPTION value="5">Teams </OPTION> >> </select> >> >> >> >> >> "Bob Lehmann" <no****@dontbot herme.zzz> wrote in message >> news:Ox******** ******@TK2MSFTN GP12.phx.gbl... >> > Works for me. But, I closed the form </form>. >> > >> > Bob Lehmann >> > >> > "scott" <sb*****@milesl umber.com> wrote in message >> > news:O2******** ******@TK2MSFTN GP12.phx.gbl... >> >> I have a combo in LISTING 2 that I'm trying to force a sumbit when >> >> a > user >> >> makes a change. Can anyone see why it doesn't fire LISTING 2 code? >> >> It just doesn't do anything. What I'm really trying to do is access >> >> the >> >> value of the combo after a user makes a change. I'm just hardcoding >> >> the >> >> teamID querystring in this example. >> >> >> >> LISTING 1 >> >> ------------- >> >> <script type=text/javascript> >> >> >> >> function showTeams() >> >> { >> >> document.addFor m.action = "./mypage.asp?team ID=5"; >> >> document.addFor m.submit(); >> >> } >> >> </script> >> >> >> >> >> >> >> >> LISTING 2 >> >> ------------ >> >> <form action="mypage. asp" method="post" name="addForm"> >> >> >> >> <select class="FormText Box" name="cboCatego ry" >> >> onchange="javas cript:showTeams ();"> >> >> >> >> <OPTION value="1">Work Schedule</OPTION> >> >> <OPTION value="2">Meeti ng</OPTION> >> >> <OPTION value="3">Mills </OPTION> >> >> <OPTION value="5">Teams </OPTION> >> >> </select> >> >> >> >> >> >> >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Scott Castillo |
last post by:
Does anybody know how to auto-submit a form in PHP without Javascript?
For instance, submit form variables to self, validate the data in PHP on
same page, then, if no errors, auto-submit the data via post rather than
URL. Could serialize a few fields to URL, but there is a larger comments
field that I think needs to be posted instead.
...
|
by: Lew |
last post by:
Hi all,
I'm trying to create a page that has a user-selectable page auto-refresh
option (IE 5.5). Essentially, it's a page that contains a checkbox, when
the user checks the checkbox, I'd like the page to auto-refresh every 4
seconds....if the user un-checks the checkbox, I'd like to turn off the auto
refresh.
The page is as follows:
|
by: Prometheus Research |
last post by:
http://newyork.craigslist.org/eng/34043771.html
We need a JavaScript component which will auto-submit a form after a
set period has elapsed. The component must display a counter that
dynamically shows the minutes and seconds remaining before submission.
We have a fairly tight deadline (by 5PM EST, Friday, June 25); we are
using a "bounty"...
|
by: Brian |
last post by:
hello,
I am looking for a way to auto refresh a web page that I created, but
also let the user choose to stop the auto refresh. I can not figure out how
to stop the auto refresh. Any help would be appreciated.
Thanks,
Brian
|
by: Navillus |
last post by:
Hey gang,
I have a login form that is empty by default, but can be filled with
values from a previous form:
<input type=text maxlength="40" size="40" name="user" value="`usr`">
<input type=password maxlength="8" name="password" value="`pss`">
where usr and pss are sent from the previous form.
| |
by: kkuniya |
last post by:
Situation :
- A form (method : POST, action : itself, onsubmit : alert 'Submit' )
- Got 2 submit button ( 'Save' , 'View')
- Got navigation 1|2|3|4
What I want to do :
- Once clicked on the navigation page, it will save the page without
need to click on 'Save' button. Currently, if i manually clicked on the
'Save' button; it will save the...
|
by: Boki |
last post by:
Hi All,
I am creating a program that performs "auto fill in" and "auto submit"
functions.
I will feed the webbrowser the target URL, however, I don't know how
to auto fill in text and submit.
About the submit, I ever tried to use Navigating to catch the new
|
by: laredotornado |
last post by:
Hi,
I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave
|
by: KingKen |
last post by:
I am creating an ASP object that will recieve a table, a field for the table and the search text. I already have "edit objects" created for each table in my DB. what i need is a way to submit the page to the specific edit object - based on the table that the user selects. The user will submit his search which would call the search form, wich in...
|
by: AaronL |
last post by:
Hello,
First I would like to say thank you all for your help in the past. I am stumped again.
I am creating an e-commerce system and I want to be able to upload images to the server and assign them to products. For the product ID, I have an auto increment value for the primary key to avoid duplicate item numbers. Since I do not want to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |