9 Replies - 2315 Views - Last Post: 11 March 2013 - 08:05 AM Rate Topic: -----

#1 vamsc443  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 08-March 13

Displaying tickets history in same page

Posted 08 March 2013 - 05:53 AM

Hi,
i have a problem while developing the ticketing system in coldfusion.



when i click on update button after the ticket is raised,the ticket history is displaying in new window.but instead i want to display in the same window.

can any one help me on this


Thank you
vamc
Is This A Good Question/Topic? 0
  • +

Replies To: Displaying tickets history in same page

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: Displaying tickets history in same page

Posted 08 March 2013 - 06:50 AM

Vamsc443, welcome to DIC.

I'm sure someone here could indeed help. In order for that to happen though, we'd need to see at least a little bit of the code that you've got that contains the issue you're having. Otherwise, how do you expect to receive any specific help?

Please feel free to post back here with a code snippet. If it's a form you're working with, please post the form itself (including the submit button) and any attendant Javascript and we can probably give you a hand.
Was This Post Helpful? 0
  • +
  • -

#3 vamsc443  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 08-March 13

Re: Displaying tickets history in same page

Posted 08 March 2013 - 07:03 AM

<!--
<! -----------------------------------------------------------------------------------------------  >
Author :Vamsidhar
File Name :frmTicketView.cfm

<! -----------------------------------------------------------------------------------------------  >
<Div style="width:100%;height:10%">
<cfinclude template = "frmMainMenu.cfm">

</Div>
<link rel="stylesheet" href="../images/autocomplete.css">
<cfinclude template = "frmNurseSessChk.cfm">
  <cfparam name="type" default="">
<Div style="width: 100%;height:85%;overflow:auto;position:absolute">
<!---<cfset eMode = IsDefined('ID') AND ID NEQ "">

<cfset ID= isDefined('ID')>
<cfparam name="ID" default="#val(url.ID)#">--->


<cfquery datasource="#request.dsn#" name="getData">
		SELECT * 
  		FROM supportTickets1 
    	WHERE ticketID = #val(url.ID)#
	</cfquery>
    <cfquery datasource="#request.dsn#" name="getDataHistory">
		SELECT * 
  		FROM supportTicketsHistory1 
    	WHERE ticketID = #val(url.ID)#
	</cfquery>	
<cfquery datasource="#request.dsn#" name="getTicketStatus">
SELECT * 
FROM SupportStatusType
</cfquery>
<cfquery datasource="#request.dsn#" name="getTypes">
SELECT [TicketTypeID],[TicketType]
FROM supportTicketType
</cfquery>
<cfquery datasource="#request.dsn#" name="getDataHistoryOfMainTicket">
    SELECT * 
    FROM supportTicketsHistory1 
    WHERE ticketID = #val(url.ID)#
    order by ticketID desc
</cfquery>

<table align="center" width="100%" cellpadding="4" cellspacing="6">
<tr><td colspan="8" align="left" style="margin-left:50px;"><a href="frmTicketList.cfm" style="cursor:pointer;">View Tickets</a></td></tr>
</table>
[b]<form name="frmTicketview"  action="frmTicketView.cfm" method="post" onsubmit="return Checkvalidations('frmTicketview');">[/b]
<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #9999FF;">
<tr>
 <td colspan="3"><h2 class="SectionHead">Ticket Summary Information</h2></td>
    </tr>
	<tr>
      <td colspan="3" align="left">&nbsp;</td>
    </tr>
	<tr>
    	<td width="30%" valign="top"><strong>Ticket Number</strong></td>
    	<td width="78%"><div style="float:left;"><cfoutput>#getData.ticketID#</cfoutput><strong>  raised on </strong><cfoutput>#DateTimeFormat(getData.DATERAISED,'mm/dd/yyyy hh:nn:ss tt')#</cfoutput> <strong>raised by </strong><cfoutput>#getData.RAISEDBY#</cfoutput></div><div style="float:right;padding-right:20px;"><cfquery datasource="#request.dsn#" name="getTime">
        select sum(convert(float,timespent)) as total from 
        supportTicketsHistory1
        where 
        ticketNumber = #getData.ticketID#
        </cfquery></td>
        <td width="50%">Total Tme Spent Till Now: <cfoutput><strong>#getTime.total#</strong><br /><input type="hidden" name="getExactDays" value="#getTime.total#" id="getExactDays" />
		</cfoutput></div></td>
    </tr>
	
	
