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 Quote Link to comment https://forums.phpfreaks.com/topic/286587-1-line-ajax-help/ Share on other sites More sharing options...
Solution gristoi Posted February 28, 2014 Solution Share Posted February 28, 2014 (edited) what do you mean by "it writes out the actual words?" Edited February 28, 2014 by gristoi Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/286587-1-line-ajax-help/#findComment-1471096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.