Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:22:59+00:00 2026-05-26T23:22:59+00:00

I need to have the currently selected row id in order to build a

  • 0

I need to have the currently selected row id in order to build a JSON string that will be passed to a php script in order to create a select, so I enclosed the script reference and code in a function.

However, doing so creates a NetworkError: 403 Forbidden error.

Here is the code segment:

editoptions:{dataUrl:function(){
var row_id   = $('#tab3-grid').getGridParam('selrow');
var jsondata = JSON.stringify({"cu.STID": $('#tab3-grid').jqGrid('getCell', row_id, 'cu.STID'),
                               "wv.SVID": $('#tab3-grid').jqGrid('getCell', row_id, 'wv.SVID')});

return 'php/items-se-script.php?data='+jsondata;
},

Does anyone know whats going on?

UPDATE:

{name:'it.PRID', index:'it.PRID', hidden: true, editable:true,  edittype:'select',
editoptions:{dataUrl:'php/items-se-script.php', defaultValue:'26', dataEvents:[{type:'change',fn:function(e){$('input#ip\\.Item').val($('option:selected', this).text());}}]},
formoptions:{label:'Item', elmprefix:'* '},
editrules:{edithidden:true, required:true}},

{name:'ip.Item', index:'ip.Item', hidden: true, sortable: true, editable:false, edittype:'text', editoptions:{readonly:true,size:20}, formoptions:{rowpos: 50, label:'Item'}, editrules:{required:true}}

],

ajaxSelectOptions: {
   type:'POST',
   data: {
      data: function () {
         var row_id = $('#tab3-grid').getGridParam('selrow');
         return JSON.stringify({
            "cu.STID": $('#tab3-grid').jqGrid('getCell', row_id, 'cu.STID'),
            "wv.SVID": $('#tab3-grid').jqGrid('getCell', row_id, 'wv.SVID')
         });
      }
   }
},

url:    'php/workordertab-script.php',
editurl:'php/workordertab-script.php',
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:23:00+00:00Added an answer on May 26, 2026 at 11:23 pm

    The property dataUrl can’t be a function. If you need to send any additional information to the server during building of select you can use ajaxSelectOptions option like I described as here. In your case it will be about the following:

    var $myGrid = $('#tab3-grid');
    $myGrid.jqGrid({
        // ... here all you current parameters which includes
        //     editoptions: { dataUrl: 'php/items-se-script.php' }
        // for the corresponding column in colModel
        ajaxSelectOptions: {
            data: { // "data" here is jQuery.ajax parameter 
                data: function () { // "data" here is the name of you custom parameter
                    var row_id = $myGrid.getGridParam('selrow');
                    return JSON.stringify({
                        "cu.STID": $myGrid.jqGrid('getCell', row_id, 'cu.STID'),
                        "wv.SVID": $myGrid.jqGrid('getCell', row_id, 'wv.SVID')
                    });
                }
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a web site hitting 7 Access DBs that I desperately need
I currently have a SQL query that returns a number of fields. I need
Currently I have a class that is extending the ListActivity class. I need to
I have a UITableViewController and DetailViewController that pops up when concrete row is selected.
I currently have a need for a custom ListViewItem class - let's call it
I currently have a class where I need accomplish the equivalent of the following
I currently have event.stopPropagation() to work on a few selectors, but now I need
I need some advice of how to setup my tables I currently have a
So I have this need to import (currently) about 15k products. Each product has
Currently I have the originator of a room marked as the Host. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.