Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
RunningBuffet
Oct 25, 2007

I'm asking this question for a friend who's trying to use javascript to run an experiment which gathers data through people going through the test. It's mainly on the whole signal to noise ratio testing, seeing how quickly people learn patterns and such.

I'm going to admit knowing gently caress all about javascript right here, but I figure the question is general enough that I can explain it well enough. I'm this close to just scrapping the javascript in general and rewriting it myself in some other programming language, but I figure that if I could find something, it would save a few hours of work.

See, in this experiment, reaction time is important, but there seems to be a variable amount of lag due to IE (or so he claims) trying to run and do things in the background, and FireFox is worse about it, so it throws off the reaction times recorded from the experiment.

What I'm curious as he is too is if there's a way to run javascript outside of a browser in some standalone format? Like a Java applet or somesuch? Basically just.. something that'll spawn a window that isn't dependent on a browser or something like that. He was pretty new to Javascript as well, so he wasn't sure what to use either, and again, I know nothing about Javascript, other than that it's used in websites.

I've looked around but I haven't found anything that seems to work well, so I figured I'd let myself look :downs: here and ask.

Adbot
ADBOT LOVES YOU

Blackout
Jun 29, 2005

I am a deathdealer.
Hi guys, quick question for you. I've got a whole bunch of xml files which use a stylesheet to be displayed as HTML. The files are organized by folder on my computer, so that the structure looks something like this:

Main Folder
--Folder A
----1.xml
----2.xml
----3.xml
--Folder B
----4.xml
----5.xml
--Folder C
----6.xml
----7.xml

The number of files in each folder as well as the number of folders themselves can change, so I'd like to try and dynamically build a link tree. Using javascript to create the tree and the links is easy enough, but I'm stuck trying to figure out how to grab the names of these files/folders. I've found a bunch of stuff about the Scripting.FileSystemObject ActiveX object, but it seems to be pretty useless because of the security constraints and the fact that Firefox doesn't seem to support it. Do any of you know of any other methods I could use to list all of the files and folders residing under the Main Folder?

Thanks in advance!

Blackout fucked around with this message at 23:40 on May 6, 2009

Supervillin
Feb 6, 2005

Pillbug

Crysinth posted:

See, in this experiment, reaction time is important, but there seems to be a variable amount of lag due to IE (or so he claims) trying to run and do things in the background, and FireFox is worse about it, so it throws off the reaction times recorded from the experiment.

Pretty sure any given browser's implementation of JavaScript is going to be faster than any given human's reaction time, but I could be wrong.

How is he trying to time stuff? Unless he's somehow blocking the browser with while(true) { ... }, time is time and will be pretty accurate. If nothing else the start time and end time would be "off" by approximately the same amount, if it's just due to browser overhead. Reaction time would be the difference between the two, so still accurate.

Can he just ask that they close other browser windows while testing whatrever he's testing? Or what else is running?

RunningBuffet
Oct 25, 2007

Supervillin posted:

Pretty sure any given browser's implementation of JavaScript is going to be faster than any given human's reaction time, but I could be wrong.

How is he trying to time stuff? Unless he's somehow blocking the browser with while(true) { ... }, time is time and will be pretty accurate. If nothing else the start time and end time would be "off" by approximately the same amount, if it's just due to browser overhead. Reaction time would be the difference between the two, so still accurate.

Can he just ask that they close other browser windows while testing whatrever he's testing? Or what else is running?

I was actually thinking that the overhead would be off by a similar amount and could simply be subtracted, but thanks for reminding me of that.

I'm actually going to try to get a hold of him to find out the exact problem he was having, I just remembered him asking me for help a little while ago. Those are some good ideas though, I'll have to pass them by him, and I'll have a follow-up of some sort when I do talk to him again about it.

jupo
Jun 12, 2007

Time flies like an arrow, fruit flies like a banana.

Blackout posted:

Hi guys, quick question for you. I've got a whole bunch of xml files which use a stylesheet to be displayed as HTML. The files are organized by folder on my computer, so that the structure looks something like this:

Main Folder
--Folder A
----1.xml
----2.xml
----3.xml
--Folder B
----4.xml
----5.xml
--Folder C
----6.xml
----7.xml