<tr>
  <td colspan="3"><div class="SectionHead">Ticket History Information</div></td>
</tr>
<tr>
  <td colspan="3" align="center">&nbsp;</td>
</tr>
<tr>
  <td colspan="3">
      <table align="center" width="100%" cellpadding="1" cellspacing="2">
        <tr>
          <td><strong>Status</strong></td>
          <td><strong>Ticket Type</strong></td>
          <td><strong>Assigned To</strong></td>
          <td width="34%"><strong>Updated Description</strong></td>
          <td width="9%"><strong>Time Spent</strong></td>
          <td width="12%"><strong>Last Updated</strong></td>
          <td width="9%"><strong>Updated By</strong></td>
        </tr>
        <form name="update" id="update">
        <cfoutput>
        <tr>
          <td><select name="status" id="status">
            <cfloop query="getTicketStatus">
            <option value="#statusID#" <cfif getTicketStatus.statusID EQ getDataHistoryOfMainTicket.status>selected</cfif>>#status#</option>
            </cfloop>
          </select></td>
          <td><select name="TicketType" id="TicketType">
                <option value="" selected>(SELECT ONE)</option>
                <cfloop query="getTypes">
                <option value="#TicketTypeID#" <cfif getTypes.TicketTypeID EQ getDataHistoryOfMainTicket.tickettype>selected</cfif>>#TicketType#</option>
                </cfloop>
              </select></td>
          <td><select name="assignedto" id="assignedto">
                <option value="" selected>(SELECT ONE)</option>
                <option value="Development" <cfif getDataHistoryOfMainTicket.assignedto eq 'Development'>selected</cfif>>Development</option>
                <option value="Testing" <cfif getDataHistoryOfMainTicket.assignedto eq 'Testing'>selected</cfif>>Testing</option>
                <option value="Design" <cfif getDataHistoryOfMainTicket.assignedto eq 'Design'>selected</cfif>>Design</option>
              </select></td>
          <td width="34%"><textarea name="comments" id="comments"></textarea></td>
          <td width="9%"><input type="text" name="timespent" id="timespent" style="width:60px;" class="lastRecord"></td>
          <td>&nbsp;</td>
     

        </tr>
        </cfoutput>
        <cfloop query="getDataHistoryOfMainTicket">
        <cfoutput>
        <tr>
          <td width="10%" height="13" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
              <input type="hidden" name="status_#ticketID#" id="status_#ticketID#" value="#getDataHistoryOfMainTicket.status#">
            </cfif>
            <cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
              <cfelse>
              <cfif getDataHistoryOfMainTicket.status IS 4>
                New
                <cfelseif getDataHistoryOfMainTicket.status IS 3>
                Hold
                <cfelseif getDataHistoryOfMainTicket.status IS 2>
                Closed
                <cfelseif getDataHistoryOfMainTicket.status IS 1>
                Open
              </cfif>
            </cfif>
          </td>
          <td width="13%" height="13" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
              <input type="hidden" name="TicketType_#ticketID#" id="TicketType_#ticketID#" value="#getDataHistoryOfMainTicket.tickettype#">
            </cfif>
            <cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
              
              <cfelse>
              <cfif getDataHistoryOfMainTicket.tickettype IS 1>
                Defect
                <cfelseif getDataHistoryOfMainTicket.tickettype IS 2>
                Enhancement
                <cfelseif getDataHistoryOfMainTicket.tickettype IS 3>
                Support
              </cfif>
            </cfif>
          </td>
          <td width="13%" height="13" align="left" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
              <input type="hidden" name="assignedto_#ticketID#" id="assignedto_#ticketID#" value="#getDataHistoryOfMainTicket.assignedto#">
            </cfif>
            <cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
              
              <cfelse>
              <cfif assignedto IS "">
                N/A
                <cfelse>
                #assignedto#
              </cfif>
            </cfif>
          </td>
          <td valign="top">
		  <cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
              <cfelse>
              <div style="display:none;">
                <textarea name="comments_#ticketID#" readonly="readonly" id="comments_#ticketID#">#lastupdatedcomment#</textarea>
              </div>
              #lastupdatedcomment#
            </cfif>
          </td>
          <td valign="top"><cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
              
              <cfelse>
              <input type="hidden" name="timespent_#ticketID#" id="timespent_#ticketID#" value="#timespent#" style="width:60px;" class="lastRecord">
              #timespent#
            </cfif>
          </td>
          <td><cfif lastupdateddate NEQ "">
              #DateTimeFormat(lastupdateddate,'dd/mm/yyyy hh:nn:ss tt')#
            </cfif></td>
        <td width="9%">#updatedby#</td>
        </tr>
        
        <cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
        <tr>
          <td colspan="7"><hr />
          </td>
        </tr>
        </cfif>
        </cfoutput>
        </cfloop>
        <cfoutput>
            <input type="hidden" name="ID" id="ID" value="#getDataHistoryOfMainTicket.ticketID#">
            <input type="hidden" name="ticketnumber" id="ticketnumber" value="#getDataHistoryOfMainTicket.ticketnumber#">
            <input type="hidden" name="summary" id="summary" value="#getDataHistoryOfMainTicket.summary#">
            <input type="hidden" name="dateraised" id="dateraised" value="#getDataHistoryOfMainTicket.dateraised#">
            <input type="hidden" name="raisedby" id="raisedby" value="#getDataHistoryOfMainTicket.raisedby#">
    	</cfoutput>
        <tr>
          <td colspan="10" align="left">
          </td>
        </tr>
        <tr>
          <td colspan="10">&nbsp;</td>
        </tr>
       <!--- <tr>
          <td colspan="10">For Time Spent, Please Log:<br>
            <ul>
              <li>15 Minutes - 0.25</li>
              <li>30 Minutes - 0.50</li>
              <li>45 Minutes - 0.75</li>
              <li>60 Minutes - 1.00</li>
              <li>75 Minutes - 1.25 and so on...</li>
            </ul></td>
        </tr>
        <tr>
        <td>Calculate Time</td>
        <td colspan="9"><span id="results" style="float:left;color:red;text-shadow:#fff;"></span><br />
        	<input type="text" name="CalcMins" id="CalcMins" value="" />
        </td></tr>
        <tr><td colspan="10">
        	<input type="button" name="Calculate" id="calculate" value="Calculate Time" />
        </td></tr>--->
      </table>
    </form>
    </table>
  </td>
