Click here to Skip to main content
14,364,335 members

Web Development

 
GeneralRe: Jquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 9:03
memberKGr2830-Oct-19 9:03 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Leanbridge Technologies1-Nov-19 23:24
professionalLeanbridge Technologies1-Nov-19 23:24 
QuestionLogin Information Pin
Member 1463762428-Oct-19 20:29
memberMember 1463762428-Oct-19 20:29 
AnswerRe: Login Information Pin
Richard MacCutchan28-Oct-19 22:54
protectorRichard MacCutchan28-Oct-19 22:54 
QuestionGrabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 10:12
memberKGr2828-Oct-19 10:12 
AnswerRe: Grabbing routeValues from ActionLink with jquery. Pin
ZurdoDev28-Oct-19 10:49
professionalZurdoDev28-Oct-19 10:49 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 10:52
memberKGr2828-Oct-19 10:52 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
Richard Deeming28-Oct-19 11:11
mveRichard Deeming28-Oct-19 11:11 
If you're using a modern browser - basically, anything except Internet Explorer - you can use the built-in URLSearchParams[^] class.
let link = document.getElementById("uploadsGif");
let query = link.href.substr(link.href.indexOf("?"));
let qs = new URLSearchParams(query);
let name = qs.get("name");
let filePath = qs.get("filePath"); 
If you need to support Internet Explorer, you could use a library like URI.js[^]. Or, you could use a simple function to extract the variable - for example: Get Query String Parameters with JavaScript[^]
function getUrlParameter(search, name) {
    name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
    var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
    var results = regex.exec(search);
    return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};
...
var link = document.getElementById("uploadsGif");
var query = link.href.substr(link.href.indexOf("?"));
var name = getUrlParameter(query, "name");
var filePath = getUrlParameter(query, "filePath"); 




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 11:34
memberKGr2828-Oct-19 11:34 
QuestionWeb API and SignlaR Test Pin
Kevin Marois16-Oct-19 7:18
professionalKevin Marois16-Oct-19 7:18 
QuestionWeb Site Log Out in Mozilla Firefox on Post back Pin
Siddharth Chudasama10-Oct-19 23:52
memberSiddharth Chudasama10-Oct-19 23:52 
QuestionRe: Web Site Log Out in Mozilla Firefox on Post back Pin
ZurdoDev28-Oct-19 10:50
professionalZurdoDev28-Oct-19 10:50 
QuestionHow to get uploaded file in ajax Post Pin
KGr283-Oct-19 5:17
memberKGr283-Oct-19 5:17 
AnswerRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 5:33
mveRichard Deeming3-Oct-19 5:33 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 5:39
memberKGr283-Oct-19 5:39 
GeneralRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 5:52
mveRichard Deeming3-Oct-19 5:52 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 8:12
memberKGr283-Oct-19 8:12 
QuestionCall To test Web API Fails Pin
Kevin Marois1-Oct-19 11:35
professionalKevin Marois1-Oct-19 11:35 
AnswerRe: Call To test Web API Fails Pin
Afzaal Ahmad Zeeshan4-Oct-19 23:42
mveAfzaal Ahmad Zeeshan4-Oct-19 23:42 
QuestionThe type or namespace name 'EigenObjectRecognizer' could not be found (are you missing a using directive or an assembly reference?) Pin
Fatemehhhhh29-Sep-19 21:55
memberFatemehhhhh29-Sep-19 21:55 
AnswerRe: The type or namespace name 'EigenObjectRecognizer' could not be found (are you missing a using directive or an assembly reference?) Pin
Richard MacCutchan29-Sep-19 23:54
protectorRichard MacCutchan29-Sep-19 23:54 
QuestionIIS issues for Core webAPi deployment Pin
Simon_Whale25-Sep-19 3:31
professionalSimon_Whale25-Sep-19 3:31 
AnswerRe: IIS issues for Core webAPi deployment Pin
Richard Deeming25-Sep-19 3:51
mveRichard Deeming25-Sep-19 3:51 
GeneralRe: IIS issues for Core webAPi deployment Pin
Simon_Whale25-Sep-19 5:09
professionalSimon_Whale25-Sep-19 5:09 
Questionbutton and Align Pin
davidovic12323-Sep-19 5:07
memberdavidovic12323-Sep-19 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.