Firefox vs. IE

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
gala
Forum Members
Forum Members
Posts: 25
Joined: Sat Jun 13, 2009 8:56 am

Firefox vs. IE

Post 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}
User avatar
duclet
Forum Members
Forum Members
Posts: 187
Joined: Fri Jun 23, 2006 12:55 pm

Re: Firefox vs. IE

Post 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]}');">
gala
Forum Members
Forum Members
Posts: 25
Joined: Sat Jun 13, 2009 8:56 am

Re: Firefox vs. IE

Post by gala »

Thank you very much for trying to help me.
It didn't work, unfortunately.
Duketown

Re: Firefox vs. IE

Post by Duketown »

gala,

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

Duketown
NaN

Re: Firefox vs. IE

Post 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;
?
gala
Forum Members
Forum Members
Posts: 25
Joined: Sat Jun 13, 2009 8:56 am

Re: Firefox vs. IE

Post 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?
gala
Forum Members
Forum Members
Posts: 25
Joined: Sat Jun 13, 2009 8:56 am

Re: Firefox vs. IE

Post 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!
gala
Forum Members
Forum Members
Posts: 25
Joined: Sat Jun 13, 2009 8:56 am

Re: Firefox vs. IE

Post 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!!  :)
nuno

Re: Firefox vs. IE

Post by nuno »



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

Re: Firefox vs. IE

Post 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.
Duketown

Re: Firefox vs. IE

Post 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]
Last edited by Duketown on Sun Jun 21, 2009 7:32 pm, edited 1 time in total.
replytomk3

Re: Firefox vs. IE

Post by replytomk3 »

Do not trust tech sites. Many more Linux and Firefox people visit those. My relatively small site is 2:1 IE:FF.
User avatar
designhut
Forum Members
Forum Members
Posts: 71
Joined: Sat Jul 21, 2007 10:31 am
Location: North Devon

Re: Firefox vs. IE

Post 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
Post Reply

Return to “The Lounge”