From: Joe T on 23 Feb 2010 10:54 I am using Access database, ASP, and some Javascript. A Group of two radio buttons. Button "noshow" updates a record and calls a javascript function. The javascript function puts a value in a hiddenfield. Button "show" updates the same record and places a different value in the same hiddenfield without using the javascript function. <label> <input name="RadioGroupA" type="radio" id="noshow" value="<!--" <% If Recordset2("image_code_A")="<!--" Then %> checked <% End if %> onclick="doItA(this);"/> noshow</label> <br /> <label> <input name="RadioGroupA" type="radio" id="show" <% If Recordset2("image_code_A")="" Then %> checked <% End if %> onclick="document.getElementById('hiddenFieldNo').value=" value="""/> show</label> javascript function: function doItA(obj){ obj.form.elements['hiddenFieldNo'].value = "-->"; } When either button is clicked and then Submit, the database gets updated with the new values and the asp page returns displaying the checked radio button. When noshow button is clicked, and submitted, it works fine. The problem is, when the asp page returns, if the Submit button is clicked again, the javascript function does not get called even though the noshow button displays "checked". Even though the noshow button displays "checked" I would have to click the noshow button again, and then hit Submit for the page to call the javascript function. Is there a way to have the previously checked noshow radio button work without having to click it again and work by just Submit the page? --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: mayayana on 23 Feb 2010 13:51 This is a VBScript group. You want a javascript or web scripting group. > I am using Access database, ASP, and some Javascript. > A Group of two radio buttons. > Button "noshow" updates a record and calls a javascript function. The > javascript function puts a value in a hiddenfield. > Button "show" updates the same record and places a different value in > the same hiddenfield without using the javascript function. > > <label> > <input name="RadioGroupA" type="radio" id="noshow" > value="<!--" <% If Recordset2("image_code_A")="<!--" Then %> checked > <% End if %> onclick="doItA(this);"/> > noshow</label> > <br /> > <label> > <input name="RadioGroupA" type="radio" id="show" <% If > Recordset2("image_code_A")="" Then %> checked <% End if %> > onclick="document.getElementById('hiddenFieldNo').value=" value="""/> > show</label> > > javascript function: > function doItA(obj){ > obj.form.elements['hiddenFieldNo'].value = "-->"; > } > > When either button is clicked and then Submit, the database gets updated > with the new values and the asp page returns displaying the checked > radio button. > When noshow button is clicked, and submitted, it works fine. The problem > is, when the asp page returns, if the Submit button is clicked again, > the javascript function does not get called even though the noshow > button displays "checked". Even though the noshow button displays > "checked" I would have to click the noshow button again, and then hit > Submit for the page to call the javascript function. > Is there a way to have the previously checked noshow radio button work > without having to click it again and work by just Submit the page? > > --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Joe T on 23 Feb 2010 14:42 mayayana, Sorry if I'm in the wrong group. Can you post any web scripting newsgroups? mayayana wrote: > This is a VBScript group. You want a javascript > or web scripting group. > > >> I am using Access database, ASP, and some Javascript. >> A Group of two radio buttons. >> Button "noshow" updates a record and calls a javascript function. The >> javascript function puts a value in a hiddenfield. >> Button "show" updates the same record and places a different value in >> the same hiddenfield without using the javascript function. >> >> <label> >> <input name="RadioGroupA" type="radio" id="noshow" >> value="<!--" <% If Recordset2("image_code_A")="<!--" Then %> checked >> <% End if %> onclick="doItA(this);"/> >> noshow</label> >> <br /> >> <label> >> <input name="RadioGroupA" type="radio" id="show" <% If >> Recordset2("image_code_A")="" Then %> checked <% End if %> >> onclick="document.getElementById('hiddenFieldNo').value=" value="""/> >> show</label> >> >> javascript function: >> function doItA(obj){ >> obj.form.elements['hiddenFieldNo'].value = "-->"; >> } >> >> When either button is clicked and then Submit, the database gets updated >> with the new values and the asp page returns displaying the checked >> radio button. >> When noshow button is clicked, and submitted, it works fine. The problem >> is, when the asp page returns, if the Submit button is clicked again, >> the javascript function does not get called even though the noshow >> button displays "checked". Even though the noshow button displays >> "checked" I would have to click the noshow button again, and then hit >> Submit for the page to call the javascript function. >> Is there a way to have the previously checked noshow radio button work >> without having to click it again and work by just Submit the page? >> >> --- news://freenews.netfront.net/ - complaints: news(a)netfront.net --- > > --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: mayayana on 23 Feb 2010 18:26 > Can you post any web scripting newsgroups? I don't use them myself, and I'm not very familiar with Thunderbird, but you should be able to use that to get a list of all MS newsgroups. I know there are several ASP groups. And here are a couple of javascript groups: microsoft.public.inetsdk.programming.scripting.jscript microsoft.public.scripting.jscript
|
Pages: 1 Prev: hai Next: Call to WindowsInstaller object causing 80004005 errors |