Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2006, 08:31 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default onclick problem

Please, I'm an absolute beginner. Following function only makes the first form (dbt1) disabled. The other one (lkf1) remains enabled. Yet it should become disabled as well! What did I do wrong? The function is triggered by an onclick event in following form:
<input type=radio name=dbtSpb1 value=P onclick='return fillin()'; >present

<script language='Javascript'>
function fillin()
{
document.form.dbt1.disabled=true;
document.form.lkf1.disabled=true;
return true;
}
</script>










 
Old October 19th, 2006, 04:44 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii hubertc!!
plz try this one

i think "lkf1" was not getting disabled in ur code because of it can be array of objects in ur code,so if possible put ur code too.
below is correct,check it!!
<form name="form">
<input type=radio name=dbtSpb1 value=P onclick='return fillin()'; >
<input type=button name="lkf1" value="lkf1">
<input type=button name="dbt1" value="dbt1">
present
</form>
<script language='Javascript'>
function fillin()
{
document.form.dbt1.disabled=true;
document.form.lkf1.disabled=true;
return true;
}
</script>


Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Button OnClick problem john6630 ASP.NET 2.0 Basics 2 September 21st, 2007 05:44 PM
Weird problem with dropdown onclick event in IE 7. tovipul21 Classic ASP Basics 1 September 7th, 2007 01:15 PM
onclick with usemap problem raj_2006 Javascript How-To 0 May 9th, 2007 12:54 PM
onClick crmpicco Javascript How-To 1 March 21st, 2005 09:18 AM
onClick event problem mateenmohd Javascript 8 August 2nd, 2003 05:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.