Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on By Right-click displaying context menu on map within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi Wilfried, I need to update myself with VS2005 . On map's right-click event I can make it to show ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Hi Wilfried, I need to update myself with VS2005 Thanks for bearing with me and for your great help. |
| |||
|
Hi, You cannot show a message box in another thread. You have to show it in the same thread context of the main GUI thread. Be very carefull with thread in dotNet !!!
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Thx for feedback.I'm glad it works for you
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
How do you prevent the popping up of the context menu on your site and make an alert box if anybody rightclicks anywhere on the document in plain old HTML? I have tried onRightClick, and onContextMenu. The box comes up, but it doesn't stop the context window from coming up. Please help soon. |
| |||
| Re: By Right-click displaying context menu on map
Hi, Do you mean with the MP control ? There is a parameter Cancel that can be set to true. About HTML you cannot, you need to use JavaScript.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Can you use JS w/ HTML??? I tried, and it worked. Some JS scripts I tried on HTML: <html> <title> Scripting </title> <body> <fieldset> <legend> Scripts </legend> <BODY onContextMenu="javascript:alert(...')"> <BODY onLoad="javascript:alert(...')"> <A NAME="top">Welcome to the Top! <A HREF="#nbop">Click here to go back!</A><br>(2nd time through)<br> </HEAD> <BODY BGCOLOR="FFFFFF" TEXT="000000" LINK="0000FF" VLINK="800080" ALINK="FF0000"> <P> <P><P> <P> <br><br><br><br><br><br><br> <CENTER> <FONT SIZE="+2"><A HREF=""onMouseOver="document.bgColor='black'">Blac k</a> <A HREF=""onMouseOver="document.bgColor='green'">Gree n</a> <A HREF=""onMouseOver="document.bgColor='yellow'">Yel low</a> <A HREF=""onMouseOver="document.bgColor='red'">Red</a> <A HREF=""onMouseOver="document.bgColor='brown'">Brow n</a> <A HREF=""onMouseOver="document.bgColor='white'">Whit e</a> </FONT></CENTER><br>Color onMouseOver<br> <A HREF="..." onMouseOver="window.status= ...'; return true">Club Penguin</A>.<br> <A HREF="..." onMouseOver="window.status='...'; return true" onMouseOut="window.status= '...'; return true">Runescape</A><br> <A HREF="..." onMouseOver="parent.location=...";>Dude!</A>o<br> <A HREF="..." onMouseOver="alert('...')";>...</A><br> <A HREF="..." onClick="alert('...')";>...</A><br> <FORM> <INPUT TYPE="button" VALUE="BACK" onClick="history.go(-1)"> <INPUT TYPE="button" VALUE="FORWARD" onClick="history.go(1)"> </FORM>OnClick FormBut. Hist<br> <FORM> <INPUT TYPE="button" VALUE="Click To Go To the Bottom Of The Page" onClick="parent.location='#code'"> </FORM>WIpagel<br> <FORM> <INPUT TYPE="button" VALUE="Click Here to Write to Me" onClick="parent.location='mailto:...'"> </FORM>Mailto<br> <A NAME="nbop"> <A HREF="#top">Top of Page onClick</A><br> </fieldset> <A NAME="code"> </body> </html> Of course I used different things instead of ellipses dots. But can you show me how to altogether eliminate the context bar and display an alert??? This one shows the alert, but doesn't block the context menu (the code for the context menu is near the top). This is HTML, and the site I learned if off of told me it was also JS. What is going on??? I am just getting into coding, but I am ambitious and want to learn everything. I am working on scripting for now. Can you give me an example for blocking the context message? What does MP control mean??? And whats a parameter cancel??? |
| |||
| Re: By Right-click displaying context menu on map
Hi, I'm not sure I understand the problem. Also please put code into [ code ] tags then it is displayed with the right indent for better readability. Do you display the map, so how? This code does not show enough unless I'm not looking well.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| The other stuff is all other stuff. The only thing that I'm asking about is the <BODY onContextMenu="javascript:alert(...')"> line. It says when you rightclick (or context menu) anywhere in the BODY, it will alert you saying whatever is in the parenthesis. It will display the alert, but still allow the context menu. How do you block the context menu AND display an alert??? And as for the code tags, what are they??? |
| |||
| Re: By Right-click displaying context menu on map
Hi, Quote:
For the contextmenu you mean the one generated by the browser? You can prevent this for some browsers but not for all. For IE you find an article at msdn: Adding Entries to the Standard Context Menu but this will not work with other browsers. Operan and Firefox will display it. I don't think you can even block this with Firefox. And there are a lots other browsers too included custom made that you can't prevent anything.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| context, displaying, map, menu, rightclick |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disable Context menu | Anonymous | MapPoint 2006/2009 Discussion | 12 | 12-23-2008 12:05 PM |
| Click events of context menu are not firing.... | Learner | MapPoint 2006/2009 Discussion | 6 | 05-12-2008 02:33 PM |
| Custom context menu | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-10-2004 10:15 PM |
| Extending MapPoint - How about the Context Menu Enhancements | Anonymous | MapPoint 2006/2009 Discussion | 2 | 02-10-2004 09:38 AM |
| VB.NET & overriding the map point context menu... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2002 08:25 AM |
Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!