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
SuckerPunched
Dec 20, 2006

Flobbster posted:

Err, I think you misread my question. I'm not looking for a JS interpreter (in fact BIRT comes with Rhino for doing its reports), I'm looking for a comprehensive reference that talks about advanced JavaScript feature more in terms of a programming language in its own right and less as a web development add-on.

Douglas Crockford's books are pretty good for this. His latest, java script: The Good Parts is a great resource and is probably along the lines of what you're looking for. Take a look through the Table of Contents.

Adbot
ADBOT LOVES YOU

SuckerPunched
Dec 20, 2006

Kekekela posted:

Start by resolving your javascript errors. For one, I don't think document.LottoFrm.txtcount will work, you can give the text box an id and call document.getElementById('txtcount') instead. (The latest version of firefox requires you to go to Tools>ErrorConsole to see the errors, not sure about IE et al)

To add to this, you could also install the Firebug extension to get even better Javascript debugging if you're using Firefox. If you're not using FF, I suggest you start because debugging Javascript in IE (and, in my opinion, even in Safari, Opera, or Chrome) is a pain when compared to the power you get from Firebug.

SuckerPunched
Dec 20, 2006

rotor posted:

Microsoft script editor is imho just as good as firebug

It's ok, but I'd argue that it's quite a bit less convenient to use than Firebug, generally speaking. The MSE tends to hang a lot, as well as (unless I've missed out on a better way) having to be re-opened every time there's another error. I admit I don't use it often but I've always had very mixed / slightly negative feelings about debugging with it.

With Firebug, it's all right there in the same window (or popped out, whatever), with the errors cleanly displayed. I dunno, it's just a better overall experience in general, if you ask me.

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!

SuckerPunched
Dec 20, 2006

Ether Frenzy posted:

You can't do a satisfactory image replacement of the submit button (or at least not have it work in IE 6, which we stupidly continue to support - would typically be done with CSS v2) with input type="submit", it has to be input type="button" to use an image as the button.

You could use the <button> tag though, and get what you wanted. <button type="submit">Some Crap</button> should work in IE6, and be styled with CSS just fine as well.

SuckerPunched
Dec 20, 2006

dimebag dinkman posted:

And the value will be the HTML inside it, not the value="..." attribute.

I don't know how to work around the first limitation (sans-javascript), but you could just use CSS to style the button and put whatever relevant value you want in the button tag.

<button type="submit" id="submitter">MyValue</button>

and hide it with CSS text-indent

#submitter { background: transparent url('/path/to/image.png') no-repeat; border: 0; text-indent: -999em; }

SuckerPunched
Dec 20, 2006

Save the whales posted:

Although the text is being indented out of view and the height attribute is fixed, would it still stretch to fit the text? I don't have all the major browsers available to me right now so I'm not sure.

If you give it a width, the button will be that width regardless of how much the text is, because it's indented.

Adbot
ADBOT LOVES YOU

SuckerPunched
Dec 20, 2006

Just use jQuery for it:

code:
$(document).ready(function(){
   $('#feature-header ul#cta').removeClass('hidden').addClass('unhidden');
});

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