The number of files in each folder as well as the number of folders themselves can change, so I'd like to try and dynamically build a link tree. Using javascript to create the tree and the links is easy enough, but I'm stuck trying to figure out how to grab the names of these files/folders. I've found a bunch of stuff about the Scripting.FileSystemObject ActiveX object, but it seems to be pretty useless because of the security constraints and the fact that Firefox doesn't seem to support it. Do any of you know of any other methods I could use to list all of the files and folders residing under the Main Folder?

Thanks in advance!

Gonna assume you're talking about javascript in the browser since you mentioned Firefox. What you're trying to do here is traditionally a server-side thing with languages like PHP or ASP, and not done in the browser. If you're hosting your site on IIS then you are actually able to write ASP code using javascript and the FileSystemObject but this all runs on the server and security constraints aren't relevant here.

If you have no sever-side programming ability and you're a true masochist you could potentially try and do something that uses ajax to parse directory listing pages on the server and build the tree from that, but don't.

Blackout
Jun 29, 2005

I am a deathdealer.

jupo posted:

Gonna assume you're talking about javascript in the browser since you mentioned Firefox. What you're trying to do here is traditionally a server-side thing with languages like PHP or ASP, and not done in the browser. If you're hosting your site on IIS then you are actually able to write ASP code using javascript and the FileSystemObject but this all runs on the server and security constraints aren't relevant here.

If you have no sever-side programming ability and you're a true masochist you could potentially try and do something that uses ajax to parse directory listing pages on the server and build the tree from that, but don't.

Thanks for the advice, jupo! I guess I'll try to use IIS to do some server-side scripting with ASP or something.

diadem
Sep 20, 2003
eet bugz
Backstory
I asked this in the .net megathread but it's really a javascript question.

I've got an updatepanel in an ascx page. Basically this is an asych call that requests new data for a particular DOM. It gets data back from a server and updates the DOm based on that data.

This is using the microsoft ajax framework and is all automatic - Microsoft software communicating to Microsoft software through a Microsoft server.

99 times out of 100, this works fine.

My issue:
1 time out of 100, the DOM gets updated and the window doesn't redraw properly, The user has to maximize the browser or do something else to trigger a redraw. Putting javascript in to force a resize doesn't seem to work - it has to be done by the user.

Sometimes the browser gets refreshed once the user's mouse leaves the window and comes back.

This is a huge pain in the rear end because it looks unprofessional but it's all pre-canned stuff I have no control over.

Request:
I'd very much like to force Internet Explorer to refresh its display using javascript. The DOM changed and I want the view of the page to reflect the change without the user having to jiggle the window around.

Supervillin
Feb 6, 2005

Pillbug

diadem posted:

1 time out of 100, the DOM gets updated and the window doesn't redraw properly

Modifying the DOM again should trigger it, some libraries (I think scriptaculous?) create, append, and remove a text node containing only spaces. I did a little searching and found that adding and removing a class, or even just reassigning a class works.

code:
// this should do it
element.className = element.className;


// if not, this should do it
element.className += "forcedomredraw";
element.className = element.className.replace(/forcedomredraw/, '');


// if not, try this?
var redraw = function(element) {
    var t = document.createTextNode(' ');
    element.appendChild(t);
    setTimeout(function() {
        n.parentNode.removeChild(n);
    }, 0);
};
// changeDomStuff();
redraw(document.getElementById('whatever'));

// if not, kill everyone at Microsoft.

SuckerPunched
Dec 20, 2006

Supervillin posted:

Modifying the DOM again should trigger it, some libraries (I think scriptaculous?) create, append, and remove a text node containing only spaces. I did a little searching and found that adding and removing a class, or even just reassigning a class works.

While I haven't run into this problem in a while, and we came up with some other workaround or solution... this is great to know for future reference. Thanks!

diadem
Sep 20, 2003
eet bugz

Supervillin posted:

Modifying the DOM again should trigger it, some libraries (I think scriptaculous?) create, append, and remove a text node containing only spaces. I did a little searching and found that adding and removing a class, or even just reassigning a class works.

code:
// this should do it
element.className = element.className;


// if not, this should do it
element.className += "forcedomredraw";
element.className = element.className.replace(/forcedomredraw/, '');


