|
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.
|
# ? Jul 8, 2009 19:52 |
|
|
# ? Mar 29, 2024 00:02 |
|
I'm looking to force my zoom level to 100% in IE7 and IE8 on one of my sites, but can not find a way to do this. Is this even possible? If it matters, my IE8 sites all force compatibility mode.
|
# ? Jul 9, 2009 14:45 |
|
Hammerite posted:Full disclosure - I posted this in the Web Design & Development small questions thread, but came to the conclusion that it's really more Javascript and I will be more likely to get help with it here. Hence I'm reposting it. Perhaps make your code > 94? It's possible the ajax return happens when it's false on unload, and since false is not the string 95, you get a background change. This is my pre-coffee first guess, so it's probably wrong. I'll look again in an hour when I wake up. Also thank's for the reminder as to how ugly "plain" ajax code is. I don't miss writing stuff like that at all. /me gives jQuery a hug.
|
# ? Jul 9, 2009 15:50 |
|
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. An input with type="image" will allow you to use an image. An input type="image" works exactly like an input type="submit" except you can now give it an image source.
|
# ? Jul 9, 2009 17:25 |
|
Lumpy posted:Perhaps make your code > 94? It's possible the ajax return happens when it's false on unload, and since false is not the string 95, you get a background change. This is my pre-coffee first guess, so it's probably wrong. I'll look again in an hour when I wake up.
|
# ? Jul 9, 2009 21:39 |
|
Lumpy posted:Perhaps make your code > 94? It's possible the ajax return happens when it's false on unload, and since false is not the string 95, you get a background change. This is my pre-coffee first guess, so it's probably wrong. I'll look again in an hour when I wake up. Thanks for the suggestion, I'll try making this change. Of course it's one of those funny things that since I can't make it happen on demand, there's no way of knowing whether it worked unless several weeks go by with no "false positives".
|
# ? Jul 9, 2009 21:44 |
|
What Lumpy said prompted me to carry out the following test: I loaded up a typical board page, then disconnected my computer from its network connection. I then waited a while to see if the page would change colour; then clicked an arbitrary hyperlink on the page so as to exit. By doing this I was consistently able to cause the background colour change to trigger (always upon clicking the hyperlink). I then changed the code as follows: code:
I then repeated the test after making this change. The background colour no longer changes on exiting the page. I conclude that the change had the desired effect. Thanks both. I am puzzled by one thing; in my test (of the old code) I only saw the colour change on clicking a hyperlink. I had thought what might happen would be that it would change colour anywhere between 0 and 5 seconds after disconnecting my computer, but this is not the case.
|
# ? Jul 9, 2009 22:13 |
I'm running an old javascript menu I had lying around my computer for years. I wanted the script centered, so modified it to include a margin-left and changed its absolute position which works fine in chrome, opera, IE but breaks in firefox which puts the menu on the far left of the screen thoughts? unfortunately, using a div container won't work either
|
|
# ? Jul 12, 2009 17:34 |
|
FedEx posted:I'm running an old javascript menu I had lying around my computer for years. I wanted the script centered, so modified it to include a margin-left and changed its absolute position which works fine in chrome, opera, IE but breaks in firefox which puts the menu on the far left of the screen Guys, something is wrong with my car engine, it's sort of making this noise... I put a clamp on that thing, but now the other hose is lose: what should I do to fix it?
|
# ? Jul 12, 2009 21:00 |
|
Hammerite posted:
If you are disconnected form the internet, you cannot get a "good" ready state change event from your function, so the checking code will never run.
|
# ? Jul 12, 2009 21:02 |
Lumpy posted:Guys, something is wrong with my car engine, it's sort of making this noise... I put a clamp on that thing, but now the other hose is lose: what should I do to fix it? hahahahaha but it has cross browser opacity.
|
|
# ? Jul 13, 2009 00:50 |
|
I think Lumpy means to suggest you treat us to a glimpse at the source code.
|
# ? Jul 13, 2009 00:56 |
Nigglypuff posted:I think Lumpy means to suggest you treat us to a glimpse at the source code. wait, for real? I was going to do that originally but its like 1600 lines >_> I already wrote an alternative PEACE OUT
|
|
# ? Jul 13, 2009 03:07 |
|
FedEx posted:wait, for real? If your JS menu was 1600 lines then it's drat good you wrote an alternative
|
# ? Jul 13, 2009 05:30 |
|
ronin109 posted:An input with type="image" will allow you to use an image. An input type="image" works exactly like an input type="submit" except you can now give it an image source. quote: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. dimebag dinkman fucked around with this message at 17:06 on Jul 14, 2009 |
# ? Jul 14, 2009 17:03 |
|
There's a javascript workaround for multiple buttons in IE6 http://www.kopz.org/public/documents/css/multiple_buttons_ie_workaround.html
|
# ? Jul 14, 2009 17:23 |
|
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; }
|
# ? Jul 14, 2009 18:21 |
|
dimebag dinkman posted:Not exactly. When you click on an image submit with name "myimagesubmit", it is apparently optional for the browser to submit the myimagesubmit=value key/value pair in the form data, and instead only send the mouse click co-ordinates myimagesubmit.x and myimagesubmit.y. Older versions of IE choose to take the option of not doing so. What Ether Frenzy needed was a button that could (a) contain an image, and (b) submit it's parent form (without the use of JS). An input with type="image" does that. Whether the input sends x/y coordinates or a name/value pair is of no significance in this case.
|
# ? Jul 14, 2009 21:22 |
|
ronin109 posted:What Ether Frenzy needed was a button that could (a) contain an image, and (b) submit it's parent form (without the use of JS). Doesn't this have the same effect? (except not having the user see "mysubmit.x=20&mysubmit.y=30") code:
|
# ? Jul 15, 2009 09:46 |
|
Save the whales posted:Doesn't this have the same effect? (except not having the user see "mysubmit.x=20&mysubmit.y=30") For some reason, I had it in my head that this wouldn't work in IE6, but, your solution works exactly as expected. This is definitely how it should be done. Your solution has the added benefit of keeping the page-formatting logic in the CSS, where it belongs, unlike type="image" where you are forced to put the image src in a tag attribute. Just one teeny-tiny addition to your solution would be the inclusion of "background-color: transparent".
|
# ? Jul 15, 2009 18:05 |
|
I am trying to write some animation javascript code that will make it look like there was suddenly gravity and every element is falling to the bottom of the page. I have no idea where to start with this. I've tried using prototype's absolutize on all of the elements in the body of the page, but that doesn't work. Can anyone give me any advice on where to start? I have no idea of 2D physics but I don't really know where to learn anything. Thanks.
|
# ? Jul 17, 2009 17:26 |
|
You might start by viewing the source of this.
|
# ? Jul 17, 2009 21:02 |
|
Also, Someone ported the Box2D physics engine to JavaScript.
|
# ? Jul 17, 2009 22:27 |
|
How do you detect if the current window has focus?
|
# ? Jul 21, 2009 16:39 |
|
diadem posted:How do you detect if the current window has focus? Listen for the onFocus event / onBlur and set a flag. Here's a poor example that uses a global variable and the not preferred way of doing event handlers to give you the gist: code:
|
# ? Jul 21, 2009 16:54 |
|
Thanks lumpy. I tried a few variations of this, but still have no go. I'll keep at it.
|
# ? Jul 21, 2009 22:08 |
|
ronin109 posted:Just one teeny-tiny addition to your solution would be the inclusion of "background-color: transparent". Ah, right... drat rounded buttons. I must have missed SuckerPunched's post when I made mine because he included that part. His is nice too because it's still usable when they don't load your stylesheet for some reason, although it's missing the width/height attributes on the button. The only thing I'm not sure of is what happens when the height of the image is less than the height of the text. 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.
|
# ? Jul 22, 2009 05:20 |
|
I have a problem with the Google Maps API and displaying KML files. The file is valid KML and displays fine if I put the URL into maps.google.com, however, if I go like this on my own site:code:
code:
|
# ? Jul 24, 2009 11:37 |
|
Nigglypuff posted:You might start by viewing the source of this. savetheclocktower posted:Also, Someone ported the Box2D physics engine to JavaScript. Thank you both! That's exactly what I needed. The google gravity thing actually uses box2d so it's a good practical example.
|
# ? Jul 24, 2009 12:54 |
|
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.
|
# ? Jul 24, 2009 15:36 |
|
Carthag posted:
code:
|
# ? Jul 24, 2009 15:50 |
|
Supervillin posted:should be Geez, I looked at that drat thing so long I went blind. Thanks, it works as advertised now
|
# ? Jul 24, 2009 15:58 |
|
Is there any way I can allow an iframe to call a Javascript function in the parent window if it is on a different host? I'm getting something like "Permission denied for <http://host1> to get property Window.func from <http://host2>." in my console.
|
# ? Aug 1, 2009 12:49 |
|
Fehler posted:Is there any way I can allow an iframe to call a Javascript function in the parent window if it is on a different host? I'm getting something like "Permission denied for <http://host1> to get property Window.func from <http://host2>." in my console. Short answer: no. Long answer: the frames *can* communicate with each other, but cannot directly call functions or retrieve variables.
|
# ? Aug 1, 2009 13:45 |
|
I'm dynamically adding a .js file to the header of a page, the .js file is out of my control so I cannot change it. The last thing it does is register an event listener like so: code:
code:
Am I doing it wrong? I tried googling a bit and there doesn't seem to be a way in DOM to check if any events are registered, so I cannot check if it's actually set up are not, is that correct? edit: NM I'm retarded at javascript. I figured it out (it should be createEvent("HTMLEvents")) Carthag Tuek fucked around with this message at 00:22 on Aug 8, 2009 |
# ? Aug 7, 2009 22:53 |
|
Why not call initializationStuff yourself? No need to muck about with events because the DOM has already been initialized.
|
# ? Aug 8, 2009 11:10 |
|
Mercator posted:Why not call initializationStuff yourself? No need to muck about with events because the DOM has already been initialized. Anyway, this is what I was working on, a greasemonkey script that makes youtube no longer require flash: http://userscripts.org/topics/32424 If someone wants to run with it, go ahead.
|
# ? Aug 8, 2009 11:22 |
I have another small question, I have a javascript element loading on a page. right now it is calculating where the element loads like this:code:
edit: copied the code calculating the y offset by accident! a powerful frown fucked around with this message at 03:36 on Aug 23, 2009 |
|
# ? Aug 23, 2009 03:26 |
|
Can you turn it into a function that you call on load and on resize?
|
# ? Aug 23, 2009 06:02 |
|
|
# ? Mar 29, 2024 00:02 |
that sounded like a good idea but a lot of work so instead of doing that I just added a style to the css and got the JS to call that for its draw function! except it still only takes either the left: or margin-left:, not both. is there any way to fix that?
a powerful frown fucked around with this message at 04:09 on Aug 24, 2009 |
|
# ? Aug 24, 2009 04:04 |