Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-04-2013, 02:43 PM   PM User | #1
Chamark
New Coder

 
Join Date: Nov 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Chamark is an unknown quantity at this point
Function Help - Newbie needs help

Beginner - Using Classic ASP - Dreamweaver - SQL 2008 - I have a Web page where I create a Session that houses an ID based on the user's input. The ID can either start with a W or not. I pass the Session to an SQL query which brings back data used in a Web form that has some fields on the form auto-populated. I want to be able to have a function that would, based on the Session ID, go to formA if the Session starts with W or goes to formB if it does not start with a W. Any help is greatly appreciated.
Chamark is offline   Reply With Quote
Old 02-04-2013, 03:09 PM   PM User | #2
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 960
Thanks: 7
Thanked 100 Times in 100 Posts
WolfShade is an unknown quantity at this point
You wouldn't use JavaScript for that; that would be server-side (Classic ASP) conditional.

Correction: You _shouldn't_ use JavaScript for that. Better done in Classic ASP.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 02-04-2013, 03:12 PM   PM User | #3
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,495
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
We are not here to code on demand. We help you if you have trouble with your code. If you have coded this please post and we'll see if we can find the problem.

This is a simple function to code. Simply call the session id variable and do an if /else on it. That's all.
sunfighter is offline   Reply With Quote
Old 02-04-2013, 06:20 PM   PM User | #4
Chamark
New Coder

 
Join Date: Nov 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Chamark is an unknown quantity at this point
Thanks to all - yes it is simple for those that know - This is what worked for me

<%

If (LEFT(Session("WITEM"),1) <> "W") Then
Response.Redirect("GTSO_Entry_form.asp")
Else
Response.Redirect("Triage.asp")
End If
%>

I appreciate the help and not coding it for me.
Chamark is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 10:18 PM.


Advertisement
Log in to turn off these ads.