// if not, try this?
var redraw = function(element) {
    var t = document.createTextNode(' ');
    element.appendChild(t);
    setTimeout(function() {
        n.parentNode.removeChild(n);
    }, 0);
};
// changeDomStuff();
redraw(document.getElementById('whatever'));

// if not, kill everyone at Microsoft.



Thank you so much. This bug was a huge pain.

For some reason, spaces weren't cutting it, but characters worked fine. A slightly modified version of your last suggestion fixed the issue.

var t = document.createTextNode('temp text');
element.appendChild(t);
setTimeout(function() {
t.parentNode.removeChild(t);
}, 0);

diadem fucked around with this message at 19:34 on May 7, 2009

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are

diadem posted:

Thank you so much. This bug was a huge pain.

For some reason, spaces weren't cutting it, but characters worked fine. A slightly modified version of your last suggestion fixed the issue.

You're just triggering a reflow as far as I can tell, here's a good article about browser reflow.

http://www.stubbornella.org/content/2009/03/27/reflows-repaints-css-performance-making-your-javascript-slow/

sonic bed head
Dec 18, 2003

this is naturual, baby!

diadem posted:

Thank you so much. This bug was a huge pain.

For some reason, spaces weren't cutting it, but characters worked fine. A slightly modified version of your last suggestion fixed the issue.

A non breaking space would work there too  .

Apparently you can't type & nbsp ; here, let me try it in a code block

code:
 

sonic bed head fucked around with this message at 20:38 on May 7, 2009

Blackout
Jun 29, 2005

I am a deathdealer.
Hey, I'm back again with another question!

I managed to solve the problem I was having earlier using ASP (dynamically creating a bunch of links based on files/folders).

Now, I'm trying to create a summary section for each of the groups of files.

I've got an asp file which creates all of my links, and inside that same file, I've got a function that will create html and return it in a string. This asp file is located in one frame, and I have a target frame next to it. I'm trying to figure out a way to create a link that will, rather than displaying another page in the target frame, call this function and display the html that comes back in the target frame.

So basically, when I click link A, I want it to call function B and show what the function returns in frame C.

Hopefully thats not confusing...

Thanks!

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Blackout posted:

Hey, I'm back again with another question!

I managed to solve the problem I was having earlier using ASP (dynamically creating a bunch of links based on files/folders).

Now, I'm trying to create a summary section for each of the groups of files.

I've got an asp file which creates all of my links, and inside that same file, I've got a function that will create html and return it in a string. This asp file is located in one frame, and I have a target frame next to it. I'm trying to figure out a way to create a link that will, rather than displaying another page in the target frame, call this function and display the html that comes back in the target frame.

So basically, when I click link A, I want it to call function B and show what the function returns in frame C.

Hopefully thats not confusing...

Thanks!

code:
<a href="blah.asp" target="framename">my link</a>

aksuur
Nov 9, 2003
nm

aksuur fucked around with this message at 03:45 on May 10, 2009

RunningBuffet
Oct 25, 2007

Supervillin posted:

Pretty sure any given browser's implementation of JavaScript is going to be faster than any given human's reaction time, but I could be wrong.

How is he trying to time stuff? Unless he's somehow blocking the browser with while(true) { ... }, time is time and will be pretty accurate. If nothing else the start time and end time would be "off" by approximately the same amount, if it's just due to browser overhead. Reaction time would be the difference between the two, so still accurate.

Can he just ask that they close other browser windows while testing whatrever he's testing? Or what else is running?

Well, I got a bit more info, so I hope it helps towards actually figuring out a solution.

Hrm, apparently the problem is that he's wanting things down to the millisecond. The thing is that whenever the user clicks, he mentions there being a chance that the browser attempts to ping something and causes a 200 ms delay in the timing mechanism, and that it variably does this, making the data off at random. He's tried different ways of storing the data to avoid the ping possibly affecting it, and tried keeping the browsers he tested (IE and Firefox) in offline mode, but with no luck with that, either. Nothing else running.

He did mention though that even his usage of Javascript might be causing the problem, but I'm not sure.

jupo
Jun 12, 2007

Time flies like an arrow, fruit flies like a banana.

Blackout posted:

Thanks for the advice, jupo! I guess I'll try to use IIS to do some server-side scripting with ASP or something.