</tr>
</table>
<cfif isDefined('form.updTickets')>
<cfquery datasource="#request.dsn#" name="AddTicket">
                INSERT INTO supportTicketsHistory1(ticketNumber, Summary, RaisedBy, 
                TicketType, LastUpdatedComment,LastUpdatedDate)
                VALUES('#val(url.ID)#','#summary#','#raisedby#','#tickettype#',
                '#comments#','#dateFormat(now(),"mm/dd/yy")#')
            </cfquery>

 <cfquery datasource="#request.dsn#" name="UpdateTicket">
        	UPDATE supportTickets1 SET 
            LastUpdatedDate = '#dateFormat(now(),"mm/dd/yy")#',
            Summary = 'summary',
            RaisedBy = '#raisedby#',
            TicketType = '#tickettype#',
            LastUpdatedComment = '#comments#' 
            WHERE ticketID = #val(url.ticketID)#
        </cfquery>
</cfif>
</div>

This post has been edited by Craig328: 08 March 2013 - 07:08 AM
Reason for edit:: Note to use CODE tags too difficult to understand

Was This Post Helpful? 0
  • +
  • -

#4 vamsc443  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 08-March 13

Re: Displaying tickets history in same page

Posted 08 March 2013 - 07:13 AM

View Postvamsc443, on 08 March 2013 - 07:03 AM, said:

