Ask a Question related to ASP.NET General, Design and Development.
-
Vidar Petursson #1
Re: Client side action to cause postback
Hi
As soon as anything is added to the textbox set radio checked and submit?
myBox.Attributes.Add("onkeypress","if(this.value != '')
{this.form.myRadio.checked=true; this.form.submit()}");
Note if radiobtn list then you have to use index
this.form.myRadio[INDEX].checked = true;
Is checkbox not a better choice than radio
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Antonio Maciel" <antmac@consys.com> wrote in message
news:e%23o0596RDHA.2432@TK2MSFTNGP10.phx.gbl...is> Hi.
>
> I have a client-side script associated with the onKeyPress event of a
> textbox. When my user types any character on the textbox I need to check a
> radiobutton and causes a postback to the server. I tried this expression
> txtPostalCode.Atributes.Add("onKeyPress",
> "document.Form1.rbSelection.checked=true; return true;"). The radiobutton> checked but no postback occurs. How can I raise a postback from this code?
>
> Thanks,
>
> Antonio Maciel
>
>
Vidar Petursson Guest
-
custom web control +client-side javascript + postback
Hello, I am trying to create a new Web Control (ASP.NET 1.1) that contains among other textboxes. The content of these textboxes (runat=server)... -
flashcom: client side cant access server side
hi all, i hav install the flash com on the PC. It work well, on the server PC, i can access and log in to the 'chat room'.. however, if im... -
Controls with a client side onLoad function or seting a cursor server side
Is there any way to create a web control that calls a client side onLoad function? Its diffucilt since you are not able to access the form or... -
Client side and server side scripting problem
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve... -
button evet ---- server side - client side ???
I want to use button. My question is that How can use server side and client site event at the same time. That is: I want to use button : when... -
Antonio Maciel #2
Re: Client side action to cause postback
Hi Vidar.
Your code works, but as soon as the form is submited the value of the
textbox is lost. Do you have any idea on why?
Thanks,
Antonio Maciel.
"Vidar Petursson" <theking@icysoft.com> wrote in message
news:%23XxE0F7RDHA.2188@TK2MSFTNGP10.phx.gbl...a> Hi
>
> As soon as anything is added to the textbox set radio checked and submit?
>
> myBox.Attributes.Add("onkeypress","if(this.value != '')
> {this.form.myRadio.checked=true; this.form.submit()}");
>
> Note if radiobtn list then you have to use index
> this.form.myRadio[INDEX].checked = true;
>
> Is checkbox not a better choice than radio
>
> --
> Best Regards
> Vidar Petursson
> ==============================
> Microsoft Internet Client & Controls MVP
> ==============================
> "Antonio Maciel" <antmac@consys.com> wrote in message
> news:e%23o0596RDHA.2432@TK2MSFTNGP10.phx.gbl...> > Hi.
> >
> > I have a client-side script associated with the onKeyPress event of a
> > textbox. When my user types any character on the textbox I need to checkradiobutton> > radiobutton and causes a postback to the server. I tried this expression
> > txtPostalCode.Atributes.Add("onKeyPress",
> > "document.Form1.rbSelection.checked=true; return true;"). Thecode?> is> > checked but no postback occurs. How can I raise a postback from this>> >
> > Thanks,
> >
> > Antonio Maciel
> >
> >
>
Antonio Maciel Guest
-
Vidar Petursson #3
Re: Client side action to cause postback
Hi
ahh.... use onkeyup instead of onkeypress
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Antonio Maciel" <antmac@consys.com> wrote in message
news:eYIf3l7RDHA.3796@tk2msftngp13.phx.gbl...submit?> Hi Vidar.
>
> Your code works, but as soon as the form is submited the value of the
> textbox is lost. Do you have any idea on why?
>
> Thanks,
>
> Antonio Maciel.
>
> "Vidar Petursson" <theking@icysoft.com> wrote in message
> news:%23XxE0F7RDHA.2188@TK2MSFTNGP10.phx.gbl...> > Hi
> >
> > As soon as anything is added to the textbox set radio checked andcheck> >
> > myBox.Attributes.Add("onkeypress","if(this.value != '')
> > {this.form.myRadio.checked=true; this.form.submit()}");
> >
> > Note if radiobtn list then you have to use index
> > this.form.myRadio[INDEX].checked = true;
> >
> > Is checkbox not a better choice than radio
> >
> > --
> > Best Regards
> > Vidar Petursson
> > ==============================
> > Microsoft Internet Client & Controls MVP
> > ==============================
> > "Antonio Maciel" <antmac@consys.com> wrote in message
> > news:e%23o0596RDHA.2432@TK2MSFTNGP10.phx.gbl...> > > Hi.
> > >
> > > I have a client-side script associated with the onKeyPress event of a
> > > textbox. When my user types any character on the textbox I need toexpression> a> > > radiobutton and causes a postback to the server. I tried this> radiobutton> > > txtPostalCode.Atributes.Add("onKeyPress",
> > > "document.Form1.rbSelection.checked=true; return true;"). The> code?> > is> > > checked but no postback occurs. How can I raise a postback from this>> >> > >
> > > Thanks,
> > >
> > > Antonio Maciel
> > >
> > >
> >
>
Vidar Petursson Guest
-
David Waz... #4
Re: Client side action to cause postback
why not just set the AutoPostback=True on the radio button?
"Vidar Petursson" <theking@icysoft.com> wrote in message
news:u0RLOw7RDHA.2460@TK2MSFTNGP10.phx.gbl...a> Hi
>
> ahh.... use onkeyup instead of onkeypress
>
>
> --
> Best Regards
> Vidar Petursson
> ==============================
> Microsoft Internet Client & Controls MVP
> ==============================
> "Antonio Maciel" <antmac@consys.com> wrote in message
> news:eYIf3l7RDHA.3796@tk2msftngp13.phx.gbl...> submit?> > Hi Vidar.
> >
> > Your code works, but as soon as the form is submited the value of the
> > textbox is lost. Do you have any idea on why?
> >
> > Thanks,
> >
> > Antonio Maciel.
> >
> > "Vidar Petursson" <theking@icysoft.com> wrote in message
> > news:%23XxE0F7RDHA.2188@TK2MSFTNGP10.phx.gbl...> > > Hi
> > >
> > > As soon as anything is added to the textbox set radio checked and> > >
> > > myBox.Attributes.Add("onkeypress","if(this.value != '')
> > > {this.form.myRadio.checked=true; this.form.submit()}");
> > >
> > > Note if radiobtn list then you have to use index
> > > this.form.myRadio[INDEX].checked = true;
> > >
> > > Is checkbox not a better choice than radio
> > >
> > > --
> > > Best Regards
> > > Vidar Petursson
> > > ==============================
> > > Microsoft Internet Client & Controls MVP
> > > ==============================
> > > "Antonio Maciel" <antmac@consys.com> wrote in message
> > > news:e%23o0596RDHA.2432@TK2MSFTNGP10.phx.gbl...
> > > > Hi.
> > > >
> > > > I have a client-side script associated with the onKeyPress event of> check> > > > textbox. When my user types any character on the textbox I need to> expression> > a> > > > radiobutton and causes a postback to the server. I tried this>> > radiobutton> > > > txtPostalCode.Atributes.Add("onKeyPress",
> > > > "document.Form1.rbSelection.checked=true; return true;"). The> > code?> > > is
> > > > checked but no postback occurs. How can I raise a postback from this> >> > > >
> > > > Thanks,
> > > >
> > > > Antonio Maciel
> > > >
> > > >
> > >
> > >
> >
>
David Waz... Guest



Reply With Quote

