473,761 Members | 9,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

conditional Comparision like if (flg==true) a=

1 New Member
a java script code in condition works properly in IE but not works in Mozilla browser.
my certain portion of code will execute after complete the statement in Mozilla while no in IE.

plz ,give any solution
Sep 19 '12 #1
2 1495
ariful alam
185 New Member
You should show your code that written by you. That will help experts to test the code and help you.

:)
Sep 19 '12 #2
jdstankosky
30 New Member
Not sure what code you're talking about, but perhaps this will help:

Expand|Select|Wrap|Line Numbers
  1. if (flg == true) {
  2.     a = "Whatever you're trying to do";
  3. }
  4. if (flg == false) {
  5.     a = "The other thing you're trying to do";
  6. }
  7.  
  8. // You could also do the following:
  9.  
  10. switch (flg) {
  11.     case true:
  12.         a = "Whatever you're trying to do";
  13.         break;
  14.     case false:
  15.         a = "The other thing you're trying to do";
  16.         break;
  17.     default:
  18.         // If neither case is true, do this...
  19. }
  20.  
Sep 21 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

28
3464
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found <!> in the original MSDN documentation, but this is (although it is working) unfortunately non-validating gibberish. So I fooled around trying to find a way to make it valid. And voila: <!--><!><!-->
2
1190
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold when the date has passed. Background: I have 2 related fields that are only rarely active, so I manage them in the query for the subform: ShowBlanket: IIf(,"Blanket","") and
9
1475
by: jaym1212 | last post by:
Execution of the following simple code results in variable z being assigned the value of 1 ... x = 234; y = 234; z = (x == y); .... but I wanted z to be 234. What is the most efficient method (min CPU cycles) of doing this? (I realize it could be accomplished as follows)
3
1642
by: kd | last post by:
Hi All, How to perform case-insensitive comparision of strings? Would there be some kind of an indicator, which when set to true, would allow case-insenitive comparision of strings using if/select case, etc; after performing the case-insenisitive compare, the indicator can be reset to allow the conventional comparision of strings? kd
8
4789
by: Morgan | last post by:
Hi all, I was messing around with someone elses script when I noticed that he had used the in keyword in an if conditional to compare a string with a object. I've never seen this used and was wondering about the logic behind it. I had previously assumed that the in keyword passed the properties of an object to a variable, as you do in a for/in loop. How is it that it can be used in a comparsion? example:
2
2666
by: nirav.lulla | last post by:
I have been given the task to come up with Requirements, Comparision and Migration document from Shadow Direct to DB2 Connect. I am very new much to all this, but kind of know a little bit about both of them. There has been a lot of pressure from business to move to DB2 Connect from Shadow Direct which the company is currently using since almost 7 years. I would greatly appreciate if any one of you can help or send me some comparision...
8
8507
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works perfectly. However, I have code that runs under the ON CLICK event. The code changes the focus to other controls, which means the conditional formatting is no longer displayed. This part makes sense to me. Here's what doesn't make sense. The last...
5
2904
by: paulo | last post by:
Can anyone please tell me how the C language interprets the following code: #include <stdio.h> int main(void) { int a = 1; int b = 10; int x = 3;
3
4279
by: abctech | last post by:
I have an Html page, user enters a Date (dd-mm-yyyy) here. There's a servlet connected in the backend for processing this submitted information, it must have a method to compare this entered date with the dates obtained from the backend table which again are retrieved as strings (dd-mm-yyyy). Can anyone suggest how to carry out comparision between these date strings? Eg: String Entered Date: "28-02-2007" String Backend Date:...
1
1776
by: koduruabhinav | last post by:
Hi, I have two files and each consists of modules and in turn modules consists of some verilog data and instances.i have to search for module name in the two files and comapare the contents of the modules in the two files. i have code it does module search,extract the contents of modules and compare
0
9554
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
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,...
0
10136
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9923
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,...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3911
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
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.