<!--
<! ----------------------------------------------------------------------------------------------- >

File Name :frmTicketView.cfm

<! ----------------------------------------------------------------------------------------------- >
<Div style="width:100%;height:10%">
<cfinclude template = "frmMainMenu.cfm">

</Div>
<link rel="stylesheet" href="../images/autocomplete.css">
<cfinclude template = "frmNurseSessChk.cfm">
<cfparam name="type" default="">
<Div style="width: 100%;height:85%;overflow:auto;position:absolute">
<!---<cfset eMode = IsDefined('ID') AND ID NEQ "">

<cfset ID= isDefined('ID')>
<cfparam name="ID" default="#val(url.ID)#">--->


<cfquery datasource="#request.dsn#" name="getData">
SELECT *
FROM supportTickets1
WHERE ticketID = #val(url.ID)#
</cfquery>
<cfquery datasource="#request.dsn#" name="getDataHistory">
SELECT *
FROM supportTicketsHistory1
WHERE ticketID = #val(url.ID)#
</cfquery>
<cfquery datasource="#request.dsn#" name="getTicketStatus">
SELECT *
FROM SupportStatusType
</cfquery>
<cfquery datasource="#request.dsn#" name="getTypes">
SELECT [TicketTypeID],[TicketType]
FROM supportTicketType
</cfquery>
<cfquery datasource="#request.dsn#" name="getDataHistoryOfMainTicket">
SELECT *
FROM supportTicketsHistory1
WHERE ticketID = #val(url.ID)#
order by ticketID desc
</cfquery>

<table align="center" width="100%" cellpadding="4" cellspacing="6">
<tr><td colspan="8" align="left" style="margin-left:50px;"><a href="frmTicketList.cfm" style="cursor:pointer;">View Tickets</a></td></tr>
</table>
<form name="frmTicketview" action="frmTicketView.cfm" method="post" onsubmit="return Checkvalidations('frmTicketview');">
<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #9999FF;">
<tr>
<td colspan="3"><h2 class="SectionHead">Ticket Summary Information</h2></td>
</tr>
<tr>
<td colspan="3" align="left">&nbsp;</td>
</tr>
<tr>
<td width="30%" valign="top"><strong>Ticket Number</strong></td>
<td width="78%"><div style="float:left;"><cfoutput>#getData.ticketID#</cfoutput><strong> raised on </strong><cfoutput>#DateTimeFormat(getData.DATERAISED,'mm/dd/yyyy hh:nn:ss tt')#</cfoutput> <strong>raised by </strong><cfoutput>#getData.RAISEDBY#</cfoutput></div><div style="float:right;padding-right:20px;"><cfquery datasource="#request.dsn#" name="getTime">
select sum(convert(float,timespent)) as total from
supportTicketsHistory1
where
ticketNumber = #getData.ticketID#
</cfquery></td>
<td width="50%">Total Tme Spent Till Now: <cfoutput><strong>#getTime.total#</strong><br /><input type="hidden" name="getExactDays" value="#getTime.total#" id="getExactDays" />
</cfoutput></div></td>
</tr>


