Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

cbasmadjian on "Capture url parameter onload update table"

$
0
0

I have been rounding around in circles without getting anywhere. The problem is this. Onload I need to capture the url parameter custom_var=something which I can do as shown below

// Find out what the URL parameter is
	var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
	var sParameterName = sURLVariables[0].split('=');

But once I capture this I am unable to send this to my jQuery that I have created. This is how I normally send the info to the jQuery.

<input onclick="myjQuery()" type="radio" name="strColor" value="ALL" checked>Any Color

Works just fine. But I am unable to do the same thing on a onLoad event. I have been researching updating header.php to do this, but to no avail. I try to post the data but nothing happens.

This is what my code that works normally, but not in a onload event.

$.post(
		"functions.php",
		$("#jFormData").serialize() )
		.done(
			function(data)
			{ //Appends Table rows
}

Any suggestions?


Viewing all articles
Browse latest Browse all 8245

Trending Articles