Click here to Skip to main content
15,890,282 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Drag-nDrop in ASP.NET Pin
Bheem Sen Singh25-Jun-14 23:33
professionalBheem Sen Singh25-Jun-14 23:33 
QuestionI would like to have your advice to finish a big non-profit social project Pin
Pedro197027-Apr-14 13:09
Pedro197027-Apr-14 13:09 
QuestionRe: I would like to have your advice to finish a big non-profit social project Pin
ZurdoDev28-Apr-14 16:06
professionalZurdoDev28-Apr-14 16:06 
AnswerRe: I would like to have your advice to finish a big non-profit social project Pin
Pedro19701-May-14 12:20
Pedro19701-May-14 12:20 
AnswerRe: I would like to have your advice to finish a big non-profit social project Pin
ZurdoDev1-May-14 15:03
professionalZurdoDev1-May-14 15:03 
GeneralRe: I would like to have your advice to finish a big non-profit social project Pin
Pedro19703-May-14 11:03
Pedro19703-May-14 11:03 
GeneralRe: I would like to have your advice to finish a big non-profit social project Pin
hsuhsutin15-May-14 17:30
hsuhsutin15-May-14 17:30 
QuestionHow to pass parameter from one jQuery tab to another (Solved) Pin
samflex27-Apr-14 6:00
samflex27-Apr-14 6:00 
Hi mates,

I hope this is the right forum for this question:

I have three tabs shown below:

PHP
<div id="tabs">
  <ul>
    <li><a href="#NewRequest">New Request</a></li>
    <li><a href="#ExistingRequest">Existing Request</a></li>
    <li><a href="#RequestDetails">Request Details</a></li>
  </ul>
  ...
  ...
  </div>


NewRequest tab is used to create new requests and insert them into the database. This works fine.

ExistingRequest tab is used to display the requests that were created on NewRequest tab. The code below is used for displaying these existing records on ExistingRequest tab.

This works fine as well.

My problem is that one of the cells, called RequestID cell is hyperlinked.

The idea is that when you click on this hyperlinked RequestID, we would like detailed records associated with this RequestID to open up inside RequestDetails tab.

Any idea how to get this to work?

There is a php file called viewDetails.php. This file will query the db and get detail records where RequestID = the RequestID being passed from ExistingRequests tab.

PHP
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
    /* Init DataTables */
$("#example").dataTable( {
	"sProcessing" : true,
"sDom":'T<"clear">',
"sJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear"><"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>',
    "sAjaxSource" : "userDetails.php?loginName=<?php echo $user; ?>",
    "sAjaxDataProp" : "",
    "sDestroy" : false,
        "sScrollXInner": "110%",
    "fnServerData" : function(sSource, aoData, fnCallback) {
        request = $.ajax({
            "dataType" : "json",
            "type" : "GET",
            "url" : sSource,
            "data" : aoData,
            "success" : fnCallback
        });
    },
         "aoColumns" : [

         { "mDataProp": "RequestID", "sWidth": "50px", sSortable: true,
           "bSearchable": false,
           "bSortable": false,
           "fnRender": function (oObj)
            {
             // oObj.aData[0] returns the RequestID
                return "<a href='viewdetails.php?RequestID="
                                + oObj.aData["RequestID"] + "'> " + oObj.aData["RequestID"] + " </a>";
                        }
                       },
          { mDataProp: "RequestDate",  "sWidth": "100px", sSortable: true },
          { mDataProp: "RequestorFullName",  "sWidth": "150px", sSortable: true },
          { mDataProp: "PrimarySiteContactDisplay",  "sWidth": "250px", sSortable: true },
          { mDataProp: "RequestLocation",  "sWidth": "150px", sSortable: true },
          { mDataProp: "RequestDescription",  "sWidth": "200px", sSortable: true },
          { mDataProp: "RequestStatus",  "sWidth": "100px", sSortable: true },

        ],
      })
$('#cityworks tbody tr').click(function () {
    if ($(this).hasClass('selected')) $(this).removeClass('selected');
    else
    {
        $(this).siblings('.selected').removeClass('selected');
        $(this).addClass('selected');
    }
  });
  $(window).bind('resize', function () {
 oTable.fnAdjustColumnSizing();
 });
   jQuery('.dataTable').wrap('<div class="scrollStyle" />');
   });
</script>


Specifically, within the code I posted, this bit below is the hyperlinked RequestID.

When this is clicked, we would like it to open viewDetails.php file inside RequestDetails tab


PHP
// oObj.aData[0] returns the RequestID
   return "<a href='viewdetails.php?RequestID="
                   + oObj.aData["RequestID"] + "'> " + oObj.aData["RequestID"] + " </a>";


Any ideas how to handle this?

Thanks a lot in advance

modified 28-Apr-14 11:31am.

AnswerRe: How to pass parameter from one jQuery tab to another Pin
Richard Deeming28-Apr-14 2:26
mveRichard Deeming28-Apr-14 2:26 
GeneralRe: How to pass parameter from one jQuery tab to another Pin
samflex28-Apr-14 5:15
samflex28-Apr-14 5:15 
GeneralRe: How to pass parameter from one jQuery tab to another Pin
Richard Deeming28-Apr-14 5:21
mveRichard Deeming28-Apr-14 5:21 
GeneralRe: How to pass parameter from one jQuery tab to another Pin
samflex28-Apr-14 5:27
samflex28-Apr-14 5:27 
QuestionJssor SlideShow Default Image Pin
Jassim Rahma25-Apr-14 9:11
Jassim Rahma25-Apr-14 9:11 
Questionhow to paginate like linkedin and facebook? Pin
Jassim Rahma25-Apr-14 6:31
Jassim Rahma25-Apr-14 6:31 
AnswerRe: how to paginate like linkedin and facebook? Pin
onelopez25-Apr-14 6:50
onelopez25-Apr-14 6:50 
QuestionCompany Portal Advice Pin
Clark Kent12323-Apr-14 1:33
professionalClark Kent12323-Apr-14 1:33 
AnswerRe: Company Portal Advice Pin
David Mujica23-Apr-14 3:26
David Mujica23-Apr-14 3:26 
GeneralRe: Company Portal Advice Pin
Clark Kent12323-Apr-14 4:37
professionalClark Kent12323-Apr-14 4:37 
AnswerRe: Company Portal Advice Pin
Kornfeld Eliyahu Peter23-Apr-14 5:31
professionalKornfeld Eliyahu Peter23-Apr-14 5:31 
QuestionGradient background in IE11 Pin
rogerfederer67022-Apr-14 7:18
rogerfederer67022-Apr-14 7:18 
AnswerRe: Gradient background in IE11 Pin
Anurag Gandhi24-Apr-14 5:31
professionalAnurag Gandhi24-Apr-14 5:31 
GeneralRe: Gradient background in IE11 Pin
rogerfederer67024-Apr-14 6:44
rogerfederer67024-Apr-14 6:44 
Questionneed help with php parse error Pin
Izu Great19-Apr-14 2:49
professionalIzu Great19-Apr-14 2:49 
GeneralRe: need help with php parse error Pin
Richard MacCutchan19-Apr-14 6:06
mveRichard MacCutchan19-Apr-14 6:06 
GeneralRe: need help with php parse error Pin
Izu Great19-Apr-14 8:31
professionalIzu Great19-Apr-14 8:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.