I'm having a (I think stupid) problem.
I have a controller, an Index method, and its presentation has some jQuery functions.
It works great, and jQuery methods work fine.
used link
http:
but if I put
http:
jQuery functions do not work. From what I know, they should act in exactly the same way.
This is the only thing I'm changing
I really appreciate your help. It made me go crazy for the last two hours!
For example, this is my script
<script> $(document).ready(function() { $('select#testCategoriesUniqueId').change(function() { var testCategory = $(this).val(); $.ajaxSetup({ cache: false }); alert ("AAA"); $.ajax({ url: "TestInput/listTestCases/" + testCategory, dataType: "json", type: 'post', success: function(data) { $("#testCasesUniqueId").removeOption(/./); for (var i = 0; i < data.length; i++) { var val = data[i].Value; var text = data[i].Text; $("#testCasesUniqueId").addOption(val, text, false); } } }); }); });
In both cases, I get a warning, but in the second link I cannot call the controller.
It does not call the listTestCases method of my controller.
Update:
So, I tried to use the parameters instead of the exact reference, I still have a problem, I have both sources, and I got diff, the only difference is
<form name="aspnetForm" method="post" action="Index" id="aspnetForm">
vs.
<form name="aspnetForm" method="post" action="TestInput" id="aspnetForm">
and
<form action="/TestInput/Index" method="post">
vs.
<form action="/TestInput" method="post">
Which I believe has nothing to do with jQuery.
I still see laert in both cases. but jQuery works in ~ / TestInput, not with ~ / TestInput / Index.