<
script type="text/javascript"> $(document).ready(function() {$.ajax({
type:
"POST", url: "Default.aspx/AcceptInvitation", //Pass the selected record iddata:
"{'TID': '" + t_id + "',IID': '" + i_id + "'}",contentType:
"application/json; charset=utf-8",dataType:
"json",success:
function() { // Change the back color of the Row before deletingtr_id.css(
"background-color", "lightgreen"); // Do some animation effecttr_id.fadeOut(500,
function() { //Remove GridView rowtr_id.remove();
});
}
}); 1. It doesn't call AcceptInvitation method. 2. I'm also not able to change the value of textbox in 'Invitation.ascx' . Can please guide me , how can I use JQuery in ascx ?
I have a ASMX service, it is return a string xml:
<Catalogues>
<Catalogue ID="1" Name="Test 1" />
<Catalogue ID="2" Name="Test 3" />
<Catalogue ID="3" Name="Test 3" />
</Catalogues>
I use jquery to call service. In firefox, it works fine, but in IE ....
This is my code:
I’m trying to call a method defined in a ‘C’ program. When WebVldTestReqst is executed (see below), the value returned in ptrReturn looks like a combination of text and packed data. However it does not contain the value actually returned by the ‘C’ method (validated what was being returned via logging).
In order to turn the logging on, I create a character data area of length 140, and when this data area exists, if WebVldTestReqst is executed the contents of ptrReturn contain the value returned by the ‘C’ method (in positions 49 – 125. It should be in positions 1 to 76).
It’s as if the pointer ptrReturn is pointing to the wrong memory location and when the logging data area exists it shifts the memory location enough that the returned value is within the referenced memory location.
So it seems like ptrReturn is pointing to the wrong memory location but I don’t know how to correct the problem.
I change page A to B, B to C, C to A with a standard href, when I come back to the page A at the end, I cannot call any methods declared in this page. This issue doesn't appear if I set 'rel='external' ' however, this disable animation and I need to keep it...
Any idea?
I need to apuse the video player from an external button ".btn2"
but nothing seems to work.
$(document).ready(function() {
$('video').jmeEmbed();
//set video external control
$('.btn2').bind('click', function(){
$('video, audio').not(e.target).pause();// this wont work
$('video').pause();// neither does this
//$('video').jmeReady(function(){
//this reffers to the video-element
//$('video').pause();// or even this
//});
});
});
I cant seem to get the example on your site to work either (using firefox 3.6)
http://www.protofunc.com/jme/documentation/documentation-api.html
Am I missing something?
The exception 'Permission denied to call method XMLHttpRequest.open'
apparently gets thrown if you attempt to load content from JavaScript
from another domain. Is this correct?
I'm trying to write a simple script to load an RSS feed to display on
my web site. What I thought would be a 5 minute task using $.get() to
get the XML is turning into a major CF. I know that this is not a
JQuery specific issue.
Is this exception new with FF2 and IE7?
More important... is there a way around it that is transparent to the
reader of the site?
Here is my issue:
The js I use on the following page works great using jquery, jqmaps
and the google maps API to load up a map:
http://dev.c21hull.com/listings/map.htm?listing_id=GL-9027
Now, I want to load teh map in a modal window via an AJAX call so I
use jqmodal. When you click "mapit" the modal window loads (I know the
close btn doesn't do anything yet) and the AJAX request is returned
nicely, but when the map tries to load within the content that was
just returned I get a "Permission denied to call method
XMLHttpRequest.open" error. Here is the example:
http://dev.c21hull.com/listings/browse.htm?byid=9027&bytype=all&byprice%5Bfrom%5D=0&byprice%5Bto%5D=400000%2B&bybeds%5Bfrom%5D=0&bybeds%5Bto%5D=5%2B&bybaths%5Bfrom%5D=0&bybaths%5Bto%5D=5%2B&bysqft%5Bfrom%5D=0&bysqft%5Bto%5D=5000%2B&byacres%5Bfrom%5D=0&byacres%5Bto%5D=41%2B&search=search
I understand that the error in question happens when you make requests
cross domain, but why does this code work in teh first example but not
the second? After researching, it has been suggested I use a SS proxy;
how can I do that here? Please explain as much as possible - I'd like
to learn this and really understand it.
Hi,
I am a newbie in using jquery.Please excuse me if similar query has
been posted earlier.
I am using $.getJSON() on the click of a link.
when i pass the url it gives error 'Permission denied to call method
Location.toString'.
The url passed is correct and is within the same domain.
code snippet is
$(function()
{
$('#alink').click(function(){
var urljson = ' http://home/mailist?output=json';
alert(urljson);
$.getJSON(urljson,function(datajson){
alert('datajson '+datajson);
});//getJson
}); //click
});//ft
alert urljson is giving proper url but alert inside the getJson() is
not working. seems its not going inside the function.
from where is the error coming.???
Does anyone know how to call a method from JS through UpdatePanel with jQuery?
I cant call WebMethod cause it is static (I have a custom control and it is statically inaccessible).
What I have:
Custom control on a ASP.NET website in UpdatePanel
What I need:
User clicks on a link and JS does its magic and than I have to post (AJAX) changes to server (custom control).
How do I achieve this with UpdatePanel (I cant jQuery ajax call) - how can I call a method on server with some arguments from JS?
I have been working on this page for my company:
http://www.teamcarney.com/CCDEV/pages/blogtest.html
I am a relatively inexperienced coder, but I had been working on this for a while. I found this and I have been using it:
http://apps.appin8.com/p_mobirss/
However, I have trimmed it down and think I have almost gotten it working. But, whenever pressing the button, it gives an error saying "Uncaught TypeError: Cannot call method 'changePage' of undefined" and firefox says "$.mobile is undefined".
For clarification, I am trying to use it to load just the one page, as opposed to the multiple potential feeds that could be loaded by the WebApp I am basing this off of.
Could anyone take a look at the code and help me figure out the problem?
I can't even start jquery mobile, the only thing I have is my index file, with my includes, yes my linking is right.
Keep getting a white page and this error in google chrome Uncaught TypeError: Cannot call method '_trigger' of undefined
<!DOCTYPE html><html><head> <title>Collect&GO</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.0a3.css" /> <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script> <script type="text/javascript" src="js/app.js"></script> <script type="text/javascript" src="js/jquery.mobile-1.0a3.js"></script> </head><body></body></html>
please help me.
I problem for call method(add,print,remove) in the other class(class main).
Don't error program .
when run program don't error but nothing the insert item and rutern 0 call method print.
I'm in the program use Dictionary<(Of <(TKey, TValue>)>);
thank you.
Code class members:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Members
{
// Program objp = new Program();
public Dictionary<int, classmembers> objclassmembers = new Dictionary<int, classmembers>();
Program objProgram = new Program();
//start classmembers
public class classmembers
{
private int MembershipNumber;
private string FirstName;
private string LastName;
private string FatherName;
private string BirthDate;
public int pMembershipNumber
{
get { return MembershipNumber; }
set { MembershipNumber = value; }
}
public string pFirstName
{
get { return FirstName; }
set { FirstName = value; }
}
public string pLastName
{
get { return LastName; }
set { LastName = value; }
}
public string pFatherName
{
get { return FatherName; }
set { FatherName = value; }
}
public string pBirthDate
{
get { return BirthDate; }
set { BirthDate = value; }
}
//-------------------------
private void set_members(int MembershipNumber, string FirstName, string LastName, string FatherName, string BirthDate)
{
pMembershipNumber = MembershipNumber;
pFirstName = FirstName;
pLastName = LastName;
pFatherName = FatherName;
pBirthDate = BirthDate;
}
//-------------------------
public classmembers(int MembershipNumber, string FirstName, string LastName, string FatherName, string BirthDate)
{set_members(MembershipNumber, FirstName, LastName, FatherName, BirthDate);}
//-------------------------
}
//end classmembers
//start method add
public void add()
{
Console.Clear();
Console.WriteLine("---------->>Add Members Menu<<----------");
Console.WriteLine();
String cont = "y";
int x = objclassmembers.Count();
while (cont == "y")
{
Console.WriteLine("Number member:" + x);
Console.WriteLine("Enter the MembershipNumber(ID):");
int MembershipNumber =Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the firstName:");
string firstName = Console.ReadLine();
Console.WriteLine("Enter the lastName:");
string lastName = Console.ReadLine();
Console.WriteLine("Enter the FatherName:");
string FatherName = Console.ReadLine();
Console.WriteLine("Enter the BirthDate:");
string BirthDate = Console.ReadLine();
classmembers cust1 = new classmembers(MembershipNumber, firstName, lastName, FatherName, BirthDate);
objclassmembers.Add(x, cust1);
Console.WriteLine("-----------------------------------------");
Console.WriteLine("Do you want to continue add members(Y/N):");
cont = Console.ReadLine();
x += 1;
Console.WriteLine("-----------------------------------------");
}
objProgram.BaseMenu();
}
//start method print
public void print()
{
//Console.Clear();
Console.WriteLine("---------->>Add Members Menu<<----------");
Console.WriteLine();
Console.WriteLine(objclassmembers.Count());
foreach (KeyValuePair<int, classmembers> n in objclassmembers)
{
Console.WriteLine("MembershipNumber: {0}, FirstName: {1},LastName:{2},FatherName:{3},BirthDate:{4}",
n.Value.pMembershipNumber,
n.Value.pFirstName,
n.Value.pLastName,
n.Value.pFatherName,
n.Value.pBirthDate);
Console.WriteLine("____________________________________________________________________________");
}
Console.WriteLine("Count members:" + objclassmembers.Count);
Console.WriteLine("Do you want to return to Menu:(Y/N)");
String x=Console.ReadLine();
if (x == "y")
{
objProgram.BaseMenu();
}
else
{
Console.WriteLine("the program is ended");
}
}
//start method remove
public void remove()
{
Console.WriteLine("---------->>Remove Members Menu<<----------");
Console.WriteLine();
String cont = "y";
while (cont == "y")
{
Console.WriteLine("Plz enter the number member for remove:");
int x = Convert.ToInt32(Console.ReadLine());
objclassmembers.Remove(x);
Console.WriteLine("-----------------------------------------");
Console.WriteLine("Do you want to continue add members(Y/N):");
cont = Console.ReadLine();
x += 1;
Console.WriteLine("-----------------------------------------");
}
objProgram.BaseMenu();
}
//start method search
public void search()
{
Console.WriteLine("---------->>Remove Search Menu<<----------");
Console.WriteLine();
Console.WriteLine("Plz enter the number member:");
int x = Convert.ToInt32(Console.ReadLine());
int item = Convert.ToInt32(Console.ReadLine());
foreach (KeyValuePair<int, classmembers> custKeyVal in objclassmembers)
{
if (custKeyVal.Value.pMembershipNumber == item)
{
Console.WriteLine("MembershipNumber: {0}, FirstName: {1},LastName:{2},FatherName:{3},BirthDate:{4}",
custKeyVal.Key,
custKeyVal.Value.pFirstName,
custKeyVal.Value.pLastName,
custKeyVal.Value.pFatherName,
custKeyVal.Value.pBirthDate);
}
else
{
Console.WriteLine("not find item");
}
}
}
}
}
code class main :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public void BaseMenu()
{
Members objMembers = new Members();
Console.Clear();
Console.WriteLine("---------->>Library<<----------");
Console.WriteLine();
Console.WriteLine("1-add");
Console.WriteLine();
Console.WriteLine("2-remove");
Console.WriteLine();
Console.WriteLine("3-print");
Console.WriteLine();
Console.WriteLine("4-Exit");
Console.WriteLine();
Console.WriteLine("-------------------------------");
Console.WriteLine("Enter choice numbers:");
int x = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("-------------------------------");
switch (x)
{
case 1:
objMembers.add();
break;
case 2:
Console.Clear();
objMembers.remove();
break;
case 3:
Console.Clear();
objMembers.print();
break;
case 4:
Console.Clear();
//Console.WriteLine("Are you exit program(Y/N)");
Console.Beep();
break;
default:
Console.WriteLine("Incorrect Choice");
break;
}
}
//----------------------End All Menu Programe
static void Main(string[] args)
{
Program objProgram = new Program();
objProgram.BaseMenu();
}
}
}
changed to the beta 1.0 just now and fixed all my changePage to be e.g.:
$.mobile.changePage($("#pgLogin"), {transition: "slide",reverse: false,changeHash: false});
as per http://jquerymobile.com/demos/1.0b1/#/demos/1.0b1/docs/api/methods.html
And now I cannot open any of the pages:
jquery.mobile.js:2601Uncaught TypeError: Cannot call method 'children' of undefined$.mobile.loadPagejquery.mobile.js:2601$.mobile.changePagejquery.mobile.js:2804(anonymous function)index.js:901f.extend._Deferred.e.resolveWithjquery-1.6.1.min.js:16f.e.extend.readyjquery-1.6.1.min.js:16f.c.addEventListener.zjquery-1.6.1.min.js:16
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span class=objectboxobjectbox-errormessageopened><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hello Everyone:<o:p></o:p></span></font></span>
I have this form
<a href="http://www.fares.gr/tests/well_fares_form/">http://www.fares.gr/tests/well_fares_form/</a>
And i am trying to load the server response to a div in the same page but i get the Permission denied to call method Location.toString
Any ideas?
I've got a button on my page, and when I click it, I get this exception:
"uncaught exception: cannot call methods on button prior to initialization; attempted to call method 'disable'"
$('#start').live('click', function() { alert('disabled'); $('#start').button('disable'); alert('disabled'); }
<div> <a id="start" data-inline="true" href="#" data-role="button" data-theme="b">Start</a> </div>
Any ideas? Given that the page has rendered and I've clicked the button, doesn't that mean its been initialized?
I got an email today that one of my plugins might be a cross-site
scripting/security risk because the plugin uses the Function.call()
method, like so:
$.fn.plugin = function(elem, options, callback) {
callback.call(elem, options);
};
Has anyone heard of or dealt with this problem? If it is a security
risk, wouldn't Function.apply also be an issue?
Thanks,
Luke
I am getting a parsererror in my ajax call; I am always getting into the
error function - I dont know why
My webservice is a coldfusion CFC, and does return XML - HOWEVER, there are
carriage return/linefeeds in it and standard footer html - dont know if this
matters(see below). I only want to parse the <RESPONSE> node
Here is my call:
function updateRules()
{
jQuery.ajax({
type: "post",
url:
"http://sacdsm02311.homeq.local/Aurora_MX/WebServices/EliminationRules.cfc",
data: "method=getEliminationRules",
dataType: "xml",
success: function(txt)
{
var t = jQuery("field", j);
jQuery('#prodiv').html(txt);
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
jQuery('#prodiv').html(textStatus);
}
});
Here is the XML packet being returned from the webservice
<?xml version="1.0" encoding="UTF-8"?>
<RESPONSE>
<XML_RESPONSE>1</XML_RESPONSE>
<ORDER_STATUS>1</ORDER_STATUS>
<REASON_CODE>SUCCESS</REASON_CODE>
<PAYLOAD><wddxPacket version="1.0"><header/><data><recordset
fieldNames="RULE,RULETYPE_CD,DESCRIPTION" rowCount="3"
type="coldfusion.sql.QueryTable"><field
name="RULE"><string>a</string><string>b</string><string>c</string></field><field
name="RULETYPE_CD"><number>1.0</number><number>1.0</number><number>1.0</number></field><field
name="DESCRIPTION"><string>rule1</string><string>rule1</string><string>rule1</string></field></recordset></data></wddxPacket></PAYLOAD>
</RESPONSE>
<hr>
<div class="normal"> Connection Status:
Session.WebClient is not defined.
JRun Server Instance: sacdsm02311-cfmx-1
Server Name: SACDSM02311
</div>
--
View this message in context: http://www.nabble.com/jquery-ajax-call-parsererror-tp15550839s27240p15550839.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Hi, I have just started using JQuery. And so far, I have gotten some
problems with adding events in the loading stage to a button.
The following is my code
<head>
<script src='js/jquery.min.js'></script>
<script type='text/javascript'>
$(function(){
$("#msg_button")[0].addEventListener('click',show_msg,false)
});
function show_msg()
{
alert("Nice to show you this")
}
</script>
</head>
<body>
<div id='msg'></div>
<button id='msg_button' name='msg_button' >Show Message</button>
</body>
So Here are my problems
Problem 1
$("#msg_button")[0].addEventListener('click',show_msg,false) doesn't
work in IE. It give me an error message saying that "This object
doesn't support the property or method ". I think I know the reason
for this. But I thought addEventListener method should be cross
platform in Jquery.
Problem 2
When I change $("#msg_button")[0] to $("#msg_button") instead, and it
gives me an error in both IE and Firefox saying "$
("#msg_button").addEventListener is not a function". After a deeper
inspection, I found out that $("#msg_button") only returns an Object
object , where $("#msg_button")[0] returns object HTMLButtonElement
which is identical to what document.getElementById returns. Should $
("#msg_button") return a proper object like Button, Link and so on
instead of a general Object? And also I am not sure if Javacript
support dereferencing as Java does.
So I come up a solution :
I put
function addEvent(obj,type,fn) {
if (obj.addEventListener) //in Mozila
{
obj.addEventListener(type,fn,false);
return true;
}
else // in IE
{
obj.attachEvent("on"+type,fn)
}
}
in my javascript block.
and replace $("#msg_button").addEventListener('click',show_msg,false)
with addEvent($("#msg_button")[0],'click',show_msg). And everything
work fine.
But my concern is this I though I can do all these common things in
Jquery way without introducing any of my self-defined functions!!!
Please Open my eyes to Jquery World.
Hi,
I am writing an application that converts an ajax xml response into
html using client side xslt transformation. The transformation is
achieved using following snippet, which works fine -
transform:function(xml){
if (window.XSLTProcessor){
var xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(Xmer.xsldoc);
var outputXHTML = xsltProcessor.transformToFragment(Xmer.makeXml
(xml), document);
document.getElementById('tree').appendChild(outputXHTML.cloneNode
(true));
}
else if(window.ActiveXObject){ //Internet Explorer
var d=Xmer.makeXml(xml);
var outputXHTML = (d).transformNode(Xmer.xsldoc);
document.getElementById('tree').innerHTML=outputXHTML;
}
}
But problem is encountered in FF when i try to process the inserted
tags using jquery's find method. I am trying to fetch all the divs
with a specific class name that were inserted by the above code using
following -
var d=$document.find('div.pointer');
alert (d.length);
but the above alert always returns "0" length. The same code works
fine in IE. I am using jquery 1.3.2.
I apologize if something along these lines has been discussed earlier
and would appreciate if someone guides me in this.