Hi!
I have a combobox,it should be disabled when i select a value(say "post") from another combobox.it is working in IE but not in mozilla...can anybody help me??i'm sending the code....
Regards - Select.draw(out,connectionStr, "cmbtype", "", "","", -1,"", true, "",false)
-
-
Select.draw( out, connectionStr , "cmbState", "Arial12px", "", -1, true, "", "","","","")
-
-
if(document.frmIns.cmbtype[document.frmIns.cmbtype.selectedIndex].text.indexOf("Post")!="-1")
-
{
-
-
document.getElementById('cbmState').disabled=true;
-
}
-
else
-
{
-
document.getElementById('cbmState').disabled=false;
-
}
11 2423
Hi!
I have a combobox,it should be disabled when i select a value(say "post") from another combobox.it is working in IE but not in mozilla...can anybody help me??i'm sending the code....
Regards - Select.draw(out,connectionStr, "cmbtype", "", "","", -1,"", true, "",false)
-
-
Select.draw( out, connectionStr , "cmbState", "Arial12px", "", -1, true, "", "","","","")
-
-
if(document.frmIns.cmbtype[document.frmIns.cmbtype.selectedIndex].text.indexOf("Post")!="-1")
-
{
-
-
document.getElementById('cbmState').disabled=true;
-
}
-
else
-
{
-
document.getElementById('cbmState').disabled=false;
-
}
Edit this line ... -
if(document.frmIns.cmbtype.options[document.frmIns.cmbtype.selectedIndex].text.indexOf("Post")!=-1)
-
Wish u best of luck....!!!
Edit this line ... -
if(document.frmIns.cmbtype.options[document.frmIns.cmbtype.selectedIndex].text.indexOf("Post")!=-1)
-
Wish u best of luck....!!!
Thank u...but my problem is the below line is not working in mozilla - document.getElementById('cmbState').disabled=true
'cmbState' is the string name that I gave to combobox..plz check the above code and tell me a solution...
acoder 16,027
Recognized Expert Moderator MVP
Thank u...but my problem is the below line is not working in mozilla - document.getElementById('cmbState').disabled=true
'cmbState' is the string name that I gave to combobox..plz check the above code and tell me a solution...
Is it "cmb" or "cbm"? Check that that is indeed the id of the select and not just the name. If you're using getElementById, the ID should be present. IE erroneously uses the name for the id resulting in poor coding which causes problems in other browsers. Don't test in IE first - use it last.
Is it "cmb" or "cbm"? Check that that is indeed the id of the select and not just the name. If you're using getElementById, the ID should be present. IE erroneously uses the name for the id resulting in poor coding which causes problems in other browsers. Don't test in IE first - use it last.
it's 'cmbState' only not 'cbmstate'..and plz tell me how to give id to the select ...let me know through an example...
acoder 16,027
Recognized Expert Moderator MVP
it's 'cmbState' only not 'cbmstate'..and plz tell me how to give id to the select ...let me know through an example...
You give an id just like you would give a name. It's simply an attribute:
[HTML]<select name="cmbState" id="cmbState"> </select>[/HTML]
You give an id just like you would give a name. It's simply an attribute:
[HTML]<select name="cmbState" id="cmbState"> </select>[/HTML]
Thank u but i want to know how to give id to select tag in this syntax
Select.draw( out, connectionStr , "cmbState", "Arial12px" , "", -1, true, "", qryStr,new String[] {"es001"}, new String[] {"es002"}, model.getState( ), Select.EMPTY_OP TION|Select.EMP TY_AT_TOP );
acoder 16,027
Recognized Expert Moderator MVP
Thank u but i want to know how to give id to select tag in this syntax
Select.draw( out, connectionStr , "cmbState", "Arial12px" , "", -1, true, "", qryStr,new String[] {"es001"}, new String[] {"es002"}, model.getState( ), Select.EMPTY_OP TION|Select.EMP TY_AT_TOP );
Can you show me the code for the draw method?
Can you show me the code for the draw method?
the code for select.draw is - Select.draw( out, connectionStr , "cmbState", "Arial12px", "", -1, true, "", qryStr,new String[] {"es001"}, new String[] {"es002"}, model.getState(), Select.EMPTY_OPTION|Select.EMPTY_AT_TOP );
acoder 16,027
Recognized Expert Moderator MVP
the code for select.draw is - Select.draw( out, connectionStr , "cmbState", "Arial12px", "", -1, true, "", qryStr,new String[] {"es001"}, new String[] {"es002"}, model.getState(), Select.EMPTY_OPTION|Select.EMPTY_AT_TOP );
No, you're probably using a library/framework of some sort which you must have included.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Li Pang |
last post by:
I use a combobox control to populate the data. I want to
prevent to change data (freeze the data in the filed).
The only solution I have is to set Enabled property
to "False", but it gray out the field.
The question is how to change the color back to white?
Set the style property to "Dropdown List" is not an
optional. Is there is another way to fix it. There is a
solution in C++. But I need the codes in VB.Net
|
by: Brian Mitchell |
last post by:
Is it possible to change the fore and back colors of a combo box when its
enabled property is set to false? I need to lock the value of my combo boxes
(and still keep its color) but that control doesn't have a read-only
property.
Thanks!!
|
by: Don |
last post by:
I've looked high and low for some code that will allow me to have a combobox
with a flat borderstyle. I found a few examples, but nothing that was
really usable for me. I had the following criteria that I wanted to meet,
but nothing did:
- No reliance on a separate library
- No unmanaged code
- Easy subclassing of System.Windows.Forms.Combobox (i.e. no custom control
monstrosity)
- No extra funky features that I didn't need
|
by: dbuchanan |
last post by:
VS2005
I've been reading all the help I can on the topic (MSDN, other) but I
can't make sense of this.
Desired behavior;
The user is to choose from the displayed list of the databound combobox
and the coresponding 'Id' from the lookup table is to be inserted into
the field of the new record.
I have two simple tables. "tblPerson" is the data table. The lookup
|
by: Roberto |
last post by:
Hi,
using vb 2005 I'd like to have a combobox in READONLY mode, like I have for
textbox.
Combobox only has enabled property. When I turn this property false I can
not select the text in the combo.
Has anyone solved this problem?
Thanks
| |
by: Vish |
last post by:
Hi,
I need to make the text on a combobox that is disabled to be drawn with a
black color. I was not able to find any help on this online. The drawItem
seems to apply only for the dropdpwn items. Any ideas or sugesstions would be
appreciated.
Thank you,
|
by: Frnak McKenney |
last post by:
Can I use a bound ComboBox for both browsing and editing?
I'm working on a small, standalone database application using Visual
C#.NET 2003 and an Access data file.
In order to keep the number of different screens down to a minimum,
I'm trying to use the same Windows Forms for both browsing and for
updating. This works fine for TextBoxes, but I'm running into
problems with my DropDownLists (ComboBoxes).
|
by: Saww |
last post by:
Hello
lately i have been trying to make a custom combobox with a few targets.
1. to create a disabled items
2. to create a seperator item
I already managed both properties items. i also managed to draw both items as i want(disabled in gray, seperator as a line).
the problem is the user can click on the items, both the line(since it's actually a '-' item) of the seperator item, and the disabled item.
i know i should overrides the WndProc...
|
by: Kevinp |
last post by:
I've spent the last four hours Google searching for a way to disable
items in a Combobox. I found one example in C++ which I can't get to
work and another in C# that I couldn't get to work either.
Does anyone have some good code for an owner-drawn combobox?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |