PHP problem with all browsers except IE

Javascript coding ..

Moderators: macek, egami, gesf

Post Reply
User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Post by gesf » Thu May 13, 2004 10:06 pm

I really don´t know, but it must be some code/browser incompatibility!
Anyway, i think a good start is refering to the elements hierarchically!
You better do it... like:

Code: Select all

// This:
window.document.ad.src

// Instead of:
ads.src

Who knows... maybe this is the problem!
Try it ;)

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Post by gesf » Fri May 14, 2004 6:21 pm

I really don´t know!
There are time, mainly when using frames, we have to use the window Object, but in this case we can omit it!

So use it starting with document property, like:

Code: Select all

// This: 
document.ad.src

// Instead of:
ads.src
// or...
window.document.ad.src

Anyway, make sure you´re using that when refering to every Element!

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

view source

Post by ruturajv » Sun May 16, 2004 7:53 pm

I think... I dont know, you are trying to access the ads array before it is being populated...

please check if its happening.. try to put the function of changing images after populateing the array

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Post by ruturajv » Thu Jun 03, 2004 8:06 pm

Code: Select all

<DIV align=center>
<A id=ADLINK href="#">
<IMG id=AD border=0 src="#">
</A>



try this first...

Code: Select all

<DIV align=center>
<A id="ADLINK" href="#">
<IMG id="AD" border="0" src="#">
</A>


and in Mozilla... !
open the javascript console by typing "javascript:" in the URL
you'll get a much better understanding of the problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests