Firefox vs. Internet Explorer
I have javascript working on IE but not on FF, are there things I should look for inparticular?
Inparticular that is not working is the "onclick function" I call.
Thanks, Regards X
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
There is alot of code in short:
// Javascript
function load(image) {
switch(image) {
case 1:
company.innerHTML="COMPANY";
screenshot.src="screenshot.jpg";
screenshot.alt="SCREENSHOT";
url.href="http://www.comapny.com";
url.innerHTML="COMPANY WEBSITE";
line.innerHTML="Company is Blah Blah Blah";
break;
}
}
//HTML
<h1 id="company"></h1>
<img onclick="load(1)" id="screenshot" />
<a href id="url"></a>
<p id="line"></p>
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
So 'essential' in short that line of code will be interupted by all modern browsers and IE to retrieve the HTML id "company", which will then allow alterations to be preformed?
I attempted this and it still dosent work. Any ideas?
Should I be using a different variable name to id name eg. company > company?
Thankyou, Regards X
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
Ya sorry I was in the process of editing it.
I attempted this and it still dosent work. Any ideas?
Should I be using a different variable name to id name eg. company > company?
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
I will attempt that now, but should we be using $ for variables and functions in javascript I thought that was only for php?
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
Ya I tested your page then applied the logic worked perfectly.
Thankyou very much, helped alot.
On a side note so can I reference all my variables with a $ in javascript without recieving any syntax issues (as it is easier to differiant).
Thanks
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10