ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 8th, 2013, 06:27 AM
vamc443 vamc443 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 18 vamc443 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 52 sec
Reputation Power: 0
Displaying tickets history in same page

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

Reply With Quote
  #2  
Old March 8th, 2013, 07:58 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
If the ticket history is being shown in a new browser window, then that should have nothing to do with ColdFusion (which is a server-side platform). This sounds like a client-side issue. Is the link or form using target="_blank"?

Reply With Quote
  #3  
Old March 8th, 2013, 08:36 AM
vamc443 vamc443 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 18 vamc443 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 52 sec
Reputation Power: 0
client side script is javascript

client side script is javascript

Reply With Quote
  #4  
Old March 8th, 2013, 09:11 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
Exactly, so I'm not really sure how your question relates to ColdFusion, since JavaScript is a totally separate subject.

Reply With Quote
  #5  
Old March 11th, 2013, 05:56 AM
vamc443 vamc443 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 18 vamc443 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 52 sec
Reputation Power: 0
yes.my problem is here.when i click on update button the page getting refreshed and i lost my url variables(i am passing my ticket ID through URL from ticketList page)so that i am not able to update my text values in Database.

the error occurs like below.. your Element ID is undefined in URL.


<cfquery datasource="#request.dsn#" name="getData">
SELECT * FROM supportTickets1 WHERE ticketID = #val(url.ID)#</cfquery>


Thank you,
vamc

Reply With Quote
  #6  
Old March 11th, 2013, 08:31 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
You'd need to pass any existing URL variables along with when the update URL is called. One option is to look at CGI.query_string, which should contain whatever the query string values are for the current page. You can append that to the update URL. Something like:

update.cfm?#cgi.query_string#

Reply With Quote
  #7  
Old March 11th, 2013, 09:41 AM
vamc443 vamc443 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 18 vamc443 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 52 sec
Reputation Power: 0
Hi .. thank you but i didn't understand properly .i will include my code please give me suggestion
Code:


the below code is in my frmTicketList.cfm

<td class="lbll" width="10%"><a href="frmTicketView.cfm?ID=#Val(TicketNumber)#">#ticketnumber#</a></td>
<td class="lbll" width="10%">#DateFormat(DateRaised,"mm-dd-yyyy")#</a></td>
<td class="lbll" width="15%">#Summary#</a></td>
<td class="lbll" width="10%">#RaisedBy#</a></td>
<td class="lbll"  width="10%" >#AssignedTo#</a></td>
<td class="lbll"  width="10%">#Status#</a></td>



Code:
Original - Code
    the below code in my frmTicketList.cfm in this i have to update the ticket information using update button.and i have to display ticket history .please correct me if i am wrong




Code:

<Div style="width: 100%;height:85%;overflow:auto;position:absolute">


<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 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 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="frmTicketview"  action="frmTicketView.cfm" method="post">
        <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" OnSubmit="Validation()"/></td>
        </tr>
        </cfoutput>

      </table>
    </form>
    </table>
  </td>
</tr>
</table>

<script language="javascript">
function Validation()
{
if(document.frmTicketview.comments.value == "")
	{
		alert('Please Enter Description');
		document.frmTicketview.comments.focus();
		return false;
	}
if(document.frmTicketview.timespent.value == "null")
	{
		alert("Please Enter Time Spent");
		document.frmTicketview.timespent.focus();
		return false;
	}

}

</script>
<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>









Reply With Quote
  #8  
Old March 11th, 2013, 11:48 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
I'm not sure how much simpler I can say it. You've got to pass the URL values you want to keep when you submit the form.

<form name="frmTicketview" action="frmTicketView.cfm?id=#url.id#" method="post">

Or whatever url variable names or values you want to pass through to the next page.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Displaying tickets history in same page

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap