Can't Open MS Project from a drop down link.

J

John Murray

Hi,

I'm setting up a project management website, and having a bit of trouble.

As part of the site, I have been asked to have a javascript dropdown menu
that will open several MS Project (mpp) files. While two of the links work
fine, the others do not, and I have absoloutely no idea why. Any
suggestions would be greately appreciated.

The code I'm working with is:

<form name="Project_Templates">
<blockquote>
<font face="Arial"><select name="menu" style="width: 160mm">
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\ATE_Software_only_Design_Build_by_Boeing_15Sept04.mpp">ATE
Software Only Design Build by Boeing</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\Basic_Project_25Jan2005.mpp">Microsoft
Project Basic Project</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\EquipmentDesignBoeing.mpp">Equipment
Design Build by Boeing</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\EquipmentDoc.mpp">Equipment
Documentation</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\EquipmentSoftwareVendor.mpp">Equipment
or Software Design Build by Vendor
</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\EquipmentSoftwareMakeModelBuy.mpp">Equipment
or Software - Make Model Buy</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\EquipmentSurplus.mpp">Equipment
Surplus</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\MasterProject.mpp">Master
Project</option>
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\ProcessManagement.mpp">Process
Management</option>
</select>
<input type="button"
onClick="location=document.Project_Templates.menu.options[document.Project_Templates.menu.selectedIndex].value;"
value="GO">
</font>
</blockquote>
</form>

Thanks,

John
 
T

Thomas 'PointedEars' Lahn

John said:
I'm setting up a project management website, and having a bit of trouble.

As part of the site, I have been asked to have a javascript dropdown menu
that will open several MS Project (mpp) files. While two of the links
work fine, the others do not, and I have absoloutely no idea why.

"Does not work" is a useless error description. [psf 4.11]
Any suggestions would be greately appreciated.

The code I'm working with is:

Not Valid at all. said:
<form name="Project_Templates">

The `action' attribute value is missing.
<blockquote>

Although that is not generally a syntax error, it is a design error. The
`blockquote' element should not be used merely to indent content. It is
there to mark up quotations. It must not be child of the `form' element
in HTML 4.01 Strict (but is allowed to be in HTML 4.01 Transitional).
Use CSS to format your content, not semantical markup.

<font face="Arial"><select name="menu" style="width: 160mm">

The `font' element is deprecated. For example, what if the font "Arial"
is not available on the viewer's system? And the `font' element must not
contain the `select' element, only inline elements.
<option
value="\\iso-knt-22\equipment\Engineering\Docs\Project_Office\ProjectTemplates\ATE_Software_only_Design_Build_by_Boeing_15Sept04.mpp">ATE
Software Only Design Build by Boeing</option>
<option
[...]
</select>
<input type="button"
onClick="location=document.Project_Templates.menu.options[document.Project_Templates.menu.selectedIndex].value;"

This could be shorter and more efficient:

onClick="var sel = this.form.elements['menu']; location=
sel.options[sel.selectedIndex].value;"

To avoid lengthy lines, or newline within the attribute value, and to
ease maintenance, I would move that code a method and pass `this' when
calling this method.

However, you should consider the following:

1. The `location' property expects a URI (Uniform Resource Identifier)
reference. You are trying to assign UNC (Uniform Naming Convention)
network paths in Windows-only format. Use

file://host/directory/file

instead of

\\host\directory\file

2. A `select' element is not necessarily rendered as a dropdown box.

3. What about users with absent client-side script support? This can be
done so that navigation is possible without client-side scripting, using
`a' elements, and CSS, or CSS DOM scripting, to facilitate the dropdown
effect if supported:

<URL:http://devedge-temp.mozilla.org/viewsource/2003/devedge-redesign-js/index_en.html>

(Note that this is just the archived version that will hopefully get you the
basic idea, the original DevEdge looked better. See Google results for
"CSS menu" and the like for other examples.)


PointedEars
 
J

John Murray

I figured this out and thought I'd post the answer here just incase it came
up again.

The version of MS Project that the files were created in was not completely
compatible with the version of MS Project for Office XP. Re-saving the
files resolved the issue.
 
T

The Magpie

John said:
I figured this out and thought I'd post the answer here just incase it came
up again.

The version of MS Project that the files were created in was not completely
compatible with the version of MS Project for Office XP. Re-saving the
files resolved the issue.
So basically, you worked out that it was **** all to do with Javascript
and thought we'd be interested, what with this being a Javascript
newsgroup and all?

Berk!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top