Select function issue

Hello;
I am trying to write a little nav using a select menue. This page is a dynamic page, you can only get to it when there is an URL.ID, if there is not one, it kicks you back to the page that spawns the details page. I have it locked down pretty well with the url.ID, I added the select nav on the detail page so people won't have to go back to the main page for the list of records in that part of the db, and they won't have to cycle through number 1-12 to find a record they want to pull up.I have 2 queries running this. I will comment it out and mainly focus on the select function.
This is the MAIN query, this one runs the page and outputs the info for the details of the records I am bring up. This works fine from the main page link using url.id
<cfquery name="GetRecordevent" datasource="#APPLICATION.dataSource#">
SELECT events.display AS ViewField1, events.title AS ViewField2, events.eventDate AS ViewField3, events.eventTime AS ViewField4, events.location AS ViewField5, events.contact AS ViewField6, events.phone AS ViewField7, events.fax AS ViewField8, events.email AS ViewField9, events.URL AS ViewField10, events.sponsor AS ViewField11, events.Body AS htmlList, events.ID AS ID
FROM events
WHERE events.ID =<cfqueryparam value="#URL.ID#" cfsqltype="cf_sql_integer">
</cfquery>
now this is the tag that locks down the detail page:
<cfif (isDefined ("URL.ID")) OR (isDefined ("value.id"))>
they get the info on this page
<cfelse>
<cflocation url="index.cfm" addtoken="no">
</cfif>
this is the select function and query that populates it with the titles of records and the id
<CFQUERY name="cata" datasource="#APPLICATION.dataSource#" cachedwithin="#CreateTimeSpan(0, 6, 0, 0)#">
SELECT events.title AS ViewField2, events.ID AS ID
FROM events
</CFQUERY>
<cfform Name="eventnav" method="post" Action="detail.cfm?value=#ID#">
     <select name="ID" size="1" class="selectstyle" onChange="eventnav.submit();">
     <option value=""> --Select an Event-- </option>
         <CFOUTPUT query= "cata">
         <option value="#ID#">#ViewField2#</option>
         </CFOUTPUT>
     </select>
</cfform>
now my query is not recognizing the value.id in the url from the select function action part of the form. I tried adding a AND statement and changed it to an OR statement, neither one works. What do I need to do to either change the select function to match a url.id or add to my main query that the select function needs to pull a record?I'm a little confused, my lockdown works as it is with teh OR in it. But my main query is not liking what I am doing.Can anyone help me figure out how to make this work properly?Thank you.Codemonger

CFmonger wrote:
<cfform Name="eventnav" method="post" Action="detail.cfm?value=#ID#">
method="post" means that the data will be submitted as post data in the request which will populate the FORM structure which is different from the URL structure that comes from get data in a request.
The fastest way to fix this would be to change the method parameter to "get" in your cfform tag.
There are also frameworks out there that blend the form and url scopes together so that you do not have to worry about which the data came from.  Fusebox is one such framework.  But doing something like that would be a lot of re-engineering if you have a lot of existing code.
Otherwise you could work your logic to look for the ID value in either the URL or the FORM scopes.
P.S. the ?value=#ID# I just noticed in the action parameter will be populated with the current ID on the page, not the new ID selected by the user from the select control.  So this form is going to submit both POST and GET data with ID values, but those values will be distinct and often different.

