i found the solution.
the problem is that browsers *dont allow cross site ajax*. with *jsonp*
in $.ajax it works.
it would be great to emphasize this in every ajax function doc. it toke
me a few hours of debugging to come to this insight
Cesar Sanz wrote:
try _REQUEST['aa'] and see if is
I came to the same conclusion once I got it working, and found a
better way to alert the user. But, there are other occasions where I
need to set the focus from within a similar callback where it is
useful. So I'm still happy we discussed it.
Thanks!
On Sep 9, 10:33 pm, Mr Speaker wrote:
> I
I think they don't let you hold focus for a reason... I've tried it on
a couple of my forms and it's annoying! I wanna leave it blank and
come back to it damn it! ;)
On Sep 10, 2:27 pm, Mr Speaker wrote:
> It's like tabbing to the next field is NOT the default action - but
> something more intri
Hey! No arguing with John Resig around here ;)
But the script tag thing is a templating solution - so the advantage
is obvious: having to maintain a 10kb+ HTML fragment encoded as a
JavaScript variable (or even comprised of jQuery statements) is not
fun.
I'm not a fan of the script type="text/ht
It's like tabbing to the next field is NOT the default action - but
something more intrinsic/unrelated. So even if you cancel the default
action, it doesn't stop the tab? weird.
I was also thinking that it would be a good idea to plugin-erise this
functionality, so if there's a better way to do i
Thanks! I knew about the validate stuff, it was kind of a quick and
dirty example. But I appreciate your bringing it all to my attention.
The jQuery docs for blus() say "the default action can be prevented
by returning false". Maybe it should be corrected.
Your suggestion of using setTimeout pr
On Sep 10, 9:49 am, Mr Speaker wrote:
> I think it's perfectly valid to have a div inside a script tag (or at
It is never valid markup in an HTML document, a div element can't be a
child of a script element.
> least useful), if a div makes sense to the TYPE you defined for the
> script.
If y
I think the problem is that according to the W3C standards, the blur
event is not cancelable: They don't seem to want the programmer to be
able to mess with a blur...
But also, your validation code is a bit buggy anyway: the "ret"
variable is undefined and the regex you use will only catch the ca
Hello, I've created dynamic table using tablesorter and the sort
function works fine at first. The problem occurs when I want to sort
new data.
To make it clearer here's the flow:
1. Generate data, display on table
2. Sort works fine
3. Remove all data row, generate new data, display on table
4.
hey!!
I know it is a little difficult to understand, but I try to explain
more detailed...
First take a look at this slider:
http://css-tricks.com/examples/AnythingSlider/
Simple slider actually. Though, what I really need is like a
placeholder
or "loader" that always appears (with a short anim
On Sep 9, 7:40 pm, Geoffrey wrote:
> My first question is why are you using a development version of
> Firebug? I copied and pasted the jQuery example into an html file and
> tested it and I get no error in FF 3.5.2 with the current release
> version of Firebug 1.4.2
There was a problem with goo
What's the problem? That code looks perfect... have you looked in
Firebug to see where it's adding/removing the class names?
On (unrelated) issue the code might have is the selector you use is
'#nav li a' which will select all of those second level nav elements
too: red/green/black - if that's not
Just use put a mouseover event on the trigger which shows the menu,
and a mouseout event on the menu itself... like
Start
All Programs
Recent Documents
Upgrade to a Mac
$('#startButton').mouseover(function(){
$('#startMenu').show();
});
$('#startMenu').mouseout(function(){
$(this).hi
I thought that's what alsoResize was for... couldn't you do something
like:
$('#myDiv').resizable({alsoResize: '#myDiv img'});
or something like that? Otherwise, perhaps you could use the resizable
event, and do the resizing yourself:
$('#myDiv').resizable({
resize: function(event, ui) {
I'm having trouble setting the input focus when validating fields in a
form. I have a very simple case below, that validates a field for
white space. If it has white space, it triggers an alert and I'd like
the focus to stay in that field. However, when tabbing, it moves to
the next field regardle
I think it's perfectly valid to have a div inside a script tag (or at
least useful), if a div makes sense to the TYPE you defined for the
script. For example, John Resig uses a script tag with type "text/
html" in his micro-templating solution:
http://ejohn.org/blog/javascript-micro-templating/
I
autocomplete is the place to enter some text based on a list of values.
you may set mustMatch:false, and you'll be able to enter text not in the list.
then, if you set on* on the input field, it may do whatever you want with the
text you entered.
On Wed, Sep 9, 2009 at 20:41, starkos wrote:
I
My first question is why are you using a development version of
Firebug? I copied and pasted the jQuery example into an html file and
tested it and I get no error in FF 3.5.2 with the current release
version of Firebug 1.4.2
Secondly, why are there 2 class declarations in your original input
exam
Please, post some mark-up
- Original Message -
From: "MorningZ"
To: "jQuery (English)"
Sent: Tuesday, September 08, 2009 6:45 AM
Subject: [jQuery] Re: get image size?
"Whatever picture I try, the answer is alsway 272"
You realize of course that your selector is always choosing th
google for the result trigger of autocomplete, and perform an href.location=x
there.
On Thu, Sep 10, 2009 at 02:02, ripcurlksm wrote:
Can anyone offer any suggestion to allow for me to get this to work?
If I type something like "Green" and click on the suggestion, I want it to
go to a page l
Hey,
i want to insert a web address into an input field after i click on a
button, i want jquery to grab the title and the meta attributes of the
website.
Like if i type http://www.jquery.com i want to get "jQuery: The Write
Less, Do More, JavaScript Library" and the meta "jQuery is a fast and
c
You can use array.
var arr = new Array();
arr['Some Text 1'] = 41;
arr['Some Text 2'] = 42;
arr['Some Text 3'] = 43;
arr['Some Text 4'] = 44;
arr['Some Text 5'] = 45;
alert(arr['Some Text 4'])
On Sep 10, 12:43 am, TiGeRWooD wrote:
> Hi,
That code looks fine - so wordpress must be messing it up.
It looks like jQuery is loading fine, else it would never get to the $
('a') line. Perhaps you could try the LIVE event:
$(function() {
$('a').live( "click", (function() {
$('#box').fadeOut();
});
});
Which would add the click ev
Any extra options for the toggle can go where the opacity option is:
{ fx: { opacity: 'toggle', duration: 1000 } }
On Sep 10, 7:27 am, -e-train wrote:
> All -
>
> I have a set of tabs that I have gotten to rotate through via this
> scipt:
>
> $(document).ready(function(){
> $("#tabs")
Can anyone offer any suggestion to allow for me to get this to work?
If I type something like "Green" and click on the suggestion, I want it to
go to a page like page.php?id=1.
If I type something like "Red" and click on the suggestion, I want it to go
to a page like page.php?id=2.
%-|
--
Even jQuery would have to rely upon the browser's display engine so,
if you're talking about IE6, I'd think you'd be out of luck.
On Wed, Sep 9, 2009 at 2:26 PM, M wrote:
>
> No ideas ... ?
function live was what I needed.
But now another question.
it's possible to make a POSTwith AJAX, via a button also created with
AJAX, and store the return in a CONTAINER that does not exist in the
DOM, but must exist when the POST is done?
I.E.
/*Action on a button that still exist in the DOM*/
This happens on the example demo:
http://docs.jquery.com/Plugins/Validation#Example
Firefox 3.5.2
Firebug 1.5X.0a22
All -
I have a set of tabs that I have gotten to rotate through via this
scipt:
$(document).ready(function(){
$("#tabs").tabs({ fx: { opacity: 'toggle' }}).tabs('rotate',
3500);
});
Does anyone know how to still control the fade in the toggle?
where do I put the millisecond coun
I've gotta say, Superfish and Supersubs are wonderful tools. But I've
run into some strangeness in IE7 and 6 regarding Supersubs. Whenever
the text in a Tier 3 menu item is long enough to wrap, the menu items
that wrap appear beneath the Tier 2 BENEATH item they are attached to
in z-index terms.
I've got the same problem on a site I am working on right now. I
tried setting a z-index for sub-submenus in the CSS, but it didn't
have any effect.
On Sep 9, 3:50 pm, theosoft wrote:
> Apparently, in IE7 and below, there is an issue with sub-submenus
> dropping below the submenu. I don't have
Anytime when I click the remove link after selecting one or multiple
items my browser jumps to the main page.
It doesn't happen on _any_ system but only on _some_ systems.
Is there any solutiuon?
System: Vista
Browser: FF 3, FF 3.5, IE 8, Seamonkey
http://picasaweb.google.de/lh/sredir?uname=chr
I would like to add a "Create new..." item to my autocomplete lists to
give users a way to create new items. This item would stick at either
the top of the bottom of the suggestion list and, when selected, fire
a callback where I could display a dialog to collect the information
for the new entry,
Question:
Simple Modal has default height and width values of 200 and 300 pixels
respectively. Is there a way to the modal conform to whatever content
is present. In other words I want the modal to have height and width
equal to the HxW of image modal is applied to ... automatically.
Thoughts?
hello,im still green when it comes to coding and i have a bit of
problem on my hands. i've been searching for some help on this plug-in
for some time now and cant find a good answer or solution, im trying
to run .scrollto to make a horizontal website. the head looks
something like this
Is it possible to align the dropped down nav to the corresponding
parent like it does in the basic mode? Right now the dropped down nav
stays aligned to the left for each 'current' list.
Apparently, in IE7 and below, there is an issue with sub-submenus
dropping below the submenu. I don't have any other issues with z-
indexing anywhere, so I'm not sure what the problem is.
Example of this error here: http://www.ciu.edu/graduate/studyoptions/
Scroll over Graduate School, and then
> If the body of the request contains the form data then the problem is
> on the server; if not, then the problem is on the browser. If the
> problem is on the browser then more digging will be required, but if
> it's on the server then the information about the whole request
> (headers and body)
> If the body of the request contains the form data then the problem is
> on the server; if not, then the problem is on the browser. If the
> problem is on the browser then more digging will be required, but if
> it's on the server then the information about the whole request
> (headers and body)
Worked perfectly! Thanks Eric!
On Sep 9, 2:28 pm, Eric Martin wrote:
> David,
>
> The problem is being caused by the data you are trying to place in the
> modal. You can fix it by wrapping the data in a div before using it in
> the modal:
>
> $(document).ready(function() {
> [snip]
>
David,
The problem is being caused by the data you are trying to place in the
modal. You can fix it by wrapping the data in a div before using it in
the modal:
$(document).ready(function() {
[snip]
$.get("form.cfm", function(data){
// create a modal
Hi saqib,
The live() method doesn't allow for passing custom data to the
handler.
http://docs.jquery.com/Events/live#typefn
There are possible solutions, though. Depending on what you need to
pass, you might be able to do so by using the data() method to store
your values on an element, and then
Hi,
Let's say a "A" page has a in it with id named "container" and a "B"
page is called via ajax...
e.g $("#container").load("B")
In order to load the "B" page, the "A" page has to be already loaded, so as
the page is already loaded it do not reload again
when you call "B" page; this is w
Hi
I have used bind method with data parameter many times
$('#mydiv').bind('click', {val:a},myfunc);
but in live method there is no such thing.
$('#mydiv').live('click', {val:a},myfunc);
Is there a work around to do achieve the task.
try _REQUEST['aa'] and see if is data is not empty
- Original Message -
From: "atur"
To: "jQuery (English)"
Sent: Wednesday, September 09, 2009 3:48 AM
Subject: [jQuery] $.post - post array is empty
Hi,
I stick on a wired ajax problem. The following code works on my local
machine
Well, can you show us some mark-up?
- Original Message -
From: "the intern"
To: "jQuery (English)"
Sent: Tuesday, September 08, 2009 1:54 PM
Subject: [jQuery] Page load question
What I have is a form where people will answer yes or no questions.
What I need is, that when the page
+ 1 a demo page will be great
- Original Message -
From: "MorningZ"
To: "jQuery (English)"
Sent: Tuesday, September 08, 2009 2:51 PM
Subject: [jQuery] Re: New Edit-in-Place Plugin with dynamic selects,
datepicker
Planning on adding a "demo" page anytime soon? I'd like to check
No ideas ... ?
Why in the earth must you have a div inside tags?
- Original Message -
From: "Nick Fitzsimons"
To:
Sent: Wednesday, September 09, 2009 6:55 AM
Subject: [jQuery] Re: HTML code inside script tag, how access to it with
DOM???
2009/9/9 Mariano :
I have an HTML page that looks li
Hi,
I hope someone is familiar with simpleModal. I'm trying to add some
effects to the popup, but keep getting errors when I add my "onOpen"
parameter. Here's my code. Thank!
$(document).ready(function() {
$('#create-user').click(function(e) {
e.pr
It seems like when I load a page into a div like this, the $
(document).ready code in the loaded page doesn't fire:
$("#mydiv").load("/a");
But when I do this, the $(document).ready on /a does fire.
Is this correct?
Thank you, that's quite clear.
On Wed, Sep 9, 2009 at 12:44 PM, Michael Geary wrote:
> .offset() returns an element's left and top relative to the body.
> .position() returns an element's left and top relative to its offsetParent.
>
> The offsetParent of an element is its nearest parent that def
.offset() returns an element's left and top *relative to the body*.
.position() returns an element's left and top *relative to its offsetParent*
.
The offsetParent of an element is its nearest parent that defines a local
coordinate system. For example if you have an element with
position:relative,
I am having the same problem. I am simply trying to store a variable
at this point and still get
$("a") is null
$('a').click(function() {\r\n
$('a').click(function() {
var title = $(this).attr('title');
console.log(title);
});
On Sep 8, 9:46 a
Well, not really - I ended up adding code to explicitly set the "top"
and "left" of my div baseed on the top and left of the clickable
trigger that makes it slide down and up. That was unpleasant to have
to do, but it does actually work now.
By the way - the documentation doesn't do much of a job
> $('form').submit(function(){
> var flage;
> $.post('test.php',function(data){
> if(data.length){
> $('#message').html(data);
> flage = true;
> }
>
Did you ever find a solution to this problem? I ran into the same
issue.
On Sep 3, 4:24 pm, "emmecin...@gmail.com"
wrote:
> The online documentation for "slideDown" and "slideUp" says that only
> the height is affected by those routines. That claim is false: the
> value of "display" is also ch
$('form').submit(function(){
var flage;
$.post('test.php',function(data){
if(data.length){
$('#message').html(data);
flage = true;
}
else{
(jQuery UI Resizable Plugin)
Hi there!
Does anybody have a clue, if it's possible or a workaround existing,
to resize a and the content (here: images)
within without using "alsoResize in combination with a class/id
name".
In other words: Is there a workaround for:
$('DIV').resizable({ handles:
hello,
you should make an additional input for the code, and set a result trigger to
update the code.
as for the data you supply, it should be in the format
'description1|key1\ndesc...'.
search google for good examples.
On Wed, Sep 9, 2009 at 17:43, TiGeRWooD wrote:
Hi,
Is there a way to u
hello friends,
i have done a few improvements to the autocomplete module, to fix problems and
improve functionality:
added selectOnly option to autoselect a result if there's only one. this may
save you a click.
moved the loading indicator to the left side, in case the field is rtl.
require
2009/9/9 RPrager :
> FF3 output:
>
> logcgisCan not access CGI data: Script can only
> be used to decode form results
> There are 0 positional parameters and 0 CGI fields
>
>
> FF2/IE output:
>
> logcgis
> There are 0 positional parameters and 2 CGI fields
> CGI 'F10' equals 'Yes'
> CGI 'F11' eq
It's not possible to tell what's going on without knowing what code is
determining which request parameters are "CGI" parameters and which
aren't. However it seems pretty clear that whatever is doing that is
probably making some bad assumptions about HTTP.
On Wed, Sep 9, 2009 at 10:11 AM, RPrage
Well I tried unchecking "Show XMLHttpRequests" and the problem didn't
go away.
I also tried from a different machine with FF3 but no firebug. It
didn't work on that machine either.
I've been in contact with the back-end developer and he created a
short c program to test this problem.
Here's the
Hi runrunforest,
To elaborate on Benn's explanation, the $.each and $().each() methods
provide two arguments inside the callback you supply. The first is the
index (either an enumerated key for arrays or a string key for
objects). The second is the value (the value associated with the
current key
Thanks Mike, I'll grab the update immediately :)
Cross-referencing this with a jQuery ticket, in case this might also
be resolved within the "css" method as well: http://dev.jquery.com/ticket/5185
On Sep 9, 8:16 am, Mike Alsup wrote:
> > I was able to narrow this down to the BlockUI plugin, and
Hi! Thanks, but it didn't work, because I'm using a plugin to convert
a string of XML to a DOM object. When I wasn't using this plugin I
tried to call data type XML directly, but it didn't work with IE
either...
On Sep 8, 10:06 pm, Steven Yang wrote:
> sorry i may be wrongbut until someone has
Hi,
Is there a way to use
$key => $value
45 => 'some text'
And search in $value (some text) but when I select 'some text', it's
the $key (45) as input value instead 'some text' ?
Thanks in advance.
ps : sorry for my poor english.
Hello,
I managed to post my array by calling toString() javascript method :
$.ajax({
type: "POST",
url: "/addFeature/",
data: {project_name:project_name,
'vertexArray':vertexArray.toString()},
success: function(msg){
Hi,
I want to make a vertical superfish menu, which should be shown after
hovering over some button... when moving the mouse out from the menu
again, the whole menu should disappear. (so a bit like the windows
start menu)
The first part works (showing the menu after hovering over the
button), bu
First, thanks for the Treeview extension. It is great!
I have it running fine, and I have been using the lazy-loading
extension. I need to build my tree using AJAX and add an anchor tag
inside the LI tag so that I can display a dynamic treeview and allow
the user to click on a folder or leaf node
Hi,
First of all, I want to thank you about your excellent Autocomplete
plugin for jQuery.
So, I plan use your component in my open source framework called
XMLNuke. This framework produces XML, so I made some changes in jQuery
Autocomplement plugin to support receive XML data.
Here an Example:
I believe the "jQuery" way to do it would be something like:
$(document).ready( function() {
$('a' /* or '#anchorid' */ ).click( function() {
return information();
});
function information(){
jQuery.blockUI(
{ message: jQuery('#111'),
css: {border: '0px solid #a00',
Here's twp blog posts to help out
http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx
http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspx
Also, just some personal experience:
To get around the MasterPage issue, which sadly rebases
I'm not really sure what you're trying to do here...
if you want a JS variable to persist between pages you'll have to pass it in
a cookie, or as part of a query string and then retrieve it on the load of
the second page. It's probably easier to do this server-side.
Jon
2009/9/9 Matt Wilson
>
I have a page /a that has a line
var aaa = 99;
And I load that page /a into a div on another page. In the other
page, I want access to that variable aaa. I tried this:
$("#adiv").load("/a", function () { console.log(aaa); })
I get an error that aaa is undefined.
What am I doing wrong?
I'm not sure I understand completely, if you mean that the tooltip
doesnt work with elements dynamically generated via load(), then it
could be a binding issue... try binding an alert() and see if that
works. in case it doesn't its because when the event was bound the
elements didn't exist... the
You can't post a javascript object, its gotta be key-value pairs
if the data is coming from a form you can do:
var serial = $('#myform').serialize();
and post the variable serial
if not then as far as I know you gotta convert the object into key-
value pairs some other way!
On Sep 9, 6
critical part of jQuery is using a selector that matches the target
element . You've used $('.ul.sf-menu').superfish() , which is looking
for the ul with class named "sf-menu" which doesn't exist.
http://docs.jquery.com/Selectors
If you want to use the superfish css system you need the "sf-
Thanks again Michael!
I changed that particular line to use eval() and it works just the
same... saved me an external js with 50 lines or so, great stuff! :)
Thanks for the svn link too, I doubt I'll be using it regularly but
always good to know what's cooking!
On Sep 9, 12:57 am, Michael Geary
2009/9/9 Mariano :
>
> I have an HTML page that looks like this:
>
>
>
>
>
> some test
>
>
>
>
> Now I have the will to access to the text inside test div but the code
> $('#test').text();
> doesn't work, matter of fact nothing is returned.
Div is outside the HTML DOM. After creating the div element you have to
append the div into the body.
thanks
Rupak
On Wed, Sep 9, 2009 at 3:38 PM, Mariano wrote:
>
> I have an HTML page that looks like this:
>
>
>
>
>
> some test
>
>
>
use $(window).load. I think it will work
Thanks
Rupak
On Wed, Sep 9, 2009 at 3:13 PM, binarious wrote:
>
> Hey,
> I have an alert(); in a document.ready function. Sometimes the alert
> appears after my image on this page is loaded and sometimes it appears
> before. What can I do, that this java
I have an HTML page that looks like this:
some test
Now I have the will to access to the text inside test div but the code
$('#test').text();
doesn't work, matter of fact nothing is returned.
If my div is dragged outside of script
can anyone answer a couple of questions for me about the carousel
script.
1. how do i show a large image of the "centre" image in the carousel
above it?
2. can i highlight the centre image?
3. can i enlarge the centre image slightly more than the others?
thanks,
regan
Hey,
I have an alert(); in a document.ready function. Sometimes the alert
appears after my image on this page is loaded and sometimes it appears
before. What can I do, that this javascript-part is really executed
AFTER everything is loaded?
Greeting from binarious
Hey.
I have a strange problem with image-offset.
When I open my page by typing url, my $("#image").offset().left is
640px.
But when I go to the exactly same page with a link (
Hello!
I had set up a page with Superfish 1.2.2 a while back, since then it
has been upgraded to the current version. But the complaint is the
menu is not working- no delay, no fade ect.
I am not sure how they went about this upgrade, looks like the jquery
files and superfish files were switched
Hi,
I can not upload an array to the server...
I am using this:
$.post("/addPolyline/", {project_name:project_name,
polyline_coordinates:vertexArray}, function(data){
alert("Done");
});
project_name is a string.
The vertexArray contains coordinates so it could look like this:
[(-11.2323,34.345
Guys, I have a problem with my menu. I am trying to add and remove classes
when clicking on the main menu links. For instance when on load, the 'Home'
is the current tab clicked, but when I click on 'Contact Me' I would like
the class current to be removed from 'Home' and added to 'Contact Me'
inst
I have some simple tooltips on my site that load the content of the
"title" tag into the tooltip. I am currently using this plugin
http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin but I have
tried several others.
They all work fine for static elements, but the main content of my
pages ar
Hi,
I stick on a wired ajax problem. The following code works on my local
machine. But when i replace the post url to an other server the _POST
array is empty. I tried different clients, servers and browsers. $.get
(... works fine.