Does anyone know?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
darkcircuituk
Super Advanced
Super Advanced
Posts: 49
Joined: Sat Aug 21, 2004 2:57 pm

Does anyone know?

Post by darkcircuituk »

I wish to add the page properties to the right click menu (sample 27), how would I go about doing this? I tried using window.properties(); That didn't work, any ideas people? :?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Not sure what you mean here, you got a URL we look at with a bit more info?

Cheers
Andy
darkcircuituk
Super Advanced
Super Advanced
Posts: 49
Joined: Sat Aug 21, 2004 2:57 pm

Slight Problem

Post by darkcircuituk »

One slight problem, the website is internal and therefore cannot be accessed by the outside world, and due to the company's data security policy, I am unable to display a whole page worth of code. But when I return to work tomorrow, I can send u a couple of snippets of the code for specific sections, that you believe would help you to determine the problem. Please let me know which sections of code I should place here.

Thanks
darkcircuituk
Super Advanced
Super Advanced
Posts: 49
Joined: Sat Aug 21, 2004 2:57 pm

Further Explanation

Post by darkcircuituk »

When you right click on a standard website, the standard microsoft right click context menu will be displayed. At the bottom of this menu is "Properties", which displays the properties of the page you right clicked on. I wish to add the "Properties" link to your right click menu, making it possible to access the properties of a page. I believe it should be just a case of using a single command, but I am not sure which one. If you know could you please let me know.

Hope that makes it clearer :)
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Not sure it's possible to fire the properties tab from within a browser.

What you could do is use the menu to display a window containing window properties. Some properties can be returned using JavaScript like lastModified, you could then insert this information into a menu. Here's a list of some properties you could try:

Code: Select all

<script>

output="lastModified: " + document.lastModified+"\n"+
"fileCreatedDate: " + document.fileCreatedDate+"\n"+
"fileModifiedDate: " + document.fileModifiedDate+"\n"+
"fileSize: To be returned from server\n"+
"protocol: " + document.location.protocol+"\n"+
"port: " + document.location.port+"\n"+
"filename: " + document.location.href+"\n"

alert(output)

</script>

-- Andy
darkcircuituk
Super Advanced
Super Advanced
Posts: 49
Joined: Sat Aug 21, 2004 2:57 pm

It Has To Be Possible

Post by darkcircuituk »

It has to be possible, you can access it fine with the standard right click menu!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: It Has To Be Possible

Post by kevin3442 »

Hi,
darkcircuituk wrote:...you can access it fine with the standard right click menu!
True.
darkcircuituk wrote:[so] It has to be possible,
Not necessarily true.

One doesn't necessarily follow from the other. For example, when you right-click on an image, the resulting context menu in IE includes "Save Picture As...", "Print Picture..." etc. But just because that's the case, you wouldn't necessarily expect equivalent javascript methods to be available to do those things. In other words, for you to do exactly as you describe, there would have to be a native javascript method that opens that Properties dialog to which you refer. To my knowledge, there is no such method.

So... in the absence of a built-in method, your best bet is to construct your own function with the methods that are available. That's what Andy was suggesting (and the sample code he gave is a good start).

Cheers,

Kevin
Post Reply