I've got a Calculated field called: calcID with dynamic string number displayed, example result: 12.
I need to add this to a button's onclick event, which opens up a newform.aspx in dialog and that calcID is added to the URL as a query string parameter. ?CID=12
I've got the dialog opening up with a newform.aspx but have no idea how to add the value from the calcID.
Client click:
javascript:portal_openModalDialog('/sites/Programs/res/Lists/Contractors%20Charge%20Codes/NewForm.aspx?CID=+calcID+');javascript:return false; |
So the value CID=xxxx is to be in the URL Query string, so it can be added to the newform where a field called CID is displayed. So all I need is a way to store that 12 in a variable and add it to the CID parameter.
My code in the Custom Javascript to display the dialog box is as shown below.
The Dialog box displays but the variable for thiscalcID does not. I believe it's to do with the JavaScript syntax formatting of the URL. I am not that great with JavaScript, so any help would be great. Thanks.
|