473,473 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Conditional Formatting

I'm trying to find out if it is possible to use javascript to make a
line of text appear on an HTML page, depending on database values. I
assume it is, but cannot get it to work. The database field is
capable of having one of 3 values, "R", "S", or "N". When the
database value is "R" or "S", I want the line of text to appear on the
page. If the database value is "N", I don't want any text to appear
(blank line is fine...).

I am using several webpages in conjunction with a common.js file and
use Dreamweaver for design.

Any help will be appreciated.

Thanks!
Jul 23 '05 #1
2 1998
T3letech wrote:
I'm trying to find out if it is possible to use javascript to make a
line of text appear on an HTML page, depending on database values. I
assume it is, but cannot get it to work. The database field is
capable of having one of 3 values, "R", "S", or "N". When the
database value is "R" or "S", I want the line of text to appear on the
page. If the database value is "N", I don't want any text to appear
(blank line is fine...).

<snip>

Using a JS to access a database, eh?

Use an if statement. If you're having difficulties, post some code
you're trying to use.

Stewart.
Jul 23 '05 #2
Thanks for the reply Stewart.
If you can't tell...I'm very new to JavaScript. I believe the code is
accessing the database. I am not sure though...

I should have posted my code originally.

Here is the code in my "common.js" file:

document.write('<input name= IS_ATTR_CM_MINOR_LETTER_STATUS_CODE_1"
type="hidden">');

(This fuction is not working...)
//New function for Minor Child rollout:
function MinorChild(sMinorChild) {
if (IS_ATTR_CM_MINOR_LETTER_STATUS_CODE_1 == 'R' ||
IS_ATTR_CM_MINOR_LETTER_STATUS_CODE_1 == 'S'){
sMinorChild = 'Minor Child Letter Request'
//else
//sMinorChild = ''
}
}

Here is the code on my HTML page:

(in the <script> section)
MINOR_CHILD_DATA.innerText = FormatStringData(sMinorChild.value, 0,
'N/A');

(in the body of the page)
<p><span name = "MINOR_CHILD_DATA">Minor Child?</span></p>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
2
by: Von Bailey | last post by:
I have a form where the conditional formatting is set on some fields to bold if certain conditions are met. However, when the conditions are met some of the data that is to bold is either not...
2
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...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
8
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...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
2
by: Filips Benoit | last post by:
Dear All, Access 2003 adp on SQL_server 2005 A continious form showing 1 month based on table 'CALENDAR_MONTH_GRID' and fill with a SP. Fields: Companyname, Day1, day2, etc. The value in the...
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
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...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.