Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1080945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:06:13+00:00 2026-05-16T22:06:13+00:00

For the last hour and a half I’ve trace Javascript calls in a Magento

  • 0

For the last hour and a half I’ve trace Javascript calls in a Magento shop I’m building, because I have the strange effect that, when checking out, I can not leave page 2 (shipping address) of the onepage checkout, unless I switch from “send to this address” to “send to another address”.

I’ve traced it down to this piece of javascript code in form.js, residing in Regionupdater.setMarkDisplay (line 254 ff.)

Since I’m a jquery man myself I’m not really in the loop with prototype functionality but I’m assuming .up and .down are practically what jquery does with .parent(s) and .children()?!

elem = $(elem);
var labelElement = elem.up(0).down('label > span.required') ||
                   elem.up(1).down('label > span.required') ||
                   elem.up(0).down('label.required > em') ||
                   elem.up(1).down('label.required > em'); 

elem is the region select field in the form.
I’m assuming it’s trying to find the label for this field (which exists). But both the “elem.up(0)” fragments apparently throw an

[Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"]

I’ve no idea what triggers this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:06:14+00:00Added an answer on May 16, 2026 at 10:06 pm

    You’re basically right about what up and down do. That line of code is picking the first matching element:

    elem = $(elem);
    var labelElement = elem.up(0).down('label > span.required') || // Up to parent, down to first span.required inside a label
                       elem.up(1).down('label > span.required') || // Up to grandparent, down to first span.required inside a label
                       elem.up(0).down('label.required > em') ||   // up to parent, down to first em inside a label.required
                       elem.up(1).down('label.required > em');     // up to grandparent, down to em within a label.required
    

    …where in each case it stops with the first one it finds.

    The error looks like it’s being thrown from a selector engine or something being passed a selector it doesn’t understand. None of those selectors is particularly cutting-edge, so that’s a bit strange. Are you using Prototype 1.7 RC2? Because the current released Prototype still only uses its own built-in selector engine (whereas 1.7 adds pluggable ones).

    Ah! That’s it — look at the ids of the elements in that area. Do any of them have spaces or ‘#’ or ‘:’ in them, that sort of thing? I seem to recall a bug in the Prototype selector engine where it assumes fairly boring IDs… (Why are IDs relevant? Under the covers, the selector engine may use them when processing descendant or child selectors — for instance, when processing down calls…)

    Update This (fixed) bug may relate to this, if you’re using an older version of Prototype you may still be running into it. Definitely worth looking at the IDs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been google-ing around for the answer to this for that last hour
How would I display rows that have a timestamp value within the last hour?
I've been reading about this for the last half hour, and here's what I
I have spent the last hour trying to see what I'm doing wrong, or
I want to find out which tables have been modified in the last hour
Last night I tried to put together something that I have had working since
I have changed several things over the last hour and committed them step by
I've spent the last hour and a half trying to figure out how to
Purpose : Every half-hour I query database to find a post that havn't published
for the last hour I have been trying to figure this out myself but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.