Hi,
I have a form to 'create a tag'. Using the jQuery code below.
$("#createtag").submit(function() { //same as above, but for form submit instead of button click
var newtag = $('#newtag').attr('value');
var type_id = $('#type_id').attr('value');
var company_id = $('#company_id').attr('value');
$('#createtag').load("../contacts/action_createtag.php?newtag="+ newtag + "&type_id=" + type_id + "&company_id=" + company_id).append('#createtags');
return false;
});
But i have just realised, if the 'newtag' variable includes a space, thats where it will end. Watching it through firebug, if theres no space the parameters appear like this:
company_id 5495
newtag test
type_id 2
But when a space is entered, it appears like this:
newtag test
Does anybody know why this could be happening? Why it is not passing the proper variables to the loaded page?
Thanks in advance!
Ryan