472,958 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 1318
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.