Direct links to expanding/contracting sections

Hi Paul,
first of all thank you for all of your assistance, You’ve never answered my question particularly but I keep stumbling upon your posts when I have problems and you’ve been extremely helpful. Secondly, I really hope you can still get back to this thread and assist me further with a similar problem I have because I really haven’t been able to find a solution elsewhere and your suggestions here are the best I’ve come across.

Now, I understand that javascript is not the best tool for this but what i need to do is exactly what you’ve explained and demo-ed, except I can’t use a form with options, I have actual links, separated and spread all over the page, and I need to keep them that way.

That being said I’m having troubles figuring out how to edit your last function [ed: in link to toggle div on opening new page] so it pulls the value or even the child node of the <a> element that is going to trigger a change on an already loaded page. Since the <a> element also requires an href attribute it will inevitably affect the url after clicking on that link and result in something like rather than$id=1. Any suggestions how to go around that?

Also can you please explain a bit more this

if (qs.lang) {
    select.value = qs.lang;

Is lang a keyword because I wasn’t able to find such a keyword and yet changing it to something arbitrary(in the js file and in the url with the new querystring) didn’t work? Also I pulled the files you’d edited as an example and in an attempt to understand what qs actually holds I simply placed an alert after the above code and all it returned was [object Object].

Is what I’m doing completely wrong or is this the output it is supposed to give at this point of the script? Isn’t object supposed to be “lang” and Object to “English”?

Also in your example changing the language in the box doesn’t change the uri in the browser, preventing the user from being able to share the newly updated page - they would have to manually change the request…Is there any way around that?

I understand object-oriented programming and given the fact how image heavy, and complicated with interactivity this website is, I wish I had time to write it in a more appropriate language. For now though I pretty much have 2 weeks to figure out how to create direct links to every expanding/contracting section that is currently built with Javascript, Jquery and CSS and make sure they are all able to be indexed and visited directly from the search results page.
Any suggestion is more than welcome and you’re timely response is extremely valued!

Show us what you currently have, and we’ll see if there’s something that can be done to help.

If the querystring was ?lang=English then the qs object would be the following object:
{lang: ‘English’}

[object Object] is the default string that JavaScript shows for all objects. Dome developer tools can help to expose more of the internals of such objects.

There is indeed - the easiest way being to navigate to a new page with the updated language as a part of the filename or the querystring.

here’s what I’m working on. Apologies for the ugly code and the insane amount of content in the hidden divs( it will be migrated to an XML file in the very near future) also it will be viewed in IE only and it’s not tested in other browsers.

So how can I create a link that leads directly to let’s say step 4 of ip download instructions?