Page 1 of 1

Firefox vs. IE

Posted: Sat Jun 13, 2009 9:03 am
by gala
I don't understand why it does work in Firefox and does not in IE7
Could you please help?


{$title}

 
 
       
        {section name=at loop=$attrlist}
{$attrlist[at].name}: {eval var=$attrlist[at].key}
{/section}





{section name=ind loop=$image_url_array}

{/section}
{literal}

function repl(img)
  {
  document.item_image.src=img;
  }

{/literal}

Re: Firefox vs. IE

Posted: Sat Jun 13, 2009 1:05 pm
by duclet
Simple, because IE is a terrible browser that cause all kinds of pain toward its users.

Anyway, this should probably allow it to work:

Code: Select all

<a href="javascript: void(0);" onclick="repl('{$image_url_array[ind]}');">

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 5:02 am
by gala
Thank you very much for trying to help me.
It didn't work, unfortunately.

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 3:33 pm
by Duketown
gala,

Can you make screenshots, or at least describe, of what is going wrong?

Duketown

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 10:11 pm
by NaN

Code: Select all

document.item_image.src=img;
What's this?
Shouldn't it be

Code: Select all

document.getElementById("item_image").src = img;
?

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 10:46 pm
by gala
NaN wrote:

Code: Select all

document.item_image.src=img;
What's this?
Shouldn't it be

Code: Select all

document.getElementById("item_image").src = img;
?


I believe this is correct.
What you don't like about this?

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 10:50 pm
by gala
Duketown wrote: gala,

Can you make screenshots, or at least describe, of what is going wrong?

Duketown
I need a very simple thing:
When you click on the thumbnail picture it takes place of the big picture.
Some kind of a slide show.
This is what I'm trying to fix:
http://appleautoexpressinc.com/index.ph ... 000-13-500

It is work in Firefox perfectly!!
But not in IE

I would appreciate you help A LOT!

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 11:05 pm
by gala
Thank you everyone!
The problem is fixed!
Nan was right . For some reasons
document.getElementById("item_image").src = img;.
works in both FF and IE.
To be honest with you I saw that code

function repl(img)
  {
  document.item_image.src=img;
  }

on another site and it was  working.

But anyway...
Thank you everyone. I love you!!  :)

Re: Firefox vs. IE

Posted: Mon Jun 15, 2009 11:25 pm
by nuno


this is my fault,  apparently  _SJG_ not yet release SVN Version that is fixed.

Re: Firefox vs. IE

Posted: Tue Jun 16, 2009 8:46 am
by NaN
gala wrote:
I believe this is correct.
What you don't like about this?
Ah, sorry, I should have told you that the name attribute is missed in the posted HTML code.
That's why I was cunfused about the JS and suggested to use getElementbyId.
If you add the name attribute to your image your code might work in both browsers, too.
But I suggest you to use the ID instead of the name because if you insert your image with TinyMCE on the one hand it is easier to insert than the name (what must be done manually in HTML mode) and on the other hand Tiny will strip out the name attribute from the img tag.

Re: Firefox vs. IE

Posted: Sun Jun 21, 2009 7:29 pm
by Duketown
Frankly I was a bit startled. When I tried to locate what the usage is of the browsers.
Now there are possibly quite a number of (in)dependent sources to get this info.
I consider w3schools.com to be trustfull.
According to them FireFox is leading.
See: http://www.w3schools.com/browsers/browsers_stats.asp.
Although FireFox is nearly at 50% of the browser usage, IE still takes roughly 35% of the market. Maybe that your target group is using that browser mostly. So I would check your own site's statistics and try to get your site up and running at a 100% for those that you like to get in touch with.

Just my 2 cents,

Duketown

[edit]Just after writing this reply, I noticed that the statistics shown by w3school are coming from .... thereselves. There goes my independent resource feeling. I must admit that they are honoust.[/edit]

Re: Firefox vs. IE

Posted: Mon Jun 22, 2009 8:10 am
by replytomk3
Do not trust tech sites. Many more Linux and Firefox people visit those. My relatively small site is 2:1 IE:FF.

Re: Firefox vs. IE

Posted: Wed Jul 15, 2009 4:22 pm
by designhut
NaN wrote:

Code: Select all

document.item_image.src=img;
What's this?
Shouldn't it be

Code: Select all

document.getElementById("item_image").src = img;
?
You solved my major headache with this - thanks sooooo much!  ;D