0

If I use the following:

function openFSCUploadDialog()
{
    var diaOptions = SP.UI.$create_DialogOptions();
    diaOptions.url = "<server>/mySite/_layouts/Upload.aspx?List={E2489E65-BE6T-4569-BE36-FCE8D47DG8EB}&IsDlg=1&ReqID=1";
    diaOptions.width = 700;
    diaOptions.height = 310;
    diaOptions.title = "Trying to Pass the Value in the Dialog URL";
    diaOptions.dialogReturnValueCallback = Function.createDelegate(null, CloseCallBack);
    SP.UI.ModalDialog.showModalDialog(diaOptions);
}

to open a dialog of the upload.aspx for the site collection. I am trying to use javascript/jquery and read the value from a query string that I have passed in the above dialog.url. I am unsure of how to access the value in the code behind of the upload.aspx using javascript / jquery.

I would really appreciate any context / help on this.

EDIT: yes sorry I would like to access the value in the something like the $(document).ready of the form.

Rafay
  • 30,950
  • 5
  • 68
  • 101
Justin
  • 4,461
  • 22
  • 87
  • 152
  • 1
    do you want to access the query string value in the code behind using javascript??? – Rafay Nov 06 '12 at 19:39
  • yes if that is possible, that is exactly what I am trying to get at. that is if i am not wrong on the terminology? kinda new at this. I am looking to pass the value in the above manner, and access via doc ready of the upload.aspx – Justin Nov 06 '12 at 19:42
  • 1
    http://stackoverflow.com/a/12197444/413670 – Rafay Nov 06 '12 at 19:49
  • thanks...that is my answer. wasn't sure if I could use such an approach with SharePoint Dialog since the qryString was just within the dialog options, but it appears to work. You answered! thanks – Justin Nov 06 '12 at 20:03
  • 1
    /_layouts.aspx is a SharePoint page. You shouldn't be touching it. Rather make a copy of the page and then add the solution code to that. By the way there's a really neat JQuery passer on github [https://github.com/allmarkedup/jQuery-URL-Parser](https://github.com/allmarkedup/jQuery-URL-Parser) – Mair Swartz Nov 07 '12 at 11:41

0 Answers0