Similar Messages

  • Select() function is not working properly in solaris 10.

    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.
    Thanks a lot.
    Regards,
    Srikanth.

    haisrig wrote:
    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.Hi
    It sounds to me that you've been lucky for 20 years then.
    Local POD variables on the stack that aren't explicitly initialized can contain any value. Here's what I see in your app with dbx
    (dbx) run
    Running: sel
    stopped in main at line 9 in file "sel.cpp"
        9      sleeptime.tv_sec = 60;
    (dbx) print sleeptime
    sleeptime = {
        tv_sec  = -4198732
        tv_usec = 0
    }That's on a Solaris 10 SPARC machine. If I try it on a Solaris 10 x86 box then I get
    (dbx) print sleeptime
    sleeptime = {
    tv_sec = -830490588
    tv_usec = 134510556
    and I see the behaviour that you describe.
    Paul

  • Keyboard selective functionality

    Occasionally my keyboard (wired) will not allow me to change files names, create/rename folders, or use any keyboard commands to open or delete files, etc., but it works fine surfing the web, writing email, etc., in all other apps. (I was able to write this post.) For example, Command+N in Finder does nothing, while Command+N in Safari or any other app opens a new window/file, as it should. One minute everything's working fine, the next I can't use my keyboard for these Finder tasks. As long as I don't want to do anything in Finder that requires keyboard input I'm okay, but that's annoying. Things are typically back to normal on restart. Any ideas what's up with this selective functionality? This does not happen all the time, just on occasion. Any thoughts or suggestions for fixing this? Is my keyboard on its way out? It's almost two years old. Thanks!
    G5 Dual 1.8 GHz   Mac OS X (10.4.7)  

    Thanks for the suggestion. I poked around UA but didn't see anything that seems to address this. The thing is, it doesn't happen all the time, so I don't think it's in any of the settings, otherwise it would be a constant issue.
    The challenge too with this problem is that I won't know if it's "fixed" unless it never happens again. So, every day is a good day when I have full use of my keyboard!

  • Why there is no quick selection function in adobe photoshop 6.0.1 [was: cs6.01]?

    Some one my help? why there is no quick selection function in my adobe photoshop 6.0.1 [was: cs 6.01]?

    What John Waller just said.
    And your screen shows it is the archaic, totally superseded Photoshop 6.01, and that was in no way associated with any CS (Creative Suite), so your question title indicating you had "cs6.0.1" was massively and annoyingly misleading and wrong.
    You must be running an ancient machine if that oldie runs on it.
    What's worse you are running an illegal, pirated and hacked version of Photoshop.  You are breaking the law.
    Please don't come back here until you have bought a legal copy of Photoshop.  

  • Function issue of Cross-Reference

    Hi,
    thanks for your attention on this topic.
    there is function issue of Cross-Reference.
    when click the Cross-Reference after re-installed the software (adobe Framemaker 7.10), the function is not working. please kindly check the screenshots below:
    Error message below:
    Please help to check this issue.
    software: Adobe Framemaker 7.10
    System: windows xp sp3
    thanks in advance for your support .
    Message was edited by: Lu Steven

    Fire the error log off to the e-mail address indicated in the error message and then contact Adobe Support.

  • Sender JDBC Adapter Select/Update Issue

    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

    Amit
    Did you ever get a solution to your question ?
       Sender JDBC Adapter Select/Update Issue  
    Posted: Apr 24, 2008 2:29 PM           Reply 
    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

  • Alert is not working for mutiple times for list "select" function in sapui5 XML view

    Hello All,
    I am trying to open an alert for multiple times for list "select" function. But it's opening for only one time .
    Please find code below.
    View Part
    <List id="contactedit" select="somefunction">
        <CustomListItem id="custom1" type="Inactive" >
    <content>
    <Label text="this is label" />
    </content>
    </CustomListItem>
    </List>
    Controller Part
    somefunction: function(oEvent){
    alert("this is an alert");
    Thanks in Advance
    D.Mohanbabu

    I think I saw this question in stack overflow. And I answered it :-)
    I believe that it is because you can only one item in the list and once the item is selected, re-selecting it will not fire the event.
    Try adding more items to the list and select different items.
    Thanks
    -D

  • The select function in Pages and other apps gets stuck and the cursor will not move. What do I do?

    The select function in Pages and other apps gets stuck when I touch a word and the cursor will not move. What is the answer for this problem?

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • How can I use select() function in POSIX thread program.

    Hello
    Now I making a my own progam with POSIX thread in Solaris 8 Environment.
    But I have some trouble in POSIX thread.
    I saw that If use POSIX thread then use -D_POSIX_C_SOURCE=???L flag into compile options in
    Multithreaded Programming Guide.
    So I use that in my Makefile. But I can't compile my program.
    Now I found that if use POSIXC_SOURCE flag, cannot use timeval structure (defined in <sys/time.h>) in <sys/resource.h>.
    So compiling was stop into select() function. Because select() function use timeval structure.
    And fd_set structure(defined in <sys/select.h>) is same.
    How I solve this problem.
    Please help me.
    Thank you.

    Thanks so much for your helpful reply.
    Now I' ve already installed Adobe Creative Suite 6 Production Premium (Student Package), Extended included. But when I open Photoshop CS6, there' s still no 3D function in menu bar.
    Would you please tell me how to activate this function?
    Thanks,

  • IOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    iOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    No PR1.2 Firmware update, No update for Nokia Messaging, No updates for Ovi Maps .... Why is the N900 the forgotten stepchild ?
    "PR1.2 is still being tested - http://twitter.com/luovanto/statuses/13087245356"
    Hong Kong Launch http://www.youtube.com/watch?v=pY8zCBzvQLo

  • Help with select function

    Well guys, I have a problem here and I didn't find any solutions
    So maybe someone of you, can help me!
    My problem is:
    I have 2 numbers (100 and -200) and I have to plot the greater value.
    The problem is for me the signal of -(minus) doesn't means nothing....
    For the program I'm making, the -200 is greater than 100
    So I tryed put bouth as absolute value, but when I have the "answer" only appears the "200"
    and I need it appears -200
    So I thought about something like that:
    I use a select function and maybe do something like that:
    So I have to make something at True or False value at S to make this work!
    If true I receive 100, if is false I receive -200
    Thanks!

    I dont know why is in this section. I posted it on LabVIEW part!
    Well Dennis I make it like that:
    But now I have a problem
    I do the same calc for 3 differents variables like A, B, C
    and after that I have to calc which value is the "greater"
    But my problem is, If I have the values "-350 300 -400"
    the greater will be "300" but for me the "minus" don't mean anything
    so I need the greater value is "400"
    For all positive values, its works fine!
    I compare A and B, after that the greater is compared with C and have a result!
    but When I have negative values and positive values... I got that problem...
    and When I have only negative values I have a problem too. 
    "-300 -400 -500" for me the greater value have to be "-500" but labview shows "-300"
    because -300 is greater than -500 in algebriac.
    And If I use absolute values I will always have a positive value... but I need to know if the value is negative or positive
    Anyone, can help me with that?
    Thanks
    Message Edited by EduU on 10-29-2009 11:06 AM

  • Cannot go to Select Functions to Convert windows for Import Shared library dll

    Hi, 
    As you can see the steps below, i cannot go throgh the Select Function to Convert windows after i click next on Configure Include path steps.
    any idea why is this happening?
    i am using Labview 8.5 and WinXP OS.

    It would help if you provided the DLL and the header file.
    Also, I think the third screenshot was intended to be something else, since it's the step where you specify any additional header files to reference, and not the step where you select what functions to import.

  • Why does SQL execute inner selected functions again in the outer select?

    Hi,
    Why does SQL execute inner selected functions again in the outer select?
    Given:
    CREATE OR REPLACE FUNCTION K_TEST
    RETURN NUMBER IS
    BEGIN
    RETURN 1;
    END;
    SELECT K_TEST, K_TEST FROM DUAL;Will (logically) execute the function twice.
    SELECT intest, intest
    FROM (SELECT K_TEST intest FROM DUAL);Will execute the function twice too!
    Why can't SQL buffer the inner result?
    Does anyone have an idea on how to achieve executing the function only once? My original called function is quite heavy and returning a user defined type. Adding predicates, the function is executed 3 or 4 times!
    Thanks for any tips,
    K.

    Hello
    Depending on your version of Oracle, Sub query caching could help....
    XXXX> create sequence seq_1
      2  /
    Sequence created.
    Elapsed: 00:00:00.07
    XXXX> CREATE OR REPLACE FUNCTION K_TEST
      2  RETURN NUMBER IS
      3
      4      ln_Ret  NUMBER;
      5
      6  BEGIN
      7      SELECT
      8          seq_1.NEXTVAL
      9      INTO
    10          ln_Ret
    11      FROM
    12          dual;
    13
    14      RETURN ln_Ret;
    15  END;
    16  /
    Function created.
    Elapsed: 00:00:00.60
    XXXX>
    XXXX> SELECT K_TEST, K_TEST FROM DUAL;
        K_TEST     K_TEST
             1          2
    1 row selected.
    Elapsed: 00:00:00.06
    XXXX> SELECT K_TEST, K_TEST FROM DUAL;
        K_TEST     K_TEST
             3          4
    1 row selected.
    Elapsed: 00:00:00.01
    XXXX> SELECT intest, intest
      2  FROM (SELECT K_TEST intest FROM DUAL);
        INTEST     INTEST
             5          6
    1 row selected.
    Elapsed: 00:00:00.10
    XXXX> SELECT
      2      intest,intest
      3  FROM
      4      (
      5          SELECT (SELECT K_TEST FROM dual) intest
      6          FROM
      7          dual
      8
      9      )
    10  /
        INTEST     INTEST
             7          7
    1 row selected.
    Elapsed: 00:00:00.03
    XXXX> /
        INTEST     INTEST
             8          8
    1 row selected.
    Elapsed: 00:00:00.01THis last example takes advantage of a specific optimisation for calling functions in a subquery. Not sure if it would suit your circumstance though...
    Alternatively - again depending on your version - you might be able to look at function result caching...
    HTH
    David
    Edited by: Bravid on Feb 1, 2012 12:32 PM

  • If thing 1 is true return true. If thing 2 is true return false. (not quite like select function)

    I have two inputs within my LV program.  I need to output true (or value for true) if input 1 is true but output false (or value for false) if input 2 is true.  The select function allows different outputs but for only 1 input. 

    It should be fairly eeasy to come up with a boolean structure fo this.  For example, you have if input 1 as a true and input 2 as a true, what does it output???
    Normally you can make a table to figure out what structure you could use.  1 = true, 0 = false
    Input 1   Input 2   Output
    0            0            0
    0            1            0  
    1            0            1
    1            1             0 (I am assuming)
    That means if you write it out out need (input 1) * (input 2)' or an And terminal with input 1 wired to a terminal and input 2 wired to a not and then to the other and terminal (see picture)
    Kenny
    Attachments:
    ab not.gif ‏3 KB

  • Stop auditing select statements issued against SYS objects

    Hi,
    My current client has a requirement to track destructive updates (i.e. insert, update, delete) issued by users who can connect directly to the database. At the moment though, SELECT statements issued against SYS-owned objects are also being captured to the Oracle audit trail. For the time being at least these need to be disabled.
    I've issued NOAUDIT SELECT TABLE/SEQUENCE and NOAUDIT SELECT ANY TABLE/SEQUENCE commands, as has a user with the SYSDBA privilege, and they're still being logged. Is there any way to switch these off? I don't know if it's significant (I'm not a DBA by trade) but the audit_sys_operations parameter is set to True.
    My client is currently running Oracle Database 10.2.0.5.0 standard edition.
    If anyone has any suggestions I'd be grateful.
    Thanks in advance,
    Steve

    Hi,
    Thanks for the input so far ...
    @Eduardo and KarK ...
    show parameter audit
    audit_file_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN\USSUPM2\ADUMP
    audit_sys_operations boolean TRUE
    audit_trail string DB, EXTENDED
    If we set audit_sys_operations to FALSE, won't that stop auditing of all actions carried out by, for example, someone who connects as SYSDBA? That is something that's still needed to be captured. Unfortunately they go to the WIndows Event Log but at least they're captured somewhere.
    @Hemant
    This auditing was in place before my client took me on, so I can't say what was used to initiate it unfortunately. What I can say though is that they absolutely don't want to turn off auditing by SYS- type users, just SELECT against SYS-owned objects.
    Thinking simplistically, could I just write a script which trawls dba_objects for sys-owned tables, views and sequences and explicitly issues a noaudit select against what's found, and get one of the sysdba-type people we have access to to run it?
    Thanks in advance (again)
    Steve

Maybe you are looking for

  • Weird characters displayed on page instead of file download/preview

    Hi everyone, I have a download file procedure as per the instructions on the download.oracle.com page The download of the files worked just fine (or better say they were previewed in a new page) but recently a new schema has been added to the workspa

  • The apple symbol keeps flashing on and off and won't reboot

    I dropped my phone and now it won't start and when i plug it in all i get is the apple symbol flashing on and off every few seconds??

  • Alarms not shown on agent details panel

    Hi all, we are conducting experiences with SMC in our environment, and encountered a strange problem. The agent is up and running on a specific client, and we trigger an alarm on the client (e.g.: setlocator on). The alarm properly appears in the pan

  • How to display a xsl linked xml in your jsp?

    I want to have a file like this displayed in my jsp file...any1 know how ? thx http://www.w3schools.com/xsl/cdcatalog_with_xsl.xml

  • How can I run my doclet from main method?

    I want to run doclet from main method. My source is: command = String.format("%s%s%s%s", "cmd /c ", "% javadoc -doclet ", "ExportJavaLib ", "-private " + dir.getAbsolutePath() + ".java"); Runtime.getRuntime().exec(command);My doclet class file is in