I put together a fairly complex website and it doesn't function on some computers, especially macs. I used the Microsoft script editor to write the pages and used vbscript as the scripting language. I originally thought it might of been because I didnt have the <!DOCTYPE> tag as the first line on all the pages but even after including the tag, no change (actually there was a change. All the text fonts were changed but no functionality change).
Problem 1:
On my first page I use the [SetInterval] function to execute commands at a specific time interval. This works fine on my writing computer and on my test computer. It also works fine on my friend's computer of whom I'm writing the site for. Another friend has a mac and he can load the page but the event timer doesn't work. Another friend has a PC and again, the timer doesnt start on his computer.
Problem 2:
My second page is my menu page. I used a table to set up my menu buttons. I used the table cells themselves as the buttons rather than adding extra <input> tags. I used CSS to simulate the cells as buttons. Again, the buttons work fine on both my computers and on my first friends computer but not on my other 2 friends' computers. They can load the page but the buttons don't work and the curser doesn't change on their computers when they mouseover the buttons.
On my pages, I use the following script in the [window_onload] function to change the browser size to maximum.
window.moveTo 0, 0
window.resizeTo window.screen.availWidth,window.screen.availHight
Could this be a possible problem?
Any help or insight would be greatly appreciated.

Recommended Answers

All 8 Replies

Member Avatar

The problem is that you used Microsoft Script Editor and VbScript for the whole site! Those are propritary and not well supported scripting systems -- especially on non-Microsoft systems.

I'd recommend using Perl, PHP or JavaScript which are much more widely accepted.

Certainly for client side scripting Javascript is a far better option, on the server side what you use is essentially irrelevant to the client so whatever floats your boat there. These days unless you are writing for a corporate intranet (and even then I would never recommend it) VBScript on the client side is a no-no. Fortunately there are a lot of good sites out there that can help with Javascript, like www.w3schools.com

Yes. Use javascript not VBscript. Most big sites use PHP serverside and Javascript Clientside. It has better cross platform capability.

The client computer must have the script interpreter to execute the script. VBScript is a Microsoft product. So guess where it runs.

Thanks everyone. I am now taking a crash course in javascript. It is similar to vbscript so it shouldn't be too hard. My question now is will javascript function across all platforms?

Prettymuch all yeah. Not every one but its a lot better than any of the alternatives

Hi all. The transition to java script is coming along quite nicely. I'd like to thank you all for steering me in the right direction. I should of done the message board thing long before writing my mega site. Live and learn I guess. I do have one more question. When I run my introduction page through the W3 validator, it tells me that there is no leftmargin or topmargin attribute allowed for the <body> even though it displays correctly on both my computers. I want to avoid using absolute positioning but I don't want the margins. Am I applying the margins to the wrong object?

You should use a CSS style to set margin or padding attributes, the W3C won't like it otherwise, infact, I would personally advise that you do so; for reasons pertaining to better project mangement, quick continuity, reducing code repitition, and 'staying cool'.

On the body; these two properties get a bit mixed together, because the body's margin takes from the same space as it's padding, which isn't normally how margin and padding work.. So, to clear the margins on the left and top completely:

<body style="margin-top:0;margin-left:0;padding-top:0;padding-left:0"/>

or put this in the <html<head>:

<style type="text/css">


or stick it in an external stylesheet and use it everywhere! The possiblities truely are endless.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.