I am using JQuery's thickbox to input form data. Would like to auto close the thickbox and send a variable back to the parent from the thickbox form input upon submit.
Okay, I am trying (poorly) to successfully make a JSONP call from jQuery on a test page to a WCF web service running locally, as a cross-domain call. I have, at one point or another, either gotten a 1012 URI denied error, gotten a response but in Xml, or just had no response at all. Currently, the way I have it configured it spits back a 1012.
I did not write this web service, so it is entirely possible that I am just missing a configuration setting somewhere, but I've become so frustrated with it that I think just asking on here will be more productive. Thanks guys. Details below.
I have a WCF web service with the following method:
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public decimal GetOrderStatusJson(int jobId)
I am trying to call this method from a jQuery test page, via a cross-domain JSONP call.
<script type="text/javascript">
getJsonAjaxObject(
"http://localhost:3960/ProcessRequests.svc/json/GetOrderStatusJson",
{ "jobId": 232 });
function getJsonAjaxObject(webServiceUrl, jsonData) {
var request = {
type: "POST",
contentType: "application/json; charset=utf-8",
url: webServiceUrl,
data: jsonData,
dataType: "jsonp",
success: function(msg) {
//success!
alert("blah");
},
error: function() {
//oh nos
alert("bad blah");
}
};
$.ajax(request);
}
</script>
Below are the chunks of the web.config I configure for this purpose:
<services>
<service behaviorConfiguration="MWProcessRequestWCF.ProcessRequestsBehavior"
name="MWProcessRequestWCF.ProcessRequests">
<endpoint address="json" behaviorConfiguration="AspNetAjaxBehavior"
binding="webHttpBinding" contract="MWProcessRequestWCF.IProcessRequests" />
<endpoint address="" binding="wsHttpBinding" contract="MWProcessRequestWCF.IProcessRequests">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MWProcessRequestWCF.ProcessRequestsBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="AspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
I'm trying to adjust a jquery script to my needs and encountered the following lines-
arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
_c3();
_c4();
return;
};
what is it?
Hi,
When I set my jQuery dialog to model=true, it disables my form elements inside the dialog and I cannot use them, only the buttons.
I have seen examples where the contents of the dialog is declared in the dialog initiation script and then injected. but that is just to bulky for me, I want to be able to create my markup inside the DIV which I turn into a dialog.
Anyone got a solution for me?
I have a jquery Image slider in a content page that worked fine. Once I converted it into a asp repeater the first image of the repeater would display twice, then run normally.
Any idea on why the repeater is causing this?
simply i'm doing a test
i have a div called test and mvc action in the client controler
the view
and the controler
public string testout()
{
return DateTime.Now.ToString();
}
and i'm using jquery to update the div
$("#B1").live("click", function() {
$("#test").load("/client/testout");
return false;
});
first time a click the bottun i see the date and time in the div test second time i click the botton nothing changed
I'm in the midst of writing a slideShow app (click a button, and you slide through a list of images) for jQuery, but I've run into a little bug where it will respond to the click() request even while an animation is happening. I'm using the animate() function already, so that isn't staving off the additional animation requests.
Any way to program around this?
I'm using the jQuery validation plugin to validate a form, and I'd like to remove the validation and submit the form if a certain link is clicked.
I am submitting form with javascript like jQuery('form#listing').submit(), so I must remove the validation rules/function with javascript.
The problem is that I can't figure out how to do this. I've tried things like jQuery('form#listing').validate({}); and jQuery('form#listing').validate = null, but with no luck.
I just want to use javescript /jquery to determine if and xml file exsists
I don't need to process it I just need to know that its available or not.
can seem to find simple check.
thanks
is there anyway to theme an html table (css) with using the jquery css themes ? all of my components look like they belong together except for my html table which look different.
Hi,
I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part...
I'm doing this with greasemonkey and jQuery...
I'm trying something like this
$("input[@type=text]").setValue("[email protected]");
but had no success...
The Page has only the login part, two text type inputs...
What am I missing here?
The following code
stringref = "tab_2";
jQuery('.someclass a:not(.someclass #a_someclass_'+stringref+')').css('color', '#000');
gives me this warning in the FF 3.5.5 error console and I can't figure out why:
Warning: Missing closing ')' in negation pseudo-class '#a_someclass_tab_2'.
Is my syntax failing me or has FF gone bonkers ?
Hi there,
I am combing the jQuery validation plug-in with the jQuery Form Plugin to submit the form via AJAX.
This works perfectly in Firefox & Chrome, but (as usual) Internet Explorer is being a pain. For reasons that are alluding me, IE is ignoring the ajaxSubmit, as a result it submits the form in the normal fashion.
I've followed the validation plug-in's documentation when constructing my code:
JS:
$(document).ready(function() {
var validator = $("#form_notify").validate({
messages: {
email: {
required: 'Please insert your email address. Without your email address we will not be able to contact you!',
email:'Please enter a valid email address. Without a valid email address we will not be able to contact you!'
}
},
errorLabelContainer: "#error",
success: "valid",
submitHandler: function(form) {$(form).ajaxSubmit();}
});
$('#email').blur(function() {
if (validator.numberOfInvalids() 0) {
$("#label").addClass("label_error");
return false;
}
else {$("#label").removeClass("label_error");}
});
$('#form_notify').submit(function() {
if (validator.numberOfInvalids() == 0) {
$(this).fadeOut('fast', function() {$('#thank-you').fadeIn();});
return true;
}
return false;
});
});
Form HTML:
<form id="form_notify" class="cmxform" name="form_notify" action="optin.pl" method="get">
<fieldset>
<div class="input">
<label id="label" for="email">Email Address:</label>
<input type="text" id="email" name="email" value="" title="email address" class="{required:true, email:true}"/>
<div class="clearfix"></div>
</div>
<input type="hidden" name="key" value="sub-745-9.224;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0;;subscribe-224.htm">
<input type="hidden" name="followup" value="19">
<input type="submit" name="submit" id="submit-button" value="Notify Me">
<div id="error"></div>
</fieldset>
</form>
I can't understand what is causing IE to act differently, any assistance would be greatly appreciated.
I can provide more information if needed.
Thanks in advance!
I've been searching all over the place and just don't see anyone doing it - Is it possible to have some kind of spinner/loader with a jQuery UI Autocomplete? (1.8) while data is being fetched?
Is there a way in JQuery to loop through or assign to an array all of the classes that are assigned to an element?
ex.
<div class="Lorem ipsum dolor_spec sit amet">Hello World!</div>
I will be looking for a "special" class as in "dolor_spec" above. I know that I could use hasClass() but the actual class name may not necessarily be known at the time.
Hello , i'm trying to validate credit card numbers with jQuery but i dont want to use the validation plugin , is there any other plugin for doing this?
thanks
I have application that brings response via Ajax and creates 5-20 new jQuery click listeners on each refresh. Both IE and mozilla browsers seem to be slowing down with usage. Can this slow down browser performance significantly. Can listeners be "released"?
when using the jquery ui autocomplete, i would thought there would be an option to force only valid key entry based on the list. Is there anyway to not allow invalid keys so you can only enter valid items in the list?
if my list has (csharp, java, python)
i can start typing "abcds . ." and it lets me type it in. I want only valid entries to be allowed.
I can't parse the JSON that I have no control of. What am I doing wrong here?
data.json
{
"img": "img1.jpg",
"img": "img2.jpg",
"size": [52, 97]
}
{
"img": "img3.jpg",
"img": "img4.jpg",
"size": [52, 97]
}
jquery
$.getJSON("data.json",
function(data){
$.each(data, function(i,item){
alert(item.img[i]);
});
});
I've heard of Qtip, and it looks good for what I want to use. Is this the most common one? Are there any other jquery tooltip plugins that people recommend? I want to pop up a bubble with images and formatted text.
It seems to me that jQuery doesn't seem to be written as an OOP framework, it seems too short, and not verbose enough for that. Am I right in thinking this and if it isn't written as OOP, then what methodology are they using?