how to pass param to server side by html5 data-attributes ?

how to pass param to server side by html5 data-attributes ?

jasonthumjasonthum Posts: 2Questions: 1Answers: 0

<table class="table table-striped- table-bordered table-hover table-checkable table-data" id="table-product" data-ajax="../../sql/common/get-product-info.php" data-data="checking()"> <thead> <tr> <th data-data="lanID" style="min-width:50px" class="text-center lan-id">ID</th> <th data-data="lanID" style="min-width:16rem" class="lan-product-name">Product Name</th> <th data-data="lanID" style="min-width:6rem" class="text-right lan-sold">Sold</th> <th data-data="lanID" style="min-width:6rem" class="text-right lan-price">Price</th> <th data-data="lanID" style="min-width:6rem" class="text-right lan-cost">Cost</th> <th data-data="lanID" style="min-width:6rem" class="text-right lan-profit">Profit</th> <th data-data="lanID" style="min-width:6rem" class="text-center lan-status">Status</th> <th data-data="lanID" style="min-width:8rem" class="lan-reg-date">Reg Date</th> <th data-data="lanID" style="min-width:7rem" class="lan-reg-time" data-visible="false">Reg Time</th> <th data-data="lanID" style="min-width:6rem" class="lan-action">Action</th> </tr> </thead>

i dn want to use jquery to pass the params, i want write like data-ajax='php file' data-param='request_param()' and i make the params value in the function. how can i do it ?

Answers

  • jasonthumjasonthum Posts: 2Questions: 1Answers: 0
    edited January 10

    <table class="table table-striped- table-bordered table-hover table-checkable table-data" id="table-product" data-ajax="../../sql/common/get-product-info.php" data-data="checking()">

    which code should i write in data-? if i want to pass param to server side ?

  • colincolin Posts: 7,697Questions: 0Answers: 1,297

    You can add additional data to what is submitted to the server by using ajax.data. That would be the place to start.

    Colin

Sign In or Register to comment.