Questions tagged [unobtrusive]

46 questions
0
votes
0 answers

Javascript unobtrusive onclick with sweetalert

Good Evening, I'm fairly new to JavaScript. I have a book and scour the internet when looking for answers. I see that the JavaScript landscape seems to have a plethora of paths and frameworks. To the question, I'm trying to use unobtrusive…
naden
  • 13
  • 2
0
votes
1 answer

Ajax.ActionLink with PartialView opens new page MVC4

I am building a ASP.NET MVC4(.5) web app. I went trough much topics about the problem, tried every one of them but the problem didn't disappear. I have a controller which returns a PartialView. [HttpGet] public ActionResult Subcategories(int id) { …
flacko
  • 125
  • 2
  • 9
0
votes
1 answer

jQuery Validate unobtrusive - Enable validation for hidden fields

i am use asp.net mvc 5, about jquery validate unobtrusive, jquery validate is 1.13 version. I have searched very much answer, Although this problem have solve,But I want to know another method. $.validator.setDefaults({ ignore: [] }); …
SuperJLive
  • 43
  • 8
0
votes
2 answers

Perform unobtrusive JQuery form validation without form submit

I have a form that represents an item. The form contains a submit button. If the submit button is clicked, validation unobtrusive validation on these fields should occur. If the validation fails, nothing else should happen. If the validation…
user3083619
0
votes
1 answer

jQuery Load with jQuery Tabs - Unobtrusive Validation

I am using jQuery Tabs and I am loading the tab pages using the tabsbeforeactivate event, so that I only load contents when needed through Ajax. I am facing difficulties since I need to manually enable Unobrusive Validation after injecting the…
user2779312
  • 661
  • 2
  • 9
  • 23
0
votes
1 answer

jquery validation plugin not working with unobtrusive js reference

I have a MVC4 project that is using unobtrusive validation, but for one section I am using knockoutjs. I have setup knockout to use the jquery validation plugin, but when I call $("form").valid() it is not behaving as expected. I have knockout…
Ryan Dobbs
  • 381
  • 2
  • 11
0
votes
1 answer

Simple MVC4 unobtrusive ajax not working

I am writing a very simple MVC4 test page and unobtrusive Ajax does not seem to be working. When I click my submit Button the page is not submitted. I have a breakpoint is VS and can tell there is no request. I am using Firefox and when I click…
Don Chambers
  • 3,798
  • 9
  • 33
  • 74
0
votes
0 answers

how to run custom code after validation of mvc4 unobtrusive validation?

i am looking of the a way to run custom code after validation of mvc4 unobtrusive validation functionality i have found a lot but nothing works for me try this var settngs = $.data($('form')[0], 'validator').settings; var oldErrorFunction…
Amir Magdy
  • 188
  • 9
0
votes
1 answer

Can't replace hard-coded property name value with variable value in function call

I'm trying to use the unobtrusive date picker in an old liferay project (3.6) which I believe is running prototype.js. I have a call like this: datePickerController.createDatePicker({formElements:{"elementId":"%d/%m/%Y"}}); made to…
0
votes
3 answers

Turning obtrusive JavaScript to unobtrusive

I am struggling to see how to turn a piece of javascript from obtrusive to unobtrusive, can anybody shed some light? Here's the script: function limitText(limitField, limitCount, limitNum) { if (limitField.value.length > limitNum) { …
user1323595
0
votes
1 answer

why is the partial view not beeing replaced?

From a demo solution i tried to use the built in mvc ajax features. But for some reason the partial view is not beeing replaced. @using (Ajax.BeginForm("RefreshPartial", "Home", new AjaxOptions() { UpdateTargetId = "PartialToRefresh", HttpMethod =…
Stian Standahl
  • 2,506
  • 4
  • 33
  • 43
0
votes
1 answer

Unobtrusive plain Javascript with several DOMContentLoaded events organization

Maybe it is a silly question but I am a very confused with JavaScript. I follow this code organisation with as much as possible unobtrusive JavaScript. I build a website in Ruby on Rails that uses Google Maps. My scenario: Suppose I have a REALLY…
vasilakisfil
  • 2,279
  • 4
  • 24
  • 31
0
votes
1 answer

Why do I recieve both "$jQval is undefined" and "$.validator.unobtrusive is undefined" when using RequireJS?

This has had me puzzled for a few hours now. When the script is in a non-requirejs javascript file it works fine. When I use it with RequireJS it fails to work and gives me the error messages in the question title (though the firebug console). I was…
Kiada
  • 679
  • 3
  • 15
  • 24
0
votes
3 answers

Failing to get unobtrusive client validation

I figured out that property i want to be validated has to have [Required] attribute in C# (am i right?) If so -my model is linq generated class - how to add this attribute?
happyZZR1400
  • 2,387
  • 3
  • 25
  • 43
0
votes
1 answer

jquery unobtrusive validation dependencies resolving

I have a problem with using unobtrusive jquery -Uncought type error cannot set property unobtrusive of 'undefined' on page load and the resource is not loaded I am using : * jQuery Validation Plugin 1.8.1 * jQuery JavaScript Library…