No problem! Being able to write javascript on both the client and server is actually a really nice environment to work with.

jupo
Jun 12, 2007

Time flies like an arrow, fruit flies like a banana.

aksuur posted:

Why won't my jquery load work in firefox? It work's in IE just fine.

http://geekforcheap.net/test/account.php

Use test/test for user/pass. When they logout, I'm using a jquery load to bring back the login form. Works fine in IE but not firefox.

code:
	function bringpage(id) {
		$("#page").load("" +id+ "");
	}
The logout link calls a js function, which first sends a GET to a php script to erase the cookie, then calls the bringpage function to load the login page into the page div (everything below the header). If this isn't enough of the code, let me know.

test/test isn't working with FF or IE bro.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Crysinth posted:

Well, I got a bit more info, so I hope it helps towards actually figuring out a solution.

Hrm, apparently the problem is that he's wanting things down to the millisecond. The thing is that whenever the user clicks, he mentions there being a chance that the browser attempts to ping something and causes a 200 ms delay in the timing mechanism, and that it variably does this, making the data off at random. He's tried different ways of storing the data to avoid the ping possibly affecting it, and tried keeping the browsers he tested (IE and Firefox) in offline mode, but with no luck with that, either. Nothing else running.

He did mention though that even his usage of Javascript might be causing the problem, but I'm not sure.

I suspect its your friend's code. Browsers don't randomly ping stuff, and JS can easily deal with ms response times.

Make sure your test doesn't start until after the document and DOM fully load, don't do any synchronus stuff while the test is running, and you'll be fine.

Blackout
Jun 29, 2005

I am a deathdealer.

Lumpy posted:

code:
<a href="blah.asp" target="framename">my link</a>

That would be really easy, but my situation is a bit different. I've got my function in blah.asp, but I want to call it in multiple spots, passing different parameters. The HTML that the function returns is what I want to create a link to, not the asp page itself.

Lets say I have the following page where each xml is a link:

Header A
- 1.xml
- 2.xml
Header B
- 3.xml
- 4.xml

For each of the headers, I want to call this function in blah.asp, which will return html for a page containing a summary of stats for the xmls under the given header. I then want to create a link under the header that, when clicked, will display that HTML in my target frame.

So its a bit more complicated than putting an asp file in a link...

RunningBuffet
Oct 25, 2007

Lumpy posted:

I suspect its your friend's code. Browsers don't randomly ping stuff, and JS can easily deal with ms response times.

Make sure your test doesn't start until after the document and DOM fully load, don't do any synchronus stuff while the test is running, and you'll be fine.

Alright, I'll see what I can do and pass on the info to him. Thanks a lot, the advice is much appreciated.

aksuur
Nov 9, 2003
nm

aksuur fucked around with this message at 03:45 on May 10, 2009

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Blackout posted:

That would be really easy, but my situation is a bit different. I've got my function in blah.asp, but I want to call it in multiple spots, passing different parameters. The HTML that the function returns is what I want to create a link to, not the asp page itself.

Lets say I have the following page where each xml is a link:

Header A
- 1.xml
- 2.xml
Header B
- 3.xml
- 4.xml

For each of the headers, I want to call this function in blah.asp, which will return html for a page containing a summary of stats for the xmls under the given header. I then want to create a link under the header that, when clicked, will display that HTML in my target frame.

So its a bit more complicated than putting an asp file in a link...

So you want a link under each header, then when clicked, runs blah.asp but produces different HTML based on which header link you clicked:

code:
<a href="blah.asp?header=a" target="framename">header A link</a>
...
<a href="blah.asp?header=b" target="framename">header B link</a>
Unless I'm completely missing what you are asking. Sorry for the non-javascript stuff rest of thread :(

Blackout
Jun 29, 2005

I am a deathdealer.

Lumpy posted:

So you want a link under each header, then when clicked, runs blah.asp but produces different HTML based on which header link you clicked:

code:
<a href="blah.asp?header=a" target="framename">header A link</a>
...
<a href="blah.asp?header=b" target="framename">header B link</a>
Unless I'm completely missing what you are asking. Sorry for the non-javascript stuff rest of thread :(

Yeah, I apologize for the de-rail too, but I couldn't find an asp thread!
Thanks alot for the help Lumpy! As you can tell, I'm pretty new to this, so I really appreciate it!