<tr>
<td colspan="3"><div class="SectionHead">Ticket History Information</div></td>
</tr>
<tr>
<td colspan="3" align="center">&nbsp;</td>
</tr>
<tr>
<td colspan="3">
<table align="center" width="100%" cellpadding="1" cellspacing="2">
<tr>
<td><strong>Status</strong></td>
<td><strong>Ticket Type</strong></td>
<td><strong>Assigned To</strong></td>
<td width="34%"><strong>Updated Description</strong></td>
<td width="9%"><strong>Time Spent</strong></td>
<td width="12%"><strong>Last Updated</strong></td>
<td width="9%"><strong>Updated By</strong></td>
</tr>
<form name="update" id="update">
<cfoutput>
<tr>
<td><select name="status" id="status">
<cfloop query="getTicketStatus">
<option value="#statusID#" <cfif getTicketStatus.statusID EQ getDataHistoryOfMainTicket.status>selected</cfif>>#status#</option>
</cfloop>
</select></td>
<td><select name="TicketType" id="TicketType">
<option value="" selected>(SELECT ONE)</option>
<cfloop query="getTypes">
<option value="#TicketTypeID#" <cfif getTypes.TicketTypeID EQ getDataHistoryOfMainTicket.tickettype>selected</cfif>>#TicketType#</option>
</cfloop>
</select></td>
<td><select name="assignedto" id="assignedto">
<option value="" selected>(SELECT ONE)</option>
<option value="Development" <cfif getDataHistoryOfMainTicket.assignedto eq 'Development'>selected</cfif>>Development</option>
<option value="Testing" <cfif getDataHistoryOfMainTicket.assignedto eq 'Testing'>selected</cfif>>Testing</option>
<option value="Design" <cfif getDataHistoryOfMainTicket.assignedto eq 'Design'>selected</cfif>>Design</option>
</select></td>
<td width="34%"><textarea name="comments" id="comments"></textarea></td>
<td width="9%"><input type="text" name="timespent" id="timespent" style="width:60px;" class="lastRecord"></td>
<td>&nbsp;</td>
<td width="9%"><input name="updTickets" type="Submit" value="Update" onclick="window.location.href='frmTicketList.cfm'"/></td>

i struck here.my functionality should be : if i submit or click on the button the page values(text box values) should be update in Database and page will redirect to ticketlist(which i have already).

i got error when i submit this the page is reloading and url.ID (which is using in top) undefined

</tr>
</cfoutput>
<cfloop query="getDataHistoryOfMainTicket">
<cfoutput>
<tr>
<td width="10%" height="13" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
<input type="hidden" name="status_#ticketID#" id="status_#ticketID#" value="#getDataHistoryOfMainTicket.status#">
</cfif>
<cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
<cfelse>
<cfif getDataHistoryOfMainTicket.status IS 4>
New
<cfelseif getDataHistoryOfMainTicket.status IS 3>
Hold
<cfelseif getDataHistoryOfMainTicket.status IS 2>
Closed
<cfelseif getDataHistoryOfMainTicket.status IS 1>
Open
</cfif>
</cfif>
</td>
<td width="13%" height="13" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
<input type="hidden" name="TicketType_#ticketID#" id="TicketType_#ticketID#" value="#getDataHistoryOfMainTicket.tickettype#">
</cfif>
<cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>

<cfelse>
<cfif getDataHistoryOfMainTicket.tickettype IS 1>
Defect
<cfelseif getDataHistoryOfMainTicket.tickettype IS 2>
Enhancement
<cfelseif getDataHistoryOfMainTicket.tickettype IS 3>
Support
</cfif>
</cfif>
</td>
<td width="13%" height="13" align="left" valign="top"><cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
<input type="hidden" name="assignedto_#ticketID#" id="assignedto_#ticketID#" value="#getDataHistoryOfMainTicket.assignedto#">
</cfif>
<cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>

<cfelse>
<cfif assignedto IS "">
N/A
<cfelse>
#assignedto#
</cfif>
</cfif>
</td>
<td valign="top">
<cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>
<cfelse>
<div style="display:none;">
<textarea name="comments_#ticketID#" readonly="readonly" id="comments_#ticketID#">#lastupdatedcomment#</textarea>
</div>
#lastupdatedcomment#
</cfif>
</td>
<td valign="top"><cfif getDataHistoryOfMainTicket.currentrow eq getDataHistoryOfMainTicket.recordcount>

<cfelse>
<input type="hidden" name="timespent_#ticketID#" id="timespent_#ticketID#" value="#timespent#" style="width:60px;" class="lastRecord">
#timespent#
</cfif>
</td>
<td><cfif lastupdateddate NEQ "">
#DateTimeFormat(lastupdateddate,'dd/mm/yyyy hh:nn:ss tt')#
</cfif></td>
<td width="9%">#updatedby#</td>
</tr>

