Am I wasting my time? I seek council.

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Am I wasting my time? I seek council.

    My page has <cfinclude> to create the top menu, which includes text input
    fields for search parameters. Another <cfinclude> sets a page to below and
    left, which displays names and record info read from a database. I would like
    the search field to pop up the find in the left area, but is that possible?
    That's where the <cfinclude> file is.

    Captain Ru Guest

  2. Similar Questions and Discussions

    1. Hide and Seek Tools
      I have lost my main tool selector. I tried to hide it and then show it (command-F2), but it did not reappear. Any ideas?
    2. quicktime seek and currentime
      Hello I am trying to make a program which has power point slides(jpgs) and a talking head video which is in quicktime format.....i need to...
    3. seek for help
      Hi All, I got a question about connecting the SQL server database with a asp page. I just wanna know if I got a asp page in a location A and...
    4. illegal seek
      I was debugging a totally unrelated problem yesterday and put in a quick and dirty print line with $! in it. Now as it happened the bit of code I...
    5. Council to make an sp.
      I must to implent a sp that checks data into a one to one relationed table and let me know if all data is available or not. To better understand...
  3. #2

    Default Re: Am I wasting my time? I seek council.

    do you have any code you can post?
    jorgepino Guest

  4. #3

    Default Re: Am I wasting my time? I seek council.

    empdir.cfm

    <cfinclude template="topmenu.cfm">
    <table width = "100%">
    <tr>
    <td width ="50%"><cfinclude template="leftmenu.cfm"></td>
    <td><cfinclude template="data.cfm"></td>
    </tr>
    </table>

    Captain Ru Guest

  5. #4

    Default Re: Am I wasting my time? I seek council.

    topmenu.cfm



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>EMP List</title>
    <link rel="stylesheet" type="text/css" href="CSS/emp.css">

    <SCRIPT language="JavaScript">
    if (document.images)
    {
    pic1on= new Image(11,11);
    pic1on.src="Images/sort_asc_over.jpg";
    pic2on= new Image(11,11);
    pic2on.src="Images/sort_desc_over.jpg";
    pic3on= new Image(11,11);
    pic3on.src="Images/sort_asc_over.jpg";
    pic4on= new Image(11,11);
    pic4on.src="Images/sort_desc_over.jpg";
    pic5on= new Image(11,11);
    pic5on.src="Images/sort_asc_over.jpg";
    pic6on= new Image(11,11);
    pic6on.src="Images/sort_desc_over.jpg";
    pic7on= new Image(11,11);
    pic7on.src="Images/sort_asc_over.jpg";
    pic8on= new Image(11,11);
    pic8on.src="Images/sort_desc_over.jpg";

    pic1off= new Image(11,11);
    pic1off.src="Images/sort_asc.jpg";
    pic2off= new Image(11,11);
    pic2off.src="Images/sort_desc.jpg";
    pic3off= new Image(11,11);
    pic3off.src="Images/sort_asc.jpg";
    pic4off= new Image(11,11);
    pic4off.src="Images/sort_desc.jpg";
    pic5off= new Image(11,11);
    pic5off.src="Images/sort_asc.jpg";
    pic6off= new Image(11,11);
    pic6off.src="Images/sort_desc.jpg";
    pic7off= new Image(11,11);
    pic7off.src="Images/sort_asc.jpg";
    pic8off= new Image(11,11);
    pic8off.src="Images/sort_desc.jpg";
    }

    function lightup(imgName)
    {
    if (document.images)
    {
    imgOn=eval(imgName + "on.src");
    document[imgName].src= imgOn;
    }
    }

    function turnoff(imgName)
    {
    if (document.images)
    {
    imgOff=eval(imgName + "off.src");
    document[imgName].src= imgOff;
    }
    }
    </SCRIPT>

    </head>

    <body leftmargin="0" topmargin="0">

    <table bgcolor="#EEE8AA" width="100%" height = "10%" cellpadding="0"
    cellspacing="0" border="1">
    <tr>
    <td colspan = "5" align = "center">&nbsp;</td>
    </tr>
    <tr bgcolor="#ffffff">
    <th width="120" nowrap align="left">&nbsp;Last:<img
    src="Images/sort_asc.jpg" name="pic1" width="11" height="11"
    style="cursor:hand"
    onClick="window.open('Emp_List.cfm?Sort=Last_asc', 'mainFrame')"
    onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')"><img
    style="cursor:hand" src="Images/sort_desc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=Last_DESC' ,'mainFrame')" name="pic2"
    onMouseover="lightup('pic2')" onMouseout="turnoff('pic2')"></th>
    <th width="110" nowrap align="left">&nbsp;First:<img style="cursor:hand"
    src="Images/sort_asc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=First_asc' ,'mainFrame')" name="pic3"
    onMouseover="lightup('pic3')" onMouseout="turnoff('pic3')"><img
    style="cursor:hand" src="Images/sort_desc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=First_DESC ','mainFrame')" name="pic4"
    onMouseover="lightup('pic4')" onMouseout="turnoff('pic4')"></th>
    <th width="65" nowrap align="left">&nbsp;Ext:<img style="cursor:hand"
    src="Images/sort_asc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=Ext_asc',' mainFrame')" name="pic5"
    onMouseover="lightup('pic5')" onMouseout="turnoff('pic5')"><img
    style="cursor:hand" src="Images/sort_desc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=EXT_DESC', 'mainFrame')" name="pic6"
    onMouseover="lightup('pic6')" onMouseout="turnoff('pic6')"></th>
    <th width="110" nowrap align="left">&nbsp;Branch:<img style="cursor:hand"
    src="Images/sort_asc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=BRANCH_asc ','mainFrame')" name="pic7"
    onMouseover="lightup('pic7')" onMouseout="turnoff('pic7')"><img
    style="cursor:hand" src="Images/sort_desc.jpg"
    onClick="window.open('Emp_List.cfm?Sort=BRANCH_DES C','mainFrame')" name="pic8"
    onMouseover="lightup('pic8')" onMouseout="turnoff('pic8')"> </th>
    <th width="100%" nowrap align="left">&nbsp;*Click on the up / down arrows to
    sort by any column</th>
    </tr>
    <tr>
    <cfform name="Search_Lname_Form" action="Emp_list.cfm?Search_lname=Yes"
    target="mainFrame"><td height="24" nowrap><input type="text"
    name="Search_lname_Input" size="8"><img style="cursor:hand"
    src="Images/SEARCH.gif" onClick="Search_Lname()"></td></cfform>
    <cfform name="Search_Fname_Form" action="Emp_list.cfm?Search_Fname=Yes"
    target="mainFrame"><td nowrap><input type="text" name="Search_FName_Input"
    size="8"><img style="cursor:hand" src="Images/SEARCH.gif"
    onClick="Search_Fname()"></td></cfform>
    <cfform name="Search_EXT_Form" action="Emp_list.cfm?Search_EXT=Yes"
    target="mainFrame"><td nowrap><input type="text" name="Search_EXT_Input"
    size="1"><img style="cursor:hand" src="Images/SEARCH.gif"
    onClick="Search_EXT()"></td></cfform>
    <cfform name="Search_Branch_Form" action="Emp_list.cfm?Search_Branch=Yes"
    target="mainFrame"><td nowrap><input type="text" name="Search_Branch_Input"
    size="15"><img style="cursor:hand" src="Images/SEARCH.gif"
    onClick="Search_Branch()"></td> </cfform>
    </tr>
    </table>

    <script language="vbscript">
    sub Search_Lname()
    document.Search_Lname_Form.submit
    end sub
    </script>
    <script language="vbscript">
    sub Search_Fname()
    document.Search_Fname_Form.submit
    end sub
    </script>
    <script language="vbscript">
    sub Search_EXT()
    document.Search_EXT_Form.submit
    end sub
    </script>
    <script language="vbscript">
    sub Search_Branch()
    document.Search_Branch_Form.submit
    end sub
    </script>

    Captain Ru Guest

  6. #5

    Default Re: Am I wasting my time? I seek council.

    leftmenu.cfm



    <cfquery name = "emp_data" datasource = "#db#">
    select *
    from emptbl
    order by lname
    </cfquery>

    <table <!--- width="50%" height="94" ---> border="1" cellpadding="0"
    cellspacing="0">
    <strong>
    <cfset color_on="yes">
    <cfoutput query="EMP_DATA">
    <cfif color_on is "yes">
    <tr bgcolor="ffffff">
    <cfset color_on="No">
    <cfelse>
    <tr height="25">
    <cfset color_on="yes">
    </cfif>

    <cfif #lname# is not "">
    <td width="120" nowrap>&nbsp;&nbsp;<a href="data.cfm?EMPID=#ID#"
    target="data.cfm"><b>#lname#</b></a></td>
    <cfelse>
    <td width="120" nowrap>&nbsp;</td>
    </cfif>

    <cfif #fname# is "">
    <td width="110"nowrap>&nbsp;</td>
    <cfelse>
    <td width="110" nowrap>&nbsp;&nbsp;#fname#</td>
    </cfif>

    <cfif #ext# is "">
    <td width="67" nowrap>&nbsp;</td>
    <cfelse>
    <td width="65" nowrap>&nbsp;&nbsp;#ext#</td>
    </cfif>
    <cfif #branch# is "">
    <td width="67" nowrap>&nbsp;</td>
    <cfelse>
    <td nowrap width="100%">&nbsp;&nbsp;#BRANCH#</td>
    </cfif>
    </tr>
    </cfoutput> </strong>
    </table>

    Captain Ru Guest

  7. #6

    Default Re: Am I wasting my time? I seek council.

    data.cfm


    <cfparam name="Edit" default="No">
    <cfparam name="EMPEdit" default="No">
    <cfparam name="SaveEMP" default="No">
    <cfparam name="DeleteEMP" default="No">
    <cfparam name="login" default="No">
    <cfparam name="logOut" default="No">
    <cfparam name="session.loggedin" default="No">
    <title>Employee Data</title>
    <link rel="stylesheet" type="text/css" href="CSS/emp.css">

    <!--- <cfif Logout is 'Yes'>
    <cfset session.loggedin = 'No'>
    </cfif>

    <cfif login is 'Yes'>
    <cfif #Login_ID_Input# is 'Cynthia' or #Login_ID_Input# is 'Ronz' and
    Password_Input is 'empadmin'>
    <cfset session.loggedin = 'Yes'>
    <cfset EMPEdit = 'Yes'>
    <cfelse>
    Incorect username or password!
    </cfif>
    </cfif> --->

    <!--- <cfif #DeleteEMP# is 'Yes'>
    <cfquery name="Save_EMP_Data" datasource="EMP">
    DELETE FROM EmpTbl
    WHERE ID=#EMPID#
    </cfquery>
    <script language="javascript">
    alert("Employee has been Deleted")
    </script>
    </cfif> --->

    <!--- <cfif #SaveEmp# is 'yes'>
    <cfquery name="Save_EMP_Data" datasource="EMP">
    Update EmpTbl
    Set fname='#fname_Input#',
    lname='#lname_Input#',
    <cfif isdefined("dept_Input")>dept='#dept_Input#',</cfif>
    <cfif isdefined("branch_Input")>branch='#branch_Input#', </cfif>
    <cfif isdefined("title_Input")>title='#title_Input#',</cfif>
    <cfif isdefined("ext_Input")>ext='#ext_Input#',</cfif>
    <cfif isdefined("phone_Input")>phone='#phone_Input#',</cfif>
    <cfif isdefined("fax_Input")>fax='#fax_Input#',</cfif>
    <cfif isdefined("cellnumb_Input")>cellnumb='#cellnumb_In put#',</cfif>
    <cfif isdefined("dob_Input")>dob='#dob_Input#',</cfif>
    <cfif isdefined("hiredate_Input")>hiredate='#hiredate_In put#',</cfif>
    <cfif isdefined("officer_Input")>officer='#officer_Input #'</cfif>
    WHERE ID=#EMPID#
    </cfquery>
    </cfif> --->


    <cfif not isdefined("EMPID")>
    <cfabort>
    <cfelse>

    <CFQUERY NAME="EMP_Data" DATASOURCE="EMP">
    SELECT *
    FROM EmpTbl
    WHERE ID=#EMPID#
    </CFQUERY>


    <cfoutput query="EMP_Data">
    <cfform action="EMP_Data.cfm?SaveEmp=Yes&EMPID=#ID#" name="EMPEdit_Form">
    <table bordercolor="000000" bordercolorlight="000000"
    bordercolordark="000000" border="1" cellpadding="0" cellspacing="0">
    <TR>
    <TD colspan="2" align="center"><img style="cursor:hand"
    src="Images/employeepics/#empspicture#" height="133"
    onClick="window.open('Images/employeepics/#empspicture#','_NEW','TOOLBAR=NO,WIDT
    H=350,HEIGHT=400')"></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH nowrap align="left">First Name</TD>
    <TD nowrap width="100%">
    <cfif #session.loggedin# is 'yes'>
    <cfinput type="text" name="fname_Input" value="#fname#">
    <cfelse>&nbsp;&nbsp;#fname#
    </cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left" nowrap>Last Name</TD><TD nowrap><cfif #session.loggedin#
    is 'Yes'><cfinput type="text" name="lname_Input"
    value="#lname#"><cfelse>&nbsp;&nbsp;#lname#</cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Department</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="dept_Input"
    value="#dept#"><cfelse>&nbsp;&nbsp;#dept#</cfif></TD>
    </TR>
    <tr bgcolor="ccffcc">
    <TH align="left">Branch</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="branch_Input"
    value="#branch#"><cfelse>&nbsp;&nbsp;#branch#</cfif></TD>
    </tr>
    <TR bgcolor="ccffcc" >
    <TH align="left">Title</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="title_Input" value="#title#"><cfelse><cfif
    #title# is "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#title#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Ext</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="ext_Input" value="#ext#"><cfelse><cfif #ext#
    is "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#ext#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Phone</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="phone_Input" value="#phone#"><cfelse><cfif
    #phone# is "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#phone#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Fax</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="fax_Input" value="#fax#"><cfelse><cfif #fax#
    is "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#fax#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Cell</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="cellnumb_Input"
    value="#cellnumb#"><cfelse><cfif #cellnumb# is
    "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#cellnumb#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Birthday</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="dob_Input" value="#dob#"><cfelse><cfif #dob#
    is "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#dob#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left">Hire Date</TD><TD nowrap><cfif #session.loggedin# is
    'Yes'><cfinput type="text" name="hiredate_Input"
    value="#hiredate#"><cfelse><cfif #hiredate# is
    "">&nbsp;&nbsp;<cfelse>&nbsp;&nbsp;#hiredate#</cfif></cfif></TD>
    </TR>
    <TR bgcolor="ccffcc">
    <TH align="left"></TD>Officer?
    <TD nowrap><cfif #session.loggedin# is 'Yes'><cfinput type="text"
    name="officer_Input" value="#officer#"><cfelse><cfif #officer# is
    0>&nbsp;&nbsp;No<cfelse>&nbsp;&nbsp;Yes</cfif></cfif></TD>
    </TR>
    <cfif #session.loggedin# is 'Yes'>
    <tr>
    <td colspan="2" align="center"><input type="submit" value="save"><input
    type="button" value="Delete" onClick="DeleteEMP()"><input type="button"
    name="logout" value="Logout"
    onClick="window.open('EMP_Data.cfm?Logout=Yes&EMPI D=#ID#','rightFrame')"></td>
    </tr>
    </cfif>
    </cfform>

    <script language="javascript">
    function DeleteEMP()
    {
    var where_to= confirm("Do you really want to go to this page??");
    if (where_to== true)
    {window.open('EMP_Data.cfm?DeleteEMP=Yes&EMPID=#ID #','rightFrame');
    window.open('Emp_list.cfm','mainFrame');
    }
    else
    {
    }
    }
    </SCRIPT>

    </cfoutput>
    </cfif>
    </table>

    Captain Ru Guest

  8. #7

    Default Re: Am I wasting my time? I seek council.

    these files are copied from another directory to be changed. the data.cfm file
    has old code commented, and some parts not yet commented, like the session
    variables used.

    the top menu when searched should display in the left menu, and the left menu
    should display to the right, but both produce popups. the search is also
    calling a different file from the copy i'm using (the original)

    Captain Ru Guest

  9. #8

    Default Re: Am I wasting my time? I seek council.

    updated search form

    <cfform name="Search_Form" action="Emp_list.cfm">
    <td height="24" nowrap><input type="text" name="Search_lname_Input"
    size="8"><img style="cursor:hand" src="Images/SEARCH.gif"
    onClick="Search_Lname()"></td>
    <td nowrap><input type="text" name="Search_FName_Input" size="8"><img
    style="cursor:hand" src="Images/SEARCH.gif" onClick="Search_Fname()"></td>
    <td nowrap><input type="text" name="Search_EXT_Input" size="1"><img
    style="cursor:hand" src="Images/SEARCH.gif" onClick="Search_EXT()"></td>
    <td nowrap><input type="text" name="Search_Branch_Input" size="15"><img
    style="cursor:hand" src="Images/SEARCH.gif" onClick="Search_Branch()"></td>
    </cfform>


    <cfquery name = "emp_data" datasource = "#db#">
    select *
    from emptbl
    where 1=1
    <cfif ParameterExists(form.Search_lname_Input)> lname like
    '%form.Search_lname_Input%'<c/fif>
    // do the same for all inputfields
    order by lname
    </cfquery>


    jorgepino Guest

  10. #9

    Default Re: Am I wasting my time? I seek council.

    well i swapped out my table and put that code in (it's missing a </cfif>) and
    it didn't do anything. I noticed an ''error on page''. The search is fine.
    the question is
    can I have my topmenu.cfm display into my leftmenu.cfm

    (can the included files act as frames)

    Captain Ru Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139