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.
I am using jquery corners javascript library to make the corners of a div rounded. It works fine, But if i specify a body background image/color or grident background color, corners are still white. How can i make these corners transparent?
I am working on a site http://tapasya.co.in where i just impemented mootools slideshow.
But I noticed that menubar that i was using stopped working, it was supposed to drop horizontaly but it is not being displayed now. I have used jquery for it. Please see the source of the web page. What can be the problem ? Mootools conflicting with javascript or some other problem
Hello,
Is this the notation to use for Not Equal To in JS, in jquery code
!== OR !=
None of them work
Here is the code I am using
var val = $('#xxx').val();
if (val!='') {
alert("jello");
}
Thanks
Jean
Hi,
I am having the text box and when the text box gets focused then the div should visible at the end of the textbox in jquery
For example :
Username:textbox focused and div should visible at the end of the textbox
ASAP give me the solution,
Thanks in Advance,
Vara Prasad.M
Hi All,
I am using jquery cycle and jCarouselLite plugin to display images as slide. Images are getting displayed in ie7. but working perfect in ie6.
Code:
$('#slide').cycle({
fx: 'fade',
continuous: true,
speed: 7500,
timeout: 55000,
sync: 1
});
Geetha.
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>
Hi, Recently I got one requirement that i have to uncheck radio button list when a user double click it (Try to uncheck). I did this using JAVA Script. Below is the code. Designer: 1: < head runat ="server" > 2: < title > :Radio Button List Demo: </ title > 3: < script language ="javascript" type ="text/javascript" > 1: 2: //Global variable to store selectedvalue 3: var lastchecked = "" ; 4: 5: function rblSelectedValue...(read more)
I have a large application and I'm going to enabling short-cut key for it. I'd find 2 JQuery plug-ins (demo plug-in 1 - Demo plug-in 2) that do this for me. you can find both of them in this post in StackOverFlow
My application is a completed one and I'm goining to add some functionality to it so I don't want towrite code again.
So as a short-cut is just catching a key combination, I'm wonder how can I call the server methods which a short-cut key should fire?
So How to use either of these plug-ins, by just calling the methods I'd written before?
Actually How to fire Server methods with Jquery?
You can also find a good article here, by Dave Ward
Update: here is the scenario. When User press CTRL+Del the GridView1_OnDeleteCommand so I have this
protected void grdDocumentRows_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
try
{
DeleteRow(grdDocumentRows.DataKeys[e.Item.ItemIndex].ToString());
clearControls();
cmdSaveTrans.Text = Hajloo.Portal.Common.Constants.Accounting.Documents.InsertClickText;
btnDelete.Visible = false;
grdDocumentRows.EditItemIndex = -1;
BindGrid();
}
catch (Exception ex)
{
Page.AddMessage(GetLocalResourceObject("AProblemAccuredTryAgain").ToString(), MessageControl.TypeEnum.Error);
}
}
private void BindGrid()
{
RefreshPage();
grdDocumentRows.DataSource = ((DataSet)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.TRANSACTIONS_TABLE];
grdDocumentRows.DataBind();
}
private void RefreshPage()
{
Creditors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_CREDITORS_SUM_FIELD];
Debtors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_DEBTORS_SUM_FIELD];
if ((Creditors - Debtors) != 0)
labBalance.InnerText = GetLocalResourceObject("Differentiate").ToString() + "?" + (Creditors - Debtors).ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF) + "?";
else
labBalance.InnerText = GetLocalResourceObject("Balance").ToString();
lblSumDebit.Text = Debtors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
lblSumCredit.Text = Creditors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
if (grdDocumentRows.EditItemIndex == -1)
clearControls();
}
Th other scenario are the same. How to enable short-cut for these kind of code (using session , NHibernate, etc)
So I have a script which returns a price for a product. However the price may or may not include trailing zeros so sometimes I might have:
258.22
and other times I might have
258.2
In the later case I need to add the trailing zero with jQuery. How would I go about doing this?
I've made a simple PHP jQuery Chat Application with Short Polling (AJAX Refresh). Like, every 2 - 3 seconds it asks for new messages. But, I read that Long Polling is a better approach for Chat applications. So, I went through some Long Polling scripts.
I made like this:
Javascript:
$("#submit").click(function(){
$.ajax({
url: 'chat-handler.php',
dataType: 'json',
data: {action : 'read', message : 'message'}
});
});
var getNewMessage = function() {
$.ajax({
url: 'chat-handler.php',
dataType: 'json',
data: {action : 'read', message : 'message'},
function(data){
alert(data);
}
});
getNewMessage();
}
$(document).ready(getNewMessage);
PHP
<?php
$time = time();
while ((time() - $time) < 25) {
$data = $db->getNewMessage ();
if (!empty ($data)) {
echo json_encode ($data);
break;
}
usleep(1000000); // 1 Second
}
?>
The problem is, once getNewMessage() starts, it executes unless it gets some response (from chat-handler.php). It executes recursively. But if someone wants to send a message in between, then actually that function ($("#submit").click()) never executes as getNewMessage() is still executing. So is there any workaround?
We're running a facebook ad campaign for our business but there seems to be a huge discrepancy between the number of clicks registered and the number of requests made with "facebook.com" in the HTTP referrer.
The difference can be anything between 40-80 clicks/requests.
I understand why the Google Analytics would be off and I understand that the figures shouldnt be exactly the same but surely if 100 people click the ad then I should be seeing at least 90 requests for the homepage with facebook.com as the referrer?
Can anybody provide any insight into why this may be happening?
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?
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
Dear community,
I just want to have my question posted here but just from the beginning:
For a personal web project I use PHP + JQuery.
Now I got stuck when I try to use the ajax posting method to send data to another php-page. I planned to have some navigational elements like next + previous on the bottom of the page by saving the user input / user given data. The code looks as follows:
<div id="bottom_nav">
<div id="prev" class="flt_l"><a href="?&step=<?= $pages[$step-1] ?>">next</a></div>
<div id="next" class="flt_r"><a href="?&step=<?= $pages[$step+1] ?>">previous</a></div>
</div>
The functionality of the page works fine. Lateron, I use the following code to sent data over via POST:
$("#bottom_nav a").click( function() {
alert("POST-Link: Parameter=" + $("#Parameter").val());
$.ajax( {
type:"post",
url:"saveParameter.php",
data:"Parameter=" + $("#Parameter").val(),
success: function(result) {
alert(result);
//$("#test").text(result);
}
});
});
The request itself work perfectly on IE, but on FF I'm not able to get back any result.
within the PHP page, there just written:
<? echo $_POST['Parameter']; ?>
As IE returns the correct value, FF just provide an empty message box. I assumed that the behaviour on the -Link is different. While IE seems to handle the clickevent after the JS-Code execution, FF will interpret it before.
My question was whether you has a solution on this regarding restructuring the code itself or using another method to reach the intened behaviour.
Thanks for your assistance and recommendations,
Olli
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?
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'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,
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?
I have read this.
http://stackoverflow.com/questions/2048485/jquery-checkbox
<input type="checkbox" name="checkGroup" id="all">
<input type="checkbox" name="checkGroup" id="one" value="1">
<input type="checkbox" name="checkGroup" id="two" value="2">
<input type="checkbox" name="checkGroup" id="three" value="3">
<input type="hidden" name="storeCheck" value="">
$(function(){
$("#all").click(function(){
$("input:checkbox[name='checkGroup']").attr("checked",$(this).attr("checked"));
});
$("input:checkbox[name='checkGroup']:not('#all')").click ( function(){
var totalCheckboxes = $("input:checkbox[name='checkGroup']:not('#all')").length;
var checkedCheckboxes = $("input:checkbox[name='checkGroup']:not('#all'):checked").length;
if ( totalCheckboxes === checkedCheckboxes )
{
$("#all").attr("checked" , true );
}
else
{
$("#all").attr("checked" , false );
}
});
});
Demo
I am trying to get the value of the checkboxs are checked as an array.
for example
if I checked All
Get value array_check = 1,2,3 and passed this array to hidden name="storeCheck"
otherwise:
Get value of array_check( checkboxs checked ).and passed this array to hidden name="storeCheck"
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 ?