chasethemetal Posted October 22, 2011 Share Posted October 22, 2011 Hey all! This is my working jquery line right now... $("#name").text($(my_name).text()); This takes the value of my_name and puts it in a div with the id of name. Great.... But now I am looking for away to append it to the end of a url like so.... $('#name').load('handle.php?name='+ my_name); This above doesn't work. I am just trying hard to figure out how I can get the value that goes into the DIV to instead be placed as text at the end of a url to be processed by my script. Thanks any help would be appreciated! Link to comment Share on other sites More sharing options...
chasethemetal Posted October 23, 2011 Author Share Posted October 23, 2011 I figured it out. The reason it was confusing was there was a mysterious amount of whitespace on the front of the string that I had to eliminate... Here's my final solution. var name = $.trim($(my_name).text().substr(10).replace(/ /g,'%20'));$("#name").load('handle.php?name='+name); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.