<cfif getDataHistoryOfMainTicket.currentrow neq getDataHistoryOfMainTicket.recordcount>
<tr>
<td colspan="7"><hr />
</td>
</tr>
</cfif>
</cfoutput>
</cfloop>
<cfoutput>
<input type="hidden" name="ID" id="ID" value="#getDataHistoryOfMainTicket.ticketID#">
<input type="hidden" name="ticketnumber" id="ticketnumber" value="#getDataHistoryOfMainTicket.ticketnumber#">
<input type="hidden" name="summary" id="summary" value="#getDataHistoryOfMainTicket.summary#">
<input type="hidden" name="dateraised" id="dateraised" value="#getDataHistoryOfMainTicket.dateraised#">
<input type="hidden" name="raisedby" id="raisedby" value="#getDataHistoryOfMainTicket.raisedby#">
</cfoutput>
<tr>
<td colspan="10" align="left">
</td>
</tr>
<tr>
<td colspan="10">&nbsp;</td>
</tr>
<!--- <tr>
<td colspan="10">For Time Spent, Please Log:<br>
<ul>
<li>15 Minutes - 0.25</li>
<li>30 Minutes - 0.50</li>
<li>45 Minutes - 0.75</li>
<li>60 Minutes - 1.00</li>
<li>75 Minutes - 1.25 and so on...</li>
</ul></td>
</tr>
<tr>
<td>Calculate Time</td>
<td colspan="9"><span id="results" style="float:left;color:red;text-shadow:#fff;"></span><br />
<input type="text" name="CalcMins" id="CalcMins" value="" />
</td></tr>
<tr><td colspan="10">
<input type="button" name="Calculate" id="calculate" value="Calculate Time" />
</td></tr>--->
</table>
</form>
</table>
</td>
</tr>
</table>
<cfif isDefined('form.updTickets')>
<cfquery datasource="#request.dsn#" name="AddTicket">
INSERT INTO supportTicketsHistory1(ticketNumber, Summary, RaisedBy,
TicketType, LastUpdatedComment,LastUpdatedDate)
VALUES('#val(url.ID)#','#summary#','#raisedby#','#tickettype#',
'#comments#','#dateFormat(now(),"mm/dd/yy")#')
</cfquery>

<cfquery datasource="#request.dsn#" name="UpdateTicket">
UPDATE supportTickets1 SET
LastUpdatedDate = '#dateFormat(now(),"mm/dd/yy")#',
Summary = 'summary',
RaisedBy = '#raisedby#',
TicketType = '#tickettype#',
LastUpdatedComment = '#comments#'
WHERE ticketID = #val(url.ticketID)#
</cfquery>
</cfif>
</div>

Was This Post Helpful? 0
  • +
  • -

#5 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: Displaying tickets history in same page

Posted 08 March 2013 - 07:25 AM

Well, that was...long. So, let's start with a couple of notes.

For one, the form you posted, as is, doesn't provide a submit button or, for that matter, any means to submit the form (the current submit button is commented out). This means, if this is the entire page (and it appears to be so) that you have a form that won't work even in the manner in which you described it working but improperly.

Second, the form tag itself references a Javascript function that's not present in the code you posted. Now, its description is that it's a validator and won't run until the form has been submitted (which, as I said above, it cannot do as it appears here) but it could also be the source of your issue.

There are also two included files referenced in the code that you don't post. We likely don't really need either of them but who can tell?

Can I assume from the way this page is built that you didn't code it and are not a developer? From what I can glean, the form submits to itself (which is entirely okay) but the order in which you handle a form submission and when you call info from the database to display the same info is backwards (IF you wanted to show the user the newly submitted info when the screen recycles).

If this form is firing into a new window or popup, it'll be most likely due to a Javascript or tag attribute called "target". If it IS in a Javascript function, it could also be a host of other things (window.open for example). Let me ask though: what have you tried/done to solve the issue? Do you have the experience/skills to do so?

We here at DIC are more than happy to help our users with issues they encounter but we like to see some effort expended by the user explaining why they came here AFTER their efforts failed. So, what have you tried to fix this so far? If you're not a developer, perhaps consider contacting a local CF dev who can look at your issue for you. No, it probably won't be free but it will be infinitely more helpful to you (as in "fixing it") than you appear to be capable of doing yourself even with our assistance.