noapparentfunction
Apr 27, 2006

spin that 45 funk.
This is my art site:

no apparent function

The gallery consists of a rectangle sliced up into thumbnails, each one showing the full-sized image with LightBox. What I would like to add now are horizontally-scrolling sets of these small galleries to add more content without compromising the layout of the page. One rectangle could consist of artistic images (paintings, etc), and another could be a few graphic design jobs I've done, for example. Small links reading "art" and "design" on the bottom of the grid could trigger the changes.

I'm familiar with JavaScript and how to upload .js files, but this particular one I have no clue how to implement. Here are some templates and examples I found:

http://demos.flesler.com/jquery/localScroll/
http://demos.flesler.com/jquery/serialScroll/
http://www.hotel-oxford.ro/

My questions:

1) How do I create this long horizontal page without adding scrollbars to the frame cell or exploding the page sideways?
2) How can I make the stationary scroll links target the particular cell of grids?

Thanks. If this is the wrong thread, I'll move it to the Web Design/Development one.

noapparentfunction fucked around with this message at 18:42 on May 11, 2009

Supervillin
Feb 6, 2005

Pillbug

noapparentfunction posted:

1) How do I create this long horizontal page without adding scrollbars to the frame cell or exploding the page sideways?
overflow: hidden in your CSS "turns off" scrollbars, then you would use JS to scroll the div to particular coordinates.

noapparentfunction posted:

2) How can I make the stationary scroll links target the particular cell of grids?

Can't speak specifically for the demos you linked to, but it seemed they all have fixed-size containers, which means they know "where other content is". For example:

code:
<style type="text/css">
    #container {
        position: relative;
        width: 100px;   /* ridiculously small... */
        height: 100px;  /* ... but easy for math */
        overflow: hidden;
    }
    #contents {
        position: absolute;
        width: 300px;
    }
    #contents p {
        width: 100px;
        height: 100px;
        float: left;
    }
</style>
<div id="container">    <!-- the "window" we're looking through -->
    <div id="contents"> <!-- 3x2 grid -->
        <p>blah blah blah</p>
        <p>blah blah blah</p>
        <p>blah blah blah</p>
        <p>blah blah blah</p>
        <p>blah blah blah</p>
        <p>blah blah blah</p>
    </div>
</div>
<div id="navigation">
    <a href="top-left.html">top left</a>
    ...
    <a href="top-right.html">top right</a>
    ...
</div>
Then your script would attach to the links and move stuff accordingly. If you want to go from "top left" to "top right", scroll 200px to the right. "top right" to "bottom right" scroll 100px down.

Edit: Looking at that Hotel Oxford source code, find <div id="contents_wrapper">, that's the container above. All the divs with class "content" are the fixed-size boxes. Not exactly the same implementation, of course, but same concept.

Supervillin fucked around with this message at 04:32 on May 12, 2009

FateFree
Nov 14, 2003

Can anyone write me a relatively easy function? Im looking for a method to be called from a textarea that counts the character length, but updates a div with the total count and changes the class if its over a limit.

So for each example youd see a textarea, when you typed something there would be a div with like 0/100, 50/100, 200/100 as you are typing, but it doesnt restrict if you go over the limit, it just changes the css class so it looks red or something, where its green if its under the limit.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

FateFree posted:

Can anyone write me a relatively easy function? Im looking for a method to be called from a textarea that counts the character length, but updates a div with the total count and changes the class if its over a limit.

So for each example youd see a textarea, when you typed something there would be a div with like 0/100, 50/100, 200/100 as you are typing, but it doesnt restrict if you go over the limit, it just changes the css class so it looks red or something, where its green if its under the limit.

Style and Script

code:
<style>
.aOK { border:5px solid green; }
.ohNoes { border:5px solid red; }
</style>
<script>
var maxChars = 100;
function getCharCount(el)
{
 var charCount = el.value.length;
 el.className = (charCount > maxChars) ? "ohNoes" : "aOK";
 document.getElementById("messageDiv").innerText = charCount + " of " + maxChars;
}
</script>
Your HTML
code:
<textarea id="myTextArea" onKeyUp="getCharCount(this)" class="aOK"></textarea>
<div id="messageDiv"></div>

