Getting Next Tag In List, NextSibling Gives Unexpected Results

Apr 21, 2006

Considering the following list how do I get a reference to the ul just below
the li with id products? nextSibling gives me a reference to the #text# node
inside the li tag?

<ul>
<li id="products">products</li>
<ul>
<li id="child">child</li>
<li id="chair">chair</li>
</ul>
</ul>

I want to create several functions to add or remove items from the list.

View 6 Replies


ADVERTISEMENT

JQuery :: Change Event Producing Unexpected Results

Mar 25, 2010

I am trying to set a function to be called on the change event of some textboxes with the classes "vii_year1", "vii_year2", "vii_year3", and "vii_year4".

Here is the code:

$(document).ready(
function() {
for (var i = 1; i <= 4; i++) {
var year = i + '';

[Code].....

View 2 Replies View Related

Multiple Drop Down With Dynamic List (PHP - MySql - AJAX) - Filter The Results Into A List

Aug 2, 2011

I have a table that has parts with multiple characteristics. Part Number, Height, Width, Capacity, Price, Etc. I would like to have a drop downs for all of these values, when a user selects one of these values it will filter the results into a list. Ex. user selects a part that has a Height of 6 and width of 10 it will only list those parts. As I said earlier, I have a script that will give me all the parts, however I am not able to make the onchange list parts with multiple values.

View 9 Replies View Related

JQuery :: Auto-complete List Results Disappers In IE?

Apr 18, 2011

i have a problem with the jquery autocomplete on IE.When i use the page scrollbar the results list disappers.maybe it's a problem on focus.

View 2 Replies View Related

JQuery :: PHP/MySQL - Reorder List, Save Results?

Apr 5, 2011

This is a combination of jQuery and a PHP problem so I'm not 100% certain where to post it. I am working on method to reoder a list that comes from a database. When the lists is displayed, it will be ordered by a "sort" column. The user can drag/drop the list to change the order, and I want the order to update the sort values in the database.I found a script that provides a decent starting point, but I am not getting the results I want.

1: It is able to reorder the columns, and save the results which is good.

2: It is saving the results as "0,1,2,3" rather than reordering the numbers from the "sort" column. (< this is what I need fixed)

EG: Name > Sort
Apple3
Orange 5
Pear 13
Kiwi 105

If I reorder these in the reverse order using the script, I end up with the following in the database.
Apple 3
Orange 2
Pear 1
Kiwi 0

Yet what I want is,
Apple 105
Orange 13
Pear 5
Kiwi 3

how I can get it to work with the existing "sort" values, rather than serializing and starting at 0. Here are the script files I am currently working with for testing.

DATABASE

Code:
CREATE TABLE `menu` (
`id` int(11) NOT NULL auto_increment,[code]....

View 1 Replies View Related

AJAX :: Stopped Working - When A User Begins To Type Their Search, After 3 Characters,script Jumps Into Action And Shows A List Of Results?

Mar 27, 2009

I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.

View 1 Replies View Related

JavaScript In HTML: Unexpected Outputs

Jul 23, 2005

I'm learning/experimenting with some simple JS/html markup, running
an apache daemon and mozilla firefox browser in RH 9.

Let's say I run the following markup with one or more of lines 6-10
commented out:

1 <html>
2 <head>
3 <script type="text/javascript">
4 function showinfo()
5 {
6 width = window.screen.availWidth;
7 document.write("<br>screen width=
");
8 document.write(width);
9 document.write("<br>Date: ");
10 document.write(Date());
11 }
12 </script>
13 </head>
14 <body onload="showinfo()">
15 <p>

My question: is there a simple explanation to account for the 'unexpected'
behaviours below (Runs 1, 3, 5)?

Run 1: nothing in 6-10 commented out; output (expected more):

screen width=

Run 2: line 7 commented out; output (as expected):

1024
Date: Wed Apr 14 2004 20:55:58 GMT-0400 (EDT)

Run 3: lines 7, 9, 10 commented out; output (as expected, but unfinished loading):

1024
[ongoing hourglass indicating loading in progress]

Run 4: lines 7, 10 commented out; output (as expected):

1024

Run 5: lines 7-9 commented out; output (as expected, but unfished loading):

Date: Wed Apr 14 2004 22:46:49 GMT-0400 (EDT)

View 2 Replies View Related

Unexpected Page Shift In Firefox?

Nov 5, 2009

to see the unexpected page shift in action go to http://lawlocaust.net/gamerverse/ while hovering over the banner u can use the arrow keys to navigate the UI and the page will shift in firefox

HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

[code]....

View 6 Replies View Related

Unexpected Symbol In IE7, But Works In FF And Safari?

Jan 28, 2011

I am having a problem with internet explorer 7. I am working on a site that maps google maps to show .gpx files, and it is working fine in IE8, firefox (v2 and 3) and safari. However in IE 7 i am getting the following error when running the following line

Code JavaScript:
$(document).ready(function() { initialize(); $("#player_controls a img").tooltip(); });
Line: 45
Error: Expected Identifier, string or number;

The funny thing is that initialize is a clearly and previously defined function, I had some problems before with IE due to variables being out of scope, so I am afraid this may be something related, but I am not very familiar with IE inner workings so,

View 4 Replies View Related

FF XSL Transform Returning Unexpected Result?

Apr 21, 2010

I'm currently using the code below to style some XML

Code:
var processor = new XSLTProcessor();
processor.importStylesheet(xslDoc);
var xmlDom = processor.transformToDocument(xmlDoc);

[Code]....

View 3 Replies View Related

JQuery :: JSON.parse: Unexpected End Of Data?

Aug 18, 2011

JSON.parse: unexpected end of dataat line var data = JSON.parse(json);Is the syntax correct?the code used is:For the code below i am getting this error :

$(document).ready(function(){ $("#button1").click(function(){
$.post(
'script_1.php',

[code]....

View 1 Replies View Related

Unexpected Result From Date Object Manipulation?

Mar 6, 2009

In the below, I would expect this to return the number of milliseconds since the epoch. Instead, it's generating a massive negative number. I presume I've gone wrong with the set[Blah] methods.

javascript Code:

var date_text = '2009-03-06 12:00:00';
var d_tried = new Date();
d_tried.setYear(parseInt(date_text.substr(0,3)));
d_tried.setMonth(parseInt(date_text.substr(5,6)));
d_tried.setDate(parseInt(date_text.substr(8,9)));

[Code]....

View 3 Replies View Related

Arrays - Uncaught SyntaxError - Unexpected Token

May 22, 2011

I am having some troubles with arrays. I am using Chrome 12 beta.

Here is a brief version of the code I am having trouble with

I do not want to use "array[0][1][n]" because my array has too many items to do that and it is just plain annoying to change the numbers that way.

I get an error on the "var buffers[0][1]=[" line saying: "Uncaught SyntaxError: Unexpected token ["

View 3 Replies View Related

JQuery :: Error In IE: Unexpected Call To Method Or Property

Sep 24, 2009

I'm using jquery-1.3.2.min.js and everything works perfectly in browsers other than Explorer... It's not liking this part:

this.appendChild(E)
function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})} ... }
I get this error:Unexpected call to method or property access. jquery-1.3.2.min.js, line 12 character 2305

View 1 Replies View Related

IE Error - Unexpected Call To Method Or Property Access

Aug 15, 2009

This error ONLY occurs in IE. "Unexpected call to method or property access."
I pinpointed it to this line:
o.appendChild(e);

The full function is:
function aO(d, t, src, p, id ){
alert('aO has begun.');
var o, e, i;
if (!ie){ o = cE('object');o.data = src; }
else { o = cE('embed');o.src = src; } .....

View 3 Replies View Related

JQuery :: Unexpected $(document).ready() Behavior After Load The Page

Oct 7, 2009

I am experiencing unexpected behavior using $(document).ready() on a page where I inject jQuery after the page has loaded and then attach listeners to the ready event. The ready() event is never called using Firefox and Safari however it is called using IE. Is this a jQuery bug? Is it working as designed?

[Code]...

View 13 Replies View Related

JQuery :: ColorPicker Plugin - Error 'Uncaught SyntaxError: Unexpected End Of Input'

Feb 25, 2010

Im trying to use the colorPicker plugin to make a little page.

My code is giving the error 'Uncaught SyntaxError: Unexpected end of input'

<html>

View 1 Replies View Related

JQuery :: Getting "Uncaught SyntaxError: Unexpected Identifier" In A Weird Place?

Oct 30, 2011

my code is:
$(document).ready(function(){
$(".caftor").click(function(){
$(this).hide();
$.ajax({

[Code]...

View 1 Replies View Related

Keep Getting Parse Error : Syntax Error, Unexpected T_STRING In /home/a2460084/public?

Oct 22, 2009

IM NEW AT THIS AND I'M WORKING ON MY FIRST WEBSITE. I USED iWED AND I DON'T UNDERSTAND WHY IT WON'T WORK. WHENEVER I TRY TO OPEN IT IT SAYS: Parse error: syntax error, unexpected T_STRING in /home/a2460084/public_html/beto/index.html on line 1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">[code].....

View 3 Replies View Related

Creation Of Window-style Dialogs - Error "Unexpected End Of Input")

Jul 26, 2011

I have recently been working on a custom gui and am having trouble with a section of my code that handles the creation of window-style dialogs: (i appologise in advance but i had to include the whole code as Google Chrome would not pin point the error and only gives the error "Unexpected end of input")

[Code]...

View 1 Replies View Related

JQuery :: Error: "Uncaught SyntaxError: Unexpected Token <"

Jun 20, 2011

i am trying to get jsonp to work with Cluetip for cross-browser ajax requests and am running into the following error: "Uncaught SyntaxError: Unexpected token <",

[Code]...

View 1 Replies View Related

Unexpected Result When Used Onsubmit="alert(this.action)"

Jan 10, 2009

I have a form which I need submit using ajax. I already got all the needed query from that form, but when I tried get the action address I got [object HTMLInputElement] instead of expected address blah.php.

Here is a quick example to demonstrate this behavior:

Code:

The problem is that I named the button as "action" and this.action is returning the button object instead of the action of the form.

I can't remove the form element with name "action" from that form because of the script that accepts the data, but I need get somehow the form's action (url).

View 3 Replies View Related

JQuery :: Limit If A Value Can Be Selected In A Drop Down List (select) Based On Other List

Jun 9, 2009

I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a "slot" that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.

View 4 Replies View Related

JQuery :: Access The 'a Href' In A List Item In An Unordered List??

Oct 8, 2010

i have a menu and i would like to change the color of the Categories which have subcategories only. In my example the basic categories are: News , Announcements , Contact and Career. Only Announcements and Career categories have subcategories. So i would like those two to turn green. The fact is that the list items include a href ,so i don't know how to access those "a href" combined with "this".

<ul id="my_menu">
<li id="id0"><a href="#" style="text-decoration:none">News</a></li>
<li id="id1"><a href="#" style="text-decoration:none">Announcements</a>
<ul>

[Code].....

View 3 Replies View Related

JQuery :: Simple Expand/collapse List : Big Gap Of Space After The List?

Jun 2, 2010

I have been trying to make an expand/collapse (essentially accordion) list. So far, everything works and looks fine in Firefox, Safari, and Chrome, but in IE8, the page height is static when it loads, with a page height being as if all headers in the list were expanded. The expand/collapse functionality works,but as you can imagine, there is this big gap of space after the list.

The html markup uses <h2> tags for the always-visible header portion and a <div> for the expanding/collapsing content. The <div> content contains form elements and everything is enclosed in a form tag.Anyways, here is the jQuery code:

$(document).ready(function() {
$('<img src="plus.png" class="icon" />').prependTo('.header');
$('.content').hide();[code].....

View 5 Replies View Related

Update A Dropdown List Based On The Selection Of A Previous List

Aug 16, 2010

i am writing a script that will update a dropdown list based on the selection of a previous list. the script is run by a PHP script, so instead of posting the PHP, i will post an example client-side script. the hierachy is: category, sub category, brand (but sometimes there exists no sub category and the PHP script queries and adds brands instead) everything works correctly, except for one major issue: you can not change the selection of the third (brand) box this could be an easy fix for some coders, but i am not experienced in javascript and could really use some help. here is an example script, sorry it is so long

[Code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved