Jump to content

1 Line Ajax Help


MoFish

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.