Lumpy fucked around with this message at 05:56 on May 13, 2009

FateFree
Nov 14, 2003

Thanks alot lumpy I appreciate it. It works fine in IE but not in FF so im looking into that, but otherwise does just what I wanted.

edit: firefox wanted .textContent instead of innerText

FateFree fucked around with this message at 13:25 on May 13, 2009

sonic bed head
Dec 18, 2003

this is naturual, baby!

FateFree posted:

Thanks alot lumpy I appreciate it. It works fine in IE but not in FF so im looking into that, but otherwise does just what I wanted.

edit: firefox wanted .textContent instead of innerText

.value should work in both.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

FateFree posted:

Thanks alot lumpy I appreciate it. It works fine in IE but not in FF so im looking into that, but otherwise does just what I wanted.

edit: firefox wanted .textContent instead of innerText

Huh, th's odd, I tested in Safari and Chrome and it worked, assumed it would in FF. Normally I'm not lazy enough to use innerText and do the whole childNode thing.

FateFree
Nov 14, 2003

sonic bed head posted:

.value should work in both.

Eh that didnt work for either, I think because its not a form field, rather just text.

Supervillin
Feb 6, 2005

Pillbug

FateFree posted:

Eh that didnt work for either, I think because its not a form field, rather just text.

Since it's a DIV, .innerHTML should work everywhere.

noapparentfunction
Apr 27, 2006

spin that 45 funk.

Supervillin posted:

overflow: hidden in your CSS "turns off" scrollbars, then you would use JS to scroll the div to particular coordinates.

Then your script would attach to the links and move stuff accordingly. If you want to go from "top left" to "top right", scroll 200px to the right. "top right" to "bottom right" scroll 100px down.

Edit: Looking at that Hotel Oxford source code, find <div id="contents_wrapper">, that's the container above. All the divs with class "content" are the fixed-size boxes. Not exactly the same implementation, of course, but same concept.

I appreciate the help. I was looking at my code and I realized that I wrote my tables mainly in plain HTML. How do I add overflow: hidden in that case?

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

noapparentfunction posted:

I appreciate the help. I was looking at my code and I realized that I wrote my tables mainly in plain HTML. How do I add overflow: hidden in that case?

Give them ids or classes. Or come up with a CSS selector that targets only the tables you want, e.g.
code:
table td
{
    overflow:hidden;
}

sonic bed head
Dec 18, 2003

this is naturual, baby!

FateFree posted:

Eh that didnt work for either, I think because its not a form field, rather just text.

Oops, I completely misread that code. I thought you were trying to get what was inside the form field.

noapparentfunction
Apr 27, 2006

spin that 45 funk.
I have a relatively simple slider code on this test page I uploaded. It uses jQuery, but my only problem with this premade application is that it uses those rounded browser buttons to operate. Is there a way to convert these to standard links, preferably ones that use images?

http://noapparentfunction.com/test4/

Thanks.

spiritual bypass
Feb 19, 2008

Grimey Drawer

noapparentfunction posted:

I have a relatively simple slider code on this test page I uploaded. It uses jQuery, but my only problem with this premade application is that it uses those rounded browser buttons to operate. Is there a way to convert these to standard links, preferably ones that use images?

http://noapparentfunction.com/test4/

Thanks.

I think you could use an onClick=function() on pretty much any HTML element instead of checking each of the buttons to see if they're clicked.

noapparentfunction
Apr 27, 2006

spin that 45 funk.

royallthefourth posted:

I think you could use an onClick=function() on pretty much any HTML element instead of checking each of the buttons to see if they're clicked.

Thanks for the suggestion. I just tried creating a second set of links at the bottom using onClick containing the same functions as the buttons. They don't seem to work though. Any other ideas?

Adbot
ADBOT LOVES YOU

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

noapparentfunction posted:

Thanks for the suggestion. I just tried creating a second set of links at the bottom using onClick containing the same functions as the buttons. They don't seem to work though. Any other ideas?

Look at the number of quotation marks in this (underlined for emphasis):
pre:
<a href="#" onclick="function() {
                $(".widearea").animate({
                        marginLeft: "0px"
                }, 500">art.</a>
Also, you should be doing the same thing you did with your buttons. Just give them an ID.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply