Logic help

This is a discussion on "Logic help" within the JavaScript Forum section. This forum, and the thread "Logic help are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 30th, 2006, 06:14
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Logic help

Any help or direction for further assistance will be highly appreciated.

I have an issue and don't know how to solve it:

I have a form that allows users to input their action items that they need to take care of for the upcoming month in several textboxes.
Once they hit save, it adds these action items to a log form with:
a radio button to select "open" or "closed - considered the status title
a text box for due date - considered the DUE Date of the action items
another text box for closed date - considered Closed date of the action items

We set the Status to automatically check "open" when saved
and we also set the due date to be set automatically as the current date + 30 days.

Problem with this:
what is happening now, there are times not all text boxes have action items so when the user clicks save, it automatically checks the status as "open" and places a due date when THE TEXT BOXES HAVE NO ACTION ITEM.

Now, some users are not leaving the box blank and instead puts:
"N/A", "No Action item to report", "None" etc....

Question:
How can I have the log not except dates or select a status option when there are no action item to report?
I need a logic to place in the code, but for the life of me I don't see how to do this.
Reply With Quote

  #2 (permalink)  
Old Aug 30th, 2006, 20:01
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Logic help

You just need script to action when the form is submitted that checks the boxes for being empty or containing certain strings such as n/a and where that's the case, take no default action.
Reply With Quote
  #3 (permalink)  
Old Aug 31st, 2006, 04:07
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Logic help

Thanks for the info, I thought of the same thing,
but I'd like to write the if then statement but don't know how to write it to "take no action"

example:

If boxes are "blank or contains "N/A" then take no action
else
display status and date


What I'd like the If statement to do is:
if boxes are blank or contains n/a then do not display those boxes, date and status
else
display them

How do I write this in javascript or vbscript?

Thanks for your help.
Reply With Quote
  #4 (permalink)  
Old Aug 31st, 2006, 09:40
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Logic help

Make use of the css attribute 'display: none'.

Without knowing exactly how your pages relate to each other and the code used, I can only give you an idea to work with.

Assume each box has been given an 'id', then as you check a particular boxes content, when you find it is one you do not wish to display, use the following bit of script:

document.getElementById('boxID').style.display = 'none';
Reply With Quote
  #5 (permalink)  
Old Aug 31st, 2006, 14:28
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Logic help

Thanks again. I'll try that.
Reply With Quote
Reply

Tags
logic, help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logic Problem involving loops and arrays tox0tes Other Programming Languages 5 Oct 28th, 2007 03:11
Anybody use flow charts for logic design? Donny Bahama PHP Forum 3 May 8th, 2007 15:44
php While logic dcarson PHP Forum 3 Feb 7th, 2007 18:46
Benbacardi's code logic netwarriorgizmo JavaScript Forum 2 Jul 29th, 2004 09:53


All times are GMT. The time now is 11:04.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43