CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Other Programming Languages: Javascript:
Cross browser



Apr 30, 2001, 7:13 AM

Post #1 of 3 (48185 views)
Cross browser Can't Post

I have the following code:


<script language="JavaScript" type="text/javascript">




Is this the right way to do this or can the javascript code be better and maybe shorter?

This will work for IE. But not for Netscape!
How to make it work for both?


Aug 4, 2001, 9:19 AM

Post #2 of 3 (48153 views)
Re: Cross browser [In reply to] Can't Post

First off, do not forget to close the head tag after you close the script. YOu left it out. You may not do this normally and just left it out here, but watch that.

And the opening body tag. I am making sure that you would include those because of what i will tell you next.

Obviously the main part of your JavaScript will go in HEAD tag. This is where you put the main part of the script that you want.

And then in the BODY section, where you want the script to appear, you would type the JAVASCRIPT tag again and reference it to the above script. And then that part has the particulars of what you want that script to do.

I have attached an HTML page that has a simple JavaScript slideshow which I had written about two years ago or so.

If you would like, I could E-mail a zip file with the pictures that i used...or you can change the image names in the image array in the JavaScript...but then you have to make sure that all the images are in the same directory on your harddrive.

Click on attachment and that will show the actual HTML page to show you what it looks like. View the source code obviously to see what I had done. Of course the images will not show up and the script will appear not to function because the images are missing. But this will still show you the general layout =0)

This will show you a general setup for JavaScript. JavaScript is basically browser independent. It runs on both. But as for Netscape...remember, it was the Netscape group that created JavaScript. Keep posting if you need more info, more examples, or more resources. Smile


use CGI;
$a = new pointless CGI();


Aug 5, 2001, 12:09 AM

Post #3 of 3 (48150 views)
Re: Cross browser [In reply to] Can't Post

Could zou mail me at

Thank you.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives