View unanswered posts | View active topics
|
Page 1 of 1
|
[ 12 posts ] |
|
| Author |
Message |
|
azcn2503
|
Post subject: Firefox is dodgy... |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
This is a basic follow-up on a previous topic I made where I made an image gallery and complained that Firefox does not like to update things simultaneously...
Well, it's really annoying, because sometimes my little workaround doesn't work properly. Here is a piece of example code for you to try out for yourself. Note that I am using Firefox v1.5.0.3:
[code:1:09fbea7d16] function grab(o){ return document.all?document.all[o]:document.getElementById?document.getElementById(o):""; } function changeImage(newSrc){ grab("thePicture").src=newSrc; grab("thePicture").alt=newSrc; } [/code:1:09fbea7d16]
So, if you try and update the image with the id "thePicture", it updates only the src attribute of that image... but you click it again and it updates the alt of that image. I'm not quite sure why it does it. Originally, I thought that putting a timeout in there would do the job, and specifying the type of function I would like, where type 1 would update the src, and type 2 would update the alt. Here is an example:
[code:1:09fbea7d16] function grab(o){ return document.all?document.all[o]:document.getElementById?document.getElementById(o):""; } function changeImg(newSrc,type){ type=!type?1:type; switch(type){ case 1: grab("thePicture").src=newSrc; setTimeout("changeImg('"+newSrc+"',2)",10); break; case 2: grab("thePicture").alt=newSrc; break; } } [/code:1:09fbea7d16]
Still doesn't work, in fact, it does exactly the same thing.
Do you think that I should submit this problem to the Mozilla support people and see what they come back with?
_________________ Follow your heart and live the dream <3
|
|
| Wed May 24, 2006 7:12 am |
|
 |
|
DHR-107
|
Post subject: |
|
Joined: Mon Sep 12, 2005 1:36 pm Posts: 5034
Karma: 8
Location: Coruscant
Steam Login Name: rct2100
|
|
Yes. Unless conn can up with a cheeky fix. But thats unlikely! Tell them ull return to IE unless they sort it. thatll get them right to it!
_________________
Steam ID: rct2100 360 Gamertag: DHR107 Contact me for Wii/DS Friend codes Resident Scrooge/Grinch 
|
|
| Wed May 24, 2006 8:40 pm |
|
 |
|
azcn2503
|
Post subject: |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
Heh, it's doubtful I'd ever use IE again for my browsing, I use Firefox at work too, even though we're not really supposed to.
_________________ Follow your heart and live the dream <3
|
|
| Wed May 24, 2006 8:53 pm |
|
 |
|
Skillers
|
Post subject: |
|
Joined: Mon Sep 12, 2005 6:48 am Posts: 23428
Karma: 11
Location: This forum.
Steam Login Name: Skillers1990
|
|
| Wed May 24, 2006 9:20 pm |
|
 |
|
azcn2503
|
Post subject: |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
I've submitted this to the MozillaZine forums in the Firefox Bugs section. You should be able to view this new topic by following the link below:
http://forums.mozillazine.org/viewtopic.php?p=2280941#2280941
_________________ Follow your heart and live the dream <3
|
|
| Wed May 24, 2006 9:56 pm |
|
 |
|
azcn2503
|
Post subject: |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
Fixed, the guy at the forums said if I simply put the alt update before the src update, it works correctly. And it does.
_________________ Follow your heart and live the dream <3
|
|
| Wed May 24, 2006 11:46 pm |
|
 |
|
Skillers
|
Post subject: |
|
Joined: Mon Sep 12, 2005 6:48 am Posts: 23428
Karma: 11
Location: This forum.
Steam Login Name: Skillers1990
|
|
| Thu May 25, 2006 9:19 am |
|
 |
|
azcn2503
|
Post subject: |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
Yes
*Embarrassed*
_________________ Follow your heart and live the dream <3
|
|
| Thu May 25, 2006 11:31 am |
|
 |
|
Skillers
|
Post subject: |
|
Joined: Mon Sep 12, 2005 6:48 am Posts: 23428
Karma: 11
Location: This forum.
Steam Login Name: Skillers1990
|
|
| Thu May 25, 2006 6:33 pm |
|
 |
|
DHR-107
|
Post subject: |
|
Joined: Mon Sep 12, 2005 1:36 pm Posts: 5034
Karma: 8
Location: Coruscant
Steam Login Name: rct2100
|
|
Excpet some of us make more than others......
_________________
Steam ID: rct2100 360 Gamertag: DHR107 Contact me for Wii/DS Friend codes Resident Scrooge/Grinch 
|
|
| Thu May 25, 2006 8:11 pm |
|
 |
|
Skillers
|
Post subject: |
|
Joined: Mon Sep 12, 2005 6:48 am Posts: 23428
Karma: 11
Location: This forum.
Steam Login Name: Skillers1990
|
|
| Thu May 25, 2006 8:17 pm |
|
 |
|
azcn2503
|
Post subject: |
|
Joined: Sun Oct 16, 2005 9:42 am Posts: 8798
Karma: 17
Location: Imagine in your mind a posh country club
Steam Login Name: azcn2503
|
|
Hey, this is still annoying me... why would it want to do it a certain way around? It doesn't make much sense. I haven't tried this in the latest Firefox 2 beta, but will try when I get home.
_________________ Follow your heart and live the dream <3
|
|
| Mon Jul 17, 2006 9:41 am |
|
 |
|
Page 1 of 1
|
[ 12 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|