Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the CEWP does not allow connections.

Is there a way to grab this value from the Chart or Filter in the CEWP embeded javascript. ( Designer is not available where I work )

share|improve this question
add comment

1 Answer

I used this code:

function GetValue(name)
{
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+name+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( unescape(window.location.href) );
    if( results == null )
        return "";
    else
        return results[1];
}

Source: http://kancharla-sharepoint.blogspot.co.at/2012/03/javascript-code-to-get-query-string.html

share|improve this answer
    
This would be a fine way to grab the value from the URL. –  Hank Feb 12 '13 at 16:38
    
I raised the question because I was looking for a way to access the Filter value from the Chart Web Part or from the Query Filter Web Part. –  Hank Feb 12 '13 at 16:39
    
Oh sorry I thought that's what the Query String Filter Web Part is all about.. if I find something else I'll make sure to post again! –  masterjo Feb 12 '13 at 23:26
    
Maybe this is what you looking for? Asked that this week: sharepoint.stackexchange.com/questions/59366/… –  masterjo Feb 13 '13 at 15:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.