473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

immediate if statement

110 100+
I am having some problems getting the immediate if statement (iif) to work in javascript. Is there a particular version of javascript I should be using? I will be operating on an Apache server.
Apr 16 '09 #1
4 19256
iam_clint
1,208 Expert 1GB
javascript has nothing to do with apache
for an iif in javascript you use it like this
Expand|Select|Wrap|Line Numbers
  1. ((conditions)?"true":"false")
  2.  
Apr 16 '09 #2
andersond
110 100+
Okay. Here's my code, according to your instructions. It causes an error saying "object expected"

Expand|Select|Wrap|Line Numbers
  1. var cGVW= iif((cBody=="Tractor")? rtrim(document.getElementById('GVW'+x).value): "");
  2.  
I also tried the syntax I use in other languages but got the same error

Expand|Select|Wrap|Line Numbers
  1. var cGVW= iif(cBody=="Tractor", rtrim(document.getElementById('GVW'+x).value), "");
  2.  
what am I doing wrong?
Apr 17 '09 #3
Dormilich
8,658 Expert Mod 8TB
@andersond
the syntax (as far as I know there is no iif() function).
Expand|Select|Wrap|Line Numbers
  1. var x = condition ? true_statement : false_statement;
see MDC – Conditional Operator
Apr 17 '09 #4
iam_clint
1,208 Expert 1GB
in my example I never put the letters iif.. it was a correct example
Apr 17 '09 #5

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

Similar topics

2
by: michi | last post by:
Hello there... Can anybody tell me what is the difference when I excecute a sql statement within pl sql with/without "execute immediate" statement Thanks Michi :)
4
by: finlma | last post by:
I'm trying to run an EXECUTE IMMEDIATE within a PL/SQL if loop but it doesn't work for me. I'm trying to create a column conditionally but it doesn't work. It fails because there are apostrophes...
4
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! I have two tables TABLE1 and TABLE2 each has it's own primary key. TABLE2 has a foreign key to TABLE1 and TABLE1 has foreign key to TABLE2. Now I have done a LOAD FROM NUL REPLACE INTO...
70
kiss07
by: kiss07 | last post by:
Hi, i want 2 and 3 rd max salary in a table .i want a single query. please help.. Arun
4
by: Armin Zingler | last post by:
Hi, I feel fooled.. In the immediate window, if I enter ? DateTime.Now.Kind I get "Unspecified {0}". The result - I expected "local" - lead to some time consuming deliberations. Today, I...
1
by: lakon15 | last post by:
Dear all, I'll try to convert from SQL server Store Procedure to DB2 Store Procedure. I've make SP under DB2 like this CREATE PROCEDURE GetSearchedRecords (pKeyWords VARCHAR(1000), ...
2
by: kannan1983 | last post by:
what is the difference between TRUNCATE TABLE table_name and EXECUTE IMMEDIATE'TRUNCATE TABLE table_name' is there any performance issue between this two? which is best to use in...
3
by: DoctorIce | last post by:
Guys, Im experiencing a strange problem. I'm using the Immediate window in Access 2000 to track output from a program as it loops through a recordset. So, I'm using Debug.Print statements to sent...
5
by: umesh049 | last post by:
Hello, I want to delete all the date of all the table in a scheman. but i got error at execute immediate statement. can any body help me. thanks
3
by: Rahul Babbar | last post by:
Hi, I have the following doubt. Suppose I use the execute immediate statement and the statement to be executed is a Select statement from the sysibm.sysdummy1 table which will always return...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
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,...

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.