MoFish Posted February 27, 2014 Share Posted February 27, 2014 Hi, I'm trying to pass in a URL into AJAX from a form field. The following displays corrctly (http://www.google.co.uk) from the form field. var urlMigrate = $('#migrateURL').val(); alert (urlMigrate); However when i try to pass it into a line in my ajax code it doesnt write out the value, it writes out the the actual words. Can anyone help find what I done wrong? Below is my code i'm trying $.ajax({ url: $('#migrateURL').val() + ' bob.php', }); And im trying to get url: http://www.google.co.uk/bob.php Thank you. MoFish Link to comment https://forums.phpfreaks.com/topic/286587-1-line-ajax-help/ Share on other sites More sharing options...
gristoi Posted February 28, 2014 Share Posted February 28, 2014 what do you mean by "it writes out the actual words?" Link to comment https://forums.phpfreaks.com/topic/286587-1-line-ajax-help/#findComment-1471052 Share on other sites More sharing options...
MoFish Posted February 28, 2014 Author Share Posted February 28, 2014 Sorry, I mean it actually prints out "url: $('#migrateURL').val() + ' /install/inc/migrate/migrate.process.php?action=extract'," in console. Should the following code work? Link to comment https://forums.phpfreaks.com/topic/286587-1-line-ajax-help/#findComment-1471096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.