Click here to Skip to main content
15,905,590 members
Home / Discussions / Web Development
   

Web Development

 
QuestionWorkBox is not broadcasting updates. Pin
Member 1088816411-Nov-19 3:53
Member 1088816411-Nov-19 3:53 
QuestionPlease help: “Invalid argument supplied for foreach()” in Wordpress Pin
Member 146471226-Nov-19 13:28
Member 146471226-Nov-19 13:28 
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
Richard MacCutchan6-Nov-19 21:38
mveRichard MacCutchan6-Nov-19 21:38 
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
jkirkerx7-Nov-19 12:29
professionaljkirkerx7-Nov-19 12:29 
Questionweb development Pin
Member 142901874-Nov-19 1:55
Member 142901874-Nov-19 1:55 
AnswerRe: web development Pin
Richard MacCutchan4-Nov-19 2:27
mveRichard MacCutchan4-Nov-19 2:27 
QuestionJquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 4:29
KGr2830-Oct-19 4:29 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Richard Deeming30-Oct-19 5:30
mveRichard Deeming30-Oct-19 5:30 
GeneralRe: Jquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 8:03
KGr2830-Oct-19 8:03 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Leanbridge Technologies1-Nov-19 22:24
professionalLeanbridge Technologies1-Nov-19 22:24 
QuestionLogin Information Pin
Member 1463762428-Oct-19 19:29
Member 1463762428-Oct-19 19:29 
AnswerRe: Login Information Pin
Richard MacCutchan28-Oct-19 21:54
mveRichard MacCutchan28-Oct-19 21:54 
QuestionGrabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 9:12
KGr2828-Oct-19 9:12 
AnswerRe: Grabbing routeValues from ActionLink with jquery. Pin
ZurdoDev28-Oct-19 9:49
professionalZurdoDev28-Oct-19 9:49 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 9:52
KGr2828-Oct-19 9:52 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
Richard Deeming28-Oct-19 10:11
mveRichard Deeming28-Oct-19 10:11 
If you're using a modern browser - basically, anything except Internet Explorer - you can use the built-in URLSearchParams[^] class.
JavaScript
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[^]
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 10:34
KGr2828-Oct-19 10:34 
QuestionWeb API and SignlaR Test Pin
Kevin Marois16-Oct-19 6:18
professionalKevin Marois16-Oct-19 6:18 
QuestionWeb Site Log Out in Mozilla Firefox on Post back Pin
Siddharth Chudasama10-Oct-19 22:52
Siddharth Chudasama10-Oct-19 22:52 
QuestionRe: Web Site Log Out in Mozilla Firefox on Post back Pin
ZurdoDev28-Oct-19 9:50
professionalZurdoDev28-Oct-19 9:50 
QuestionHow to get uploaded file in ajax Post Pin
KGr283-Oct-19 4:17
KGr283-Oct-19 4:17 
AnswerRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 4:33
mveRichard Deeming3-Oct-19 4:33 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 4:39
KGr283-Oct-19 4:39 
GeneralRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 4:52
mveRichard Deeming3-Oct-19 4:52 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 7:12
KGr283-Oct-19 7:12 

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.