|
| |
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
Paging rdouglas - 10/3/2002 9:15:04
1) I have created a session in my global.asa file, my question is if I remove the global.asa will there be a time limit on my webpage. since A session ends if a user has not requested or refreshed a page in the ASP application for a specified period. By default, this is 20 minutes. So my thinking is if I remove my globl.asa file from the webpages it will also remove the time limit, will this work? I have already tried to increase the Session Timeout to equal (Session.Timeout=500) but nothing I try has worked so if I remove my global.asa hopefully it will no long kick people out of my database after 20 minutes. So will this work? 2) I have created a web form with drop down menu' s. After the web form is save and you leave the page or even refresh the page it also resets the drop down menu. Is there a way to stop that?
< Message edited by john316 -- 11/15/2002 10:56:48 AM >
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Question: global.asa, sessions and Dropdown menus - 10/3/2002 11:00:55
Spooky, How would I write a session timeout? and where would I place it on the Webpage. In the Begin, <head>, or <body>? John 316
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Spooky or hhammash - 10/23/2002 11:41:01
Spooky or hhammash, can one of you please help me, I have created a web form with drop down menu' s. After the web form is save and you leave the page or even refresh the page it also resets the drop down menu. Is there a way to stop this? John316
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Question: Need HELP - 10/23/2002 17:38:33
Hi, Do you mean that when you select an option from the drop down menu and then refresh the page it resets the drop to the default value? If yes, I get rid of this by having a two frames page (top and bottom) I keep the drop down menu serach field on the top frame and display the results in the bottom one, the results get displayed and the drop down keeps the selected option. Or by having a page with InlineFrame, I keep the drop down on the page and display the results in an InlineFrame (iFrame). Spooky might be able to help you using code. Regards Hisham
< Message edited by hhammash -- 10/23/2002 5:39:53 PM >
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
Calling Spooky - 10/27/2002 19:13:14
Spooky can you help with this problem? John316
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Calling Spooky - 10/29/2002 10:50:01
Spooky and hhammash, On the Below URL you gave some advice on how to maintain state on a select list, here is that URL ( http://www.frontpagewebmaster.com/tm.asp?m=93278&p=1&tmode=1 ). If my code is Currently this: <select name=" DropDownList1" size=" 5" multiple> <option>DropdownItem1</option> <option>DropdownItem2</option> <option>DropdownItem3</option> <option>DropdownItem4</option> <option>DropdownItem5</option> </select> How would I make it equal to the code on the URL above? John316
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/29/2002 10:59:52
Hi John, No that link looks different. It was about passing the value selected to the destination page. Your matter is different. Regards Hisham
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/29/2002 11:02:22
Sorry about that hhammash John316
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/29/2002 11:26:31
Hi John, Are you using a drop down box on the DRW itself? Check this and let me know if this is what you need? Select and Option and press the button: http://www.fmhs.uaeu.ac.ae/nml/Booking/DropList2.asp Regards Hisham
< Message edited by hhammash -- 10/29/2002 12:55:18 PM >
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/29/2002 13:32:37
hhammash, It is almost exactly what I am looking for, the only difference is on your first page I have my drop down menu as a list and allow multiple selections. I tried to do this with your code and it did not work. John316
< Message edited by John316 -- 10/29/2002 1:32:52 PM >
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/30/2002 0:12:28
Hi, I t hink you need to use " IN" in the sql and you have to make the selection box as an Array to be able to hold more than one value. I think either Spooky or rdouglas can handle that. It is a FAQ now, I hope that they solve it. I' ll try my books and see if I can help. Regards Hisham
< Message edited by hhammash -- 10/30/2002 12:41:55 AM >
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/30/2002 3:32:03
Hi, Try this if your search field is numeric <% fp_sQry=" SELECT * FROM Table WHERE FieldName IN (" &MultiSelectField&" )" For text you have to use the Replace function, I still don' t know how, may be Spooky or rdouglas can help. Hisham
< Message edited by hhammash -- 10/30/2002 4:00:30 AM >
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Spooky, hhammash or anyone please help me - 10/30/2002 11:51:39
Spooky or rdouglas, If you look at this URL (http://www.fmhs.uaeu.ac.ae/nml/Booking/DropList2.asp ) provided by hhammash why is it that the drop down menu will not save the value once you submit it, or try to view it on the next page or even refresh the page? John316
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Paging Spooky or rdouglas - 10/30/2002 12:00:15
Hi John, I chagned the code, it saves now, but the problem It can' t search mutliple because it is not numeric, as I have stated in my previous post. Try it now. Wee need Spooky or rdouglas for help on making multiple search on alphanumeric using the &FieldName&. Regards Hisham
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Spooky or rdouglas - 10/31/2002 9:17:13
all, Please read Hisham statement above. Can any of you help? Thanks, John316
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Spooky or rdouglas - 10/31/2002 9:19:33
rdouglass, My website is now setup to look excatly like this http://www.fmhs.uaeu.ac.ae/nml/Booking/DropList2.asp John316
< Message edited by John316 -- 10/31/2002 9:20:37 AM >
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 9:28:05
I' m pretty sure I can build this code. 2 questions: What happened to the multiselect dropdown? What is the data type in the DB: text or dates?
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 9:36:02
it was taken off since it did not work. and my data type is text John316
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 10:22:04
Well here is my solution using dates and multi-select dropdowns. On the results page (the page you' re posting to) put code like this ABOVE the DRW: <%DIM mySQL, stringTemp, arrayTemp mySQL = " " stringTemp = Request.Form(" EntryDate" ) arrayTemp = split(stringTemp," ," ) For i = 0 to (UBound(arrayTemp)-1) mySQL = mySQL & " EntryDate = #" & trim(arrayTemp(i)) & " # OR " NEXT mySQL = mySQL & " EntryDate = #" & trim(arrayTemp(UBound(arrayTemp))) & " #" %> Then change your DRW query line to something like this: fp_sQry=" SELECT * FROM Messages WHERE (" & mySQL & " )" This does work for me and my DB. You will probably need to change the table name (mine is " Messages" ) and the Request.Form and fieldname items (mine here is " EntryDate" ), but this should work. Also, you' ll need to remove the ' #' s from the code above if you' re using text. You may or may not have to replace them with a ' . I suspect not, but if it doesn' t work without ' em, put ' em in... Hope this helps...
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 10:54:02
Question: what does DRW stand for? and will your code work for normal text fields also? John316
< Message edited by John316 -- 10/31/2002 10:55:05 AM >
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 11:25:44
DRW stands for " Database Results Wizard" and yes, it should work for text fields. However; you' ll either have to replace the " #" with a single quote (for a text delimiter) or you' ll have to remove them entirely - I haven' t tested it - but the theory remains the same.....
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 13:54:35
rdouglass, It seems to work with dates, but how would I get it to work with text? John316
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 10/31/2002 14:50:15
Again, I haven' t tested with text so it' s either: <%DIM mySQL, stringTemp, arrayTemp mySQL = " " stringTemp = Request.Form(" EntryDate" ) arrayTemp = split(stringTemp," ," ) For i = 0 to (UBound(arrayTemp)-1) mySQL = mySQL & " EntryDate = ' " & trim(arrayTemp(i)) & " ' OR " NEXT mySQL = mySQL & " EntryDate = ' " & trim(arrayTemp(UBound(arrayTemp))) & " ' " %> OR <%DIM mySQL, stringTemp, arrayTemp mySQL = " " stringTemp = Request.Form(" EntryDate" ) arrayTemp = split(stringTemp," ," ) For i = 0 to (UBound(arrayTemp)-1) mySQL = mySQL & " EntryDate = " & trim(arrayTemp(i)) & " OR " NEXT mySQL = mySQL & " EntryDate = " & trim(arrayTemp(UBound(arrayTemp))) %> See, I' m just working with the delimiters: # delimits Dates ' delimits text (don' t use delimiters for numbers) See here for more delimiters
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging Long Island Lune, bobby, Spooky and rdouglas - 11/15/2002 11:02:21
rdouglas, My code is working and I am listing it below, Here is my question: The Request.Query command will only work for the drop down when the input is from the previously visited page. It basically grabs the data from the previous page and uses it to modify the drop down menu. It does not touch the database at all. If I would like the drop down to be database-driven, I will need to change the Request.Query command to a different variable. This variable I think would come from my Session object retrieved from the database would you know how to do this? John316 <html> <head> <meta http-equiv=" Content-Type" content=" text/html; charset=windows-1252" > <meta name=" GENERATOR" content=" Microsoft FrontPage 4.0" > <meta name=" ProgId" content=" FrontPage.Editor.Document" > <title>New Page 1</title> </head> <body> <form action=test1.asp method=" get" > <% For i = 1 to Request.QueryString(" position" ).Count if Request.QueryString(" position" )(i)=" 1" then choice1=" yes" if Request.QueryString(" position" )(i)=" 2" then choice2=" yes" if Request.QueryString(" position" )(i)=" 3" then choice3 =" yes" Next %> <p><select size=" 3" name=" position" multiple> <option value=" 1" <%if instr(choice1, " yes" ) then response.write(" SELECTED" )%>>Choice 1</option> <option value=" 2" <%if instr(choice2, " yes" ) then response.write(" SELECTED" )%>>Choice 2</option> <option value=" 3" <%if instr(choice3, " yes" ) then response.write(" SELECTED" )%>>Choice 3</option> </select><input type=" submit" value=" Submit" name=" B1" ><input type=" reset" value=" Reset" name=" B2" ></p> </form> </body> </html>
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Paging rdouglas - 11/15/2002 11:19:44
You could use a session, but I' m not sure I would. You may want to consider changing it to Request.Form and use hidden fields along the way. Your code could look something like: <% For i = 1 to Request.Form(" position" ).Count if Request.Form(" position" )(i)=" 1" then choice1=" yes" if Request.Form(" position" )(i)=" 2" then choice2=" yes" if Request.Form(" position" )(i)=" 3" then choice3 =" yes" %> <input name=" position<%=i%>" type=" hidden" value=" <%=Request.Form(" position" )(i)%>" > <% Next %> If we use the hidden form field, we can pass it along as many times as we need to. Does that make sense at all?? If you still want / need to use sessions, the general format for a session is: <%Session(" mySessionName" ) = myValue%> and to read it: <%=Session(" mySessionName" )%>
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: Paging rdouglas - 11/15/2002 13:57:38
So if I wanted to use a Sessio, how would I use it with this example? John316
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|