473,396 Members | 1,773 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,396 software developers and data experts.

sliding between forms

hi guys,
I'm new in asp, and hav a question. I have three forms named, read, delete and compose on a single page, it3.asp as .....
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Inbox</title>
  4. <script language="javascript">
  5.  
  6.             function deletemail()
  7.             {    
  8.                 document.read.flag.value="delete";
  9.                 document.read.submit;alert("Delete Selected  Mail?");
  10.                }
  11.             function composemail()
  12.             {
  13.  
  14.                 document.read.flag.value="comp";
  15.                 document.read.submit;alert("Opening Compose Area...");
  16.                }
  17. </script> 
  18. </head>
  19.  
  20.                 <%
  21. dim flg
  22. flg= Request.Form("flag")
  23.  
  24.  
  25. if (flg<>comp and flg<>delete) then
  26.     %>
  27.  
  28.     <body>
  29.     <form name=read  action="it3.asp" method="get">
  30.                      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  31.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  32.                    <input type=Submit value=Delete onClick="deletemail()">
  33.                    <input type=Submit value=Compose onClick="composemail()">
  34.  
  35.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  36.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  37.     <input type=text name="flag" style="visibility:hidden">
  38.     </form>
  39.     </body>
  40.  
  41.                 <%
  42. Else  If (flg = delete) Then
  43.     %>
  44.     <body>
  45.     <form name="delete" action="it3.asp" method="get">
  46.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  47.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  48.                   <input type=text name="flag" value="read"style="visibility:hidden" >    
  49.                      </form>
  50.                     </body>
  51.  
  52.                 <%
  53. Else If (flg = comp) then
  54.     %>
  55.  
  56.     %>
  57.     <body>
  58.     <form name="compose" action="it4.asp" method="get">
  59.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  60.                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  61.                   <input type=text name="flag" value="read" style="visibility:hidden">    
  62.                      </form>
  63.                     </body>
  64.  
  65. </html>
the problem is I cannot get the flag into the page althought it appears on the adress bar. and also, the if statements dont work.

Thankyou
Jul 29 '07 #1
2 1333
jhardman
3,406 Expert 2GB
a couple of thoughts:

1- I don't think parentheses hurt, but they don't help:
Expand|Select|Wrap|Line Numbers
  1. if flg<>"comp" AND flg<>"delete" then
2- elseif is one word, do not put a space in the middle.

3- you mean to say request("flg") = "comp"? It looks like you are trying to compare a request variable to a string, in which case this is the correct syntax:
Expand|Select|Wrap|Line Numbers
  1. if request("flg")<>"comp" AND request("flg")<>"delete" then
4- it makes more sense to handle the if...else statement in the other order:
Expand|Select|Wrap|Line Numbers
  1. if request("flg") = "comp" then
  2.    ...
  3. elseif requst("flg") = "delete" then
  4.    ...
  5. else
  6.    ...
  7. end if
Let me know if this helps.

Jared
Jul 30 '07 #2
thank you Jared, it worked out. thanks for pointing out the errors.
Sep 4 '07 #3

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

Similar topics

1
by: Developwebsites | last post by:
Hi all, I've made a sliding puzzle game in shockwave which works just fine, except I dont know how to have it solve itself. the URL is: http://members.aol.com/rglukov/games/selfsolve.htm ...
0
by: Ben S | last post by:
framework 1.1 in our webapp, we are using forms authentication. ================= Auth Section from web.config ================= <authentication mode="Forms"> <forms name="loginauth"...
8
by: Jakej | last post by:
I've been using a javascript in an html file for a banner slider, and it works as desired. But I'd like to use it on more than one page and it would be great if I could transfer the code to a .js...
2
by: Mohammad Parwez | last post by:
Hi, Can any one help me creating a control, which slides on any particular event. The scenario is something like this: - I have a form, which loads a user control. On load of the form this...
1
by: Guadala Harry | last post by:
AFAIK, when placing an object into the Cache with no special instructions (no dependencies, sliding expirations, hard expirations, etc), it will just sit there in the Cache until the system decides...
2
by: Lonewolf | last post by:
Hi, does anyone know of a way to do sliding window similar to WMP 9's slider bar which can slide up when the mouse gets to the bottom of the screen in fullscreen mode during playback. Basically...
1
by: Lennart | last post by:
I want to add sliding panels, like the ones VS uses for Propery, Toolbox and son on, to my Windows Forms. Can anyone help me? /Lennart
4
by: piter | last post by:
Hi I saw C# application that had sliding panel.. I want my panel to slide in up direction. Is there an efficient way to do this? I thought that i can use Timer and change height , but iam not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.