As it is, I can't offer you a solution or fix to your issue with what you've posted here. Sorry.

This post has been edited by Craig328: 08 March 2013 - 07:27 AM

Was This Post Helpful? 1
  • +
  • -

#6 vamsc443  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 08-March 13

Re: Displaying tickets history in same page

Posted 08 March 2013 - 07:49 AM

please listen my words. i am new to cold fusion.

just clarify one thing.

once i click on update button i have to submit our values. and page will redirect to ticketlist(which i have already).
if you need i will provide my ticketlist page and new ticket page
Was This Post Helpful? 0
  • +
  • -

#7 ProdicalProgrammer  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 115
  • Joined: 26-June 09

Re: Displaying tickets history in same page

Posted 11 March 2013 - 07:42 AM

Its hard to listen when your typing something out.

Besides that CRAIG is always helpful in the ColdFusion forum if you took the time to read forum rules you wouldn't be stuck in this slump.

I don't think anybody is going to help you with your attitude.
Was This Post Helpful? 1
  • +
  • -

#8 vamsc443  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 08-March 13

Re: Displaying tickets history in same page

Posted 11 March 2013 - 07:49 AM

Thank you ProdicalProgrammer and Sorry Craig328 please Accept my apology..
Was This Post Helpful? 0
  • +
  • -

#9 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: Displaying tickets history in same page

Posted 11 March 2013 - 07:55 AM

View Postvamsc443, on 08 March 2013 - 09:49 AM, said:

please listen my words. i am new to cold fusion.

just clarify one thing.

once i click on update button i have to submit our values. and page will redirect to ticketlist(which i have already).
if you need i will provide my ticketlist page and new ticket page


Oh, I have "listened your words". The instruction to be followed here is "listen MY words". With what you've provided here I cannot assist you in fixing your problem.

You're claiming you're clicking on an update button. Problem #1 then is the code you posted won't ever have a Submit button. I hope you can understand that means NOBODY can help you with this issue as the first place to see what's going doesn't exist per the code you've provided. I mentioned other aspects of your code snippet that are possibly issues but all that is speculation. The code that's doing what you describe isn't the code you've posted here.

I totally understand your description of the issue you're seeing (so I truly don't need to listen your words as though I just didn't get what you were saying). With what you've provided, I'm given you as much assistance as one can render given the material you've provided is clearly incorrect and flawed. I'm sorry that doesn't solve your issue for you but when I immigrated here from Krypton, I swore to myself that I'd only wear my cape for emergencies I could actually solve.

This isn't one of them.

I suggested you locate a local CF dev who can meet with you and see the code that's being run on your server. I made that suggestion because it seems clear that you're not going to be able to solve this problem on your own. That suggestion is still my recommendation to getting you the help you need.

Good luck!
Was This Post Helpful? 1
  • +
  • -

#10 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: Displaying tickets history in same page

Posted 11 March 2013 - 08:05 AM

View Postvamsc443, on 11 March 2013 - 09:49 AM, said:

Thank you ProdicalProgrammer and Sorry Craig328 please Accept my apology..


Not a problem. I understand you're frustrated and there seems to be a language component fouling our discussion here a little bit as well.

A local CF dev, once he/she sees your code should be able to craft a fix for you in a matter of minutes. Certainly no more than an hour. That will fix your form firing into a popup problem. To make it more worthwhile for that dev (because finding someone who is willing to work for 15 minutes only is tough) there are other things you could have them fix on this form:

  • Have them place the code that handles form submissions at the top of the page so that the user, when presented with the form after submission will see their submitted content therein.
  • Have the developer go through the code on this page and scope all the variables declared and referenced.
  • Once he/she has done that, have them go back through the inline SQL and put bind parameters on all that stuff (as well as use scoped variables).


I mentioned the scoped variables and bind parameters because, as is, this form is not secure and is vulnerable to rather simple hack attempts like cross site scripts and SQL injections. To give you an idea of how naked it is, I could, quite easily, put a particular line of text in your form, submit it...and your database gets deleted entirely.

Seriously, the suggestion for a professional CF dev is necessary here for more than the nuisance issue that brought you here.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1