473,549 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get request with string that contains ",jpg"

1 New Member
Hi,

Have a strange case where I try to make a GET request using jQuery.

Expand|Select|Wrap|Line Numbers
  1. $.ajax({
  2.         type: 'GET',
  3.         url: 'MyMethod?param=ABC.ABC',
  4.         timeout: 10000,
  5.         contentType: 'application/x-www-form-urlencoded; charset=UTF-8',        
  6.         success: function (data) {
  7.         },
  8.         error: function (xhr, status, error) {      
  9.         }
  10.     });

The method above works fine. But if I change the URL to

'MyMethod?param =ABC.jpg',

it's not working, the method (MyMethod) never gets called. Could anyone explain this?

I'm using jQuery 1.9.1
Nov 27 '14 #1
2 1330
Dormilich
8,658 Recognized Expert Moderator Expert
it's not working, the method (MyMethod) never gets called.
does that mean the server script fails or that you don’t even have a request sent?
Dec 15 '14 #2
Dormilich
8,658 Recognized Expert Moderator Expert
note: application/x-www-form-urlencoded is an invalid content-type for GET requests.
Jan 6 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
10309
by: Matt | last post by:
The JSP page needs to send XML request string to another JSP page when the user clicks submit button, I wonder how to get started because when user click submit button, it will send the form to page2.jsp. <form action="page2.jsp" method="POST"> Name: <input type="text" name="fname"> //etc.. controls <input type="submit"> </form>
9
11212
by: booksnore | last post by:
I am writing some code to search for strings that contain every letter of the alphabet. At the moment I am using the method below to check to see if a string contains every letter of the alphabet. I wanted to use a regular expression but I could not find an ‘AND’ operator within the regular expression – so I need something like match true if...
2
2085
by: Michael Lang | last post by:
Is there anyway to get an anchor passed on a request string.... e.g mypage.aspx#myanch in the mypage code behind i want to be able to get the string "myanch"... Basically I want to navigate to an element in the page, but i also want to change a property on this element I've yet to find any way of getting the anchor from the query...
13
14951
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
6
3131
by: stanleyhsieh | last post by:
Hi all! I'm new here! I was wondering how I can check if a string contains only "A-Za-z0-9_" and ".". I tried the following code function check_validstring($check_validstring) { if(eregi('',$check_validstring))
0
1268
by: Borse, Ganesh | last post by:
Hi, Am new to python. May someone please help me know this? How can we check whether one big string contains another small string? E.g. bigstring="python anaconda boa cobra" smallone="boa"
7
4705
by: Karch | last post by:
I need to find the fastest way in terms of storage and searching to determine if a given string contains one of a member of a list of strings. So, think of it in terms of this: I have a string such as the following: "Smith said the dog belongs (or did belong) to the secretary, an employee of the company." Then the list contains the...
4
10259
by: Jeff | last post by:
Hey ..NET 3.5 I'm trying to search a string to determine if the string contains </table>, but string.Contains don't find it. I've used WebRequest/WebReponse to retrieve the html from a webpage and now I'm searching through this html... this webpage contains 4 html tables. so there are 4 </table>, but my code don't find any...
1
2013
by: Jon Skeet [C# MVP] | last post by:
On Apr 30, 3:56 pm, Raja <rajesh.mad...@gmail.comwrote: Well, in fact it's *not* working fine - it's not behaving the same on SQL server as it would be in normal code. String.Contains is case- sensitive. My guess is that your database is set to be case- insensitive, hence why it's behaving how you want it to. To get a case-insensitive...
8
4645
by: SMJT | last post by:
Does anyone know why the string contains function always returns true if the token is an empty string? I expected it to return false. "AnyOldText".Contains("") or "AnyOldText".Contains(String.Empty)
0
7532
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7461
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7491
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5101
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3509
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3491
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1068
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.