Page 1 of 1

[RESOLVED] Why this script works (when blocked)?

Posted: Sun Mar 11, 2012 8:55 am
by Guest
Hello,

I'm wondering, once in a while I see some scripted actions on certain pages that work even when NoScript is NOT allowing any scripts on the page. Usually it's a CSS trick, but sometimes I can't figure it out. Here is an example:

http://www.rei.com/search?query=sweater

Near the top of the search results (list of sweaters) you see two drop-downs:

"Sort by" and "Items per page"

Both of these will reload the page after the value of the drop-down has changed. This is a standard JavaScript thing, but why does it work?

I tried extracting their source for just the form and drop-down into a test file, but it doesn't work that way (more as I'd expect). That makes me think it really is a CSS trick, but I loaded up their CSS pages and I don't see anything.

Can someone tell me why their dropdowns work with NoScript blocking enabled?resol

Re: Why this script works (when blocked)?

Posted: Sun Mar 11, 2012 10:45 am
by dhouwn
It's the "attempt to fix JavaScript links" feature of NoScript.

Re: Why this script works (when blocked)?

Posted: Sun Mar 11, 2012 8:10 pm
by Guest
OK thank you. Can I ask where is this setting in the options?

Also, my test page with 99% the same code didn't work (blocked by noscript) so what could be the difference? If I want to make a webpage that has a feature like this that works even under a NoScript block, what should I do?

Re: Why this script works (when blocked)?

Posted: Sun Mar 11, 2012 10:17 pm
by Giorgio Maone
Guest wrote:OK thank you. Can I ask where is this setting in the options?
NoScript Options|Advanced|Untrusted (edited by Tom T.'s correction)
Guest wrote:If I want to make a webpage that has a feature like this that works even under a NoScript block, what should I do?
Generic "features" cannot be "fixed", only JavaScript links which are used as general purpose ones, i.e. which contain a navigable URL, are turned into regular ones.

Re: Why this script works (when blocked)?

Posted: Mon Mar 12, 2012 9:32 am
by Tom T.
Giorgio Maone wrote:
Guest wrote:OK thank you. Can I ask where is this setting in the options?
NoScript Options|Untrusted
Should that be NoScript Options | Advanced | Untrusted ?

Re: Why this script works (when blocked)?

Posted: Mon Mar 12, 2012 4:06 pm
by Guest
Guest wrote:If I want to make a webpage that has a feature like this that works even under a NoScript block, what should I do?
Generic "features" cannot be "fixed", only JavaScript links which are used as general purpose ones, i.e. which contain a navigable URL, are turned into regular ones.[/quote]

Looks like my test page didn't work because the links in the javascript were relative (eg. "test.html" instead of "/test.html"). Making the links absolute seems to have fixed it.

Thanks for your assistance.