Remove or isolate part with JavaScript?

Hi folks,
as you know you can remove or isolate parts in the modelhierarchy with a few clicks. Now I want to do exacactly the same with JavaScript to add this function to a button or something similar.
So I can have a button like "show part xy" and only this part is shown in the 3D view and other parts are not visible.
Is there any chance to do this?
I think there's a workaround with creating an animation like an exploded view where certain parts are removed. But a simple funtion would be much more easier I think.
thx in advance,
Tobias

Hi,
I didn't check whether the following code actually compiles and works, but maybe it does what you're trying to accomplish...
[3D annotation JavaScript code, associated with the container for Your embedded U3D model]
function makeAllMeshesInvisible ( )
var howManyMeshesInScene = scene.meshes.count;
for ( m=0; m < howManyMeshesInScene; m++ )
var myMesh = scene.meshes.getByIndex(m);
console.println("Making mesh " + myMesh.name + " invisible.");
myMesh.visible = false;
function makeMeshVisible ( meshName )
var myMesh = scene.meshes.getByName(meshName);
if ( myMesh )
myMesh.visible = true;
else
console.println("There is no mesh named " + meshName);
[Document JavaScript code, e.g. associated with a button]
// getAnnots3D(pageNum)[annotIdx]
context3D = getAnnots3D(0)[0].context3D;
context3D.makeAllMeshesInvisible();
context3D.makeMeshVisible("nodeName");
Please note that the 3D viewer must be active for the button to work properly...
I hope it works and helps!
Sebi

Similar Messages

  • Compound filtering xslt list view web part with _dopostback using javascript/jquery

    Hello,
    I am filtering list view web part as same as the below post,
    http://dcsharepointchick.blogspot.in/2013/05/filter-sharepoint-list-with-partial-postback.html
    here I need to filter the web part with some another condition . I am trying to write another condition in filter attribute of _doPostback(), but it doesn't work.
    Please let me know is there any alternative to achieve compound filtering.
    Regards,
    Balakrishna M.

    Hi Balakrishna,
    According to your description, my understanding is that you want to filter the list view web part with more than one filters.
    I recommend to use the OOB Choice Filter web part to achieve this goal.
    Edit the page where the list view web part exists and then add the Choice Filter web parts to the page based on your need.
    More reference:
    http://office.microsoft.com/en-in/sharepoint-server-help/connect-a-filter-web-part-to-a-list-view-web-part-HA101785233.aspx#_Toc296943684
    Or you use the List Filter Plus Web Part to get the function.
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/overview/
    Here is the link to download the web part:
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/download/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Page Viewer Web Part with horizontal scrollbar

    Hi,
    I added a page viewer webpart to a sharepoint 2013 website and placed a reporting services report url on it, however in some users the browser shows a horizontal scroll bar and cuts the report area. This is not version related because
    I can see it well in IE10 in one user and in others it shows the reported problem.
    Seems to be browser settings. Any ideas?
    Thank you

    Hi,
    According to your post, my understanding is that some users’ browser shown a horizontal scroll bar in the page view web part.
    You can disable the horizontal using the CSS style as the following.
    <style type="text/css">
    #WebPartWPQ3 {
        OVERFLOW-X: hidden !important
    </style>
    Note: the WebPartWPQ3  is the webpart ID.
    You can find the ID as the following thread:
    http://sharepoint.stackexchange.com/questions/29649/disable-horizontal-scroll-bar-on-navigation-web-part-in-sharepoint-2010
    Instead of using page viewer web part, you can also use the content edit web part with IFrame, and some JavaScript to achieve it.
    For more information:
    http://majidbaig.blogspot.in/2012/07/page-viewer-web-part-dynamic-height.html
    There is a similar thread for your reference.
    http://stackoverflow.com/questions/368480/removing-scrollbars-from-content-editor-page-viewer-webpart
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Problem with JavaScript in DPS

    Hello,
    i have little problem with one HTML page in DPS. We've created HTML form, which is formatting output with JavaScript and then passing to local mail client via mailto. It works nicely in Safari on desktop, it works in Safari on iPad BUT it don't work in DPS, when we use it as HTML content (frame on page where form is loaded). Unfortunately, there is no way how to learn what's wrong - on iPad it works, it's not working just in DPS (and it's not working in Viewer on desktop too).
    Anyone have any idea what to do?
    Script is fairly simple, it's my compilation of other works, because i'm not JS programmer, just i'm skilled with google-copy-paste... So there can be some VERY trivial error, but i don't know correct syntax...
    very simple version of this form, which is not working in DPS (but everywhere else), is here
    http://dl.optio.cz/mailtoExample.html
    Thanks for any help!

    Hello,
    when used in DPS browser, it's working (as part of HTMLresources.zip). I don't know if this will help, but here is small game, which works correctly in DPS in web overlay. when you move any red circle, it will let you send results via email. But this is too complicated for my minimal skills.
    http://dl.optio.cz/Hra_en/
    Anyway, thanks for help
    Martin

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Need Help ! Content Search Web Part with default callout menu as docoument library

    I want the above functionality with the Content Search Web Part(CSWP).

    Hi,
    Per my understanding, you might want to create something like a
    Content Search Web Part(which is introduced in SharePoint 2013) in your SharePoint 2010 environment with the callout menu functionality.
    As there is no OOTB Content Search Web Part in SharePoint 2010, a suggestion is that you can build a custom web part with the help of
    Search API and create custom callout menu for it.
    Two demos about
    how to work with Search API in SharePoint 2010 for your reference:
    http://nikpatel.net/2013/02/21/step-by-step-building-custom-sharepoint-2010-search-applications-using-keywordquery-api/
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/12/how-to-use-the-sharepoint-2010-enterprise-search-keywordquery-class.aspx
    For about
    how to create a custom callout menu, the JavaScript plugins below would be helpful:
    http://www.jqueryrain.com/demo/jquery-context-menu/
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How can i optimize my SEARCH ENGINE???I use godaddy.i contact them and they give me this conclusion:Search engines are not pulling up your other pages on your website because it is created with javascript. the content on the pages, (photo gallery.....

    conclusion from godaddy:
    Search engines are not pulling up your other pages on your website because it is created with javascript.
    the content on the pages, (photo gallery, My Recipes/Blog, History, Friends) need to be formatted to HTML, PHP or CSS. No search engines (google, Yahoo, Bing) can crawl//analyze webpages built with javascript.
    See if Apple allows iweb to create the pages in HTML format and ask how to make those changes.
    I spend more then 1 hour on the phone with them but we didn't find the solution...
    please i need help because like this nobody can rich my website...
    www.chefdiego.com
    thank you

    The part of iWeb pages that give the search engines problem is the navbar.  That's javascript based.  One way to get around that is to create another blank page in the site that's not  included in the navbar. 
    Add a text based navbar in that page with just the other pages in the site. 
    Also you can use that page for creating the sitemap for Google at Create your Google Sitemap Online - XML Sitemaps Generator.
    Have you let Google know your site exists? This website describes how to get it recognized: Get your iWeb website found in search engines like Google Yahoo MSN and Bing.
    OT

  • C# control event handling with javascript

    How can I get javascript to execute for "onchange" / "OnSelectedIndexChanged" event instead of a CodeBehind method? I think "OnSelectedIndexChanged" event has to be handled by CodeBehind; but how can I replace that (or onchange) with
    a javascript event handler?
    I have the following in my xyz.ascx file:
    <asp:DropDownList ID="ddlTypeCar" CssClass="BatsRefAddressTypes" runat="server"
                      onchange="javascript: testAlert();"
                      OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged"
                      AutoPostBack="True" />
    I could not get the javascript to execute, even though I removed OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged" and/or set AutoPostBack="false".
    Additionally, I tried added the following in xyz.ascx.cs Page_Load() method.
    ddlTypeOfAddress.Attributes.Add("onchange", "javascript: testAlert();");
    which didn't help.
    Thanks for your help in advance.

    Hi,
    you can control client events instead of server events with javascript
    look this url for more information
    http://www.w3schools.com/js/js_events.asp
    Regards

  • JSF problems with Javascript

    Hi everyone!!
    The situation is this: I have a datable with one of its columns make an h:commanLink, which has two f:params, its actionListener is a function of a ManagedBean. This is JSF, not MyFaces. In IE, When the link is pressed, it shows a javascript error: " 'elements.idVar' is null or it's not an object ", however in Firefox, it works perfectly. I have been looking for the problem and it have to do with this:
    </form><a href="# onclick="clearFormHiddenParams_formResultado('formResultado');document.forms['formResultado'['formResultado:_idcl'].value='formResultado:dtTablaResultados:0:_id10';document.forms['formResultado']['idVar'].value='37';document.forms['formResultado']['idMun'].value='168'; document.forms['formResultado'].submit(); return false;"><span id="formResultado:dtTablaResultados:0:itColumna3" title="AREA COSECHADA EN CULTIVOS PERMANENTES">1,230</span></a></td>
    </tr>
    <tr class="standardTable_Row2">
    <td><span id="formResultado:dtTablaResultados:1:itColumna1" style="text-align:center;" title="C&oacute;digo Municipio">718</span></td>
    <td><a href="javascript:void(0)" onclick="javascript:window.opener.opener.showLink('SASAIMA')"><span id="formResultado:dtTablaResultados:1:itColumna2_l" title="Municipio">SASAIMA</span></a></td>
    <td><form id="formResultado:dtTablaResultados:1:_id9" method="post" action="/ConsultaEstadisticasGeo/resultadoConsulta.jsf" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id39:_id41" /><input type="hidden" name="formResultado:dtTablaResultados:1:_id9" value="formResultado:dtTablaResultados:1:_id9" /><input type="hidden" name="idVar" /><input type="hidden" name="idMun" /><input type="hidden" name="formResultado:_idcl" />
    <script type="text/javascript">
    <!--
    function clearFormHiddenParams_formResultado_dtTablaResultados_1__id9(curFormName) {
    var curForm = document.forms[curFormName];
    curForm.elements['idVar'].value = null;
    curForm.elements['idMun'].value = null;
    curForm.elements['formResultado:_idcl'].value = null;
    //-->
    </script>
    the way JSF manage the params. The error, acdording to the message shonw by IE is in this line: curForm.elements['idVar'].value = null;
    The code of the JSP is this:
    <h:commandLink     actionListener="#{consultaEstadisticasMB.detalleEstadistica}">
         <f:param name="idVar" value="#{consultaEstadisticasMB.idColumna3}" id="idVar" />
         <f:param name="idMun" value="#{registro[0]}" id="idMun" />
         <h:outputText title="#{consultaEstadisticasMB.columna3}" id="itColumna3" value="#{registro[2]}" />
    </h:commandLink>
    Waht can i do? (Not using MyFaces, because I can�t do that)
    Thanks for your answers!!

    I have run into this same problem with javascript and the colon. I am not sure if the colon is a valid character for a javascript identifier (one would think the RI developers would have checked it out though!?!).
    Anyway, my workaround is to search through the Javascript DOM for the widget you want to obtain a reference to, using part of its id. After all, you know its id, you just can't use it as a javascript reference. In your Javascript code, do something like:
        var inputWidgets = document.getElementsByTagName("input");
        var targetInput;
        for(var i = 0; i < inputWidgets.length; i++)
           var inputId = inputWidgets.id;
    if(inputId.indexOf("yourInputId") != -1)
    targetInput = inputWidgets[i];
    break;
    It's a lot of effort to just get a reference to a form widget....but it works (I pasted in the code and changed it a bit, so it might not work as is, but at least it demonstrates the idea).

  • Add annotations with JavaScript

    Hello,
    I'm currently writing a JavaScript function (that will be executed in a JSP page) to add annotations to PDF files. So far, so good. Actually everything is working as intended except one thing: the position of the annotation. Somehow, it always ends up at position 0,0 (bottom left) of the document with a size of 0, but I know it's there because I can see it in the list of comments. Here is my JavaScript function:
    function annotPdf(src)
         // Create the ActiveXObject
         var pdf = new ActiveXObject('AcroExch.PDDoc');
         // Variables
         var pdfJS;
         var annot;
         var printParams;
         var page;
         var rectSize = new Array();
         // Open PDF
         pdf.Open(src);
         // Determine where to place the annotation
         page = pdf.AcquirePage(0);
         page = page.GetSize();
         rectSize[0] = 25;
         rectSize[1] = page.y - 50;
         rectSize[2] = page.x - 25;
         rectSize[3] = page.y - 25;
         // Get the JSObject
         pdfJS = pdf.GetJSObject();
         // Add the annotation
         pdfJS.addAnnot({page: 0, type: 'FreeText', rect: rectSize, author: 'Automated', contents: 'Test'});
         // Printing
         printParams = pdfJS.getPrintParams();
         printParams.interactive = -1;
         printParams.firstPage = 0;
         printParams.pageHandling = printParams.constants.handling.fit;
         // pdfJS.print(printParams);
         // Save instead of printing for testing
         pdf.Save(1, "C:/Tempo/test.pdf");
         pdf.Close();
    Again, everything works. The annotation is created, but not positioned (as if rect was not doing its job). Now, if I open the same PDF document with Adobe Acrobat 9 and go into the JavaScript Debugger and put:
    this.addAnnot({page: 0, type: 'FreeTest', rect: [25,742,1199,767], author: 'Automated', contents: 'Test'});
    It correctly adds the annotation to the position I want. My theory is that passing an array with Javascript to add an annotation is bugged, because I can do the exact same thing with VB (Pass an array of Integers to rect) and it works perfectly!
    Anyone could help me find a way to make my function work?
    Thanks, Rukk.

    Oops, my bad. It's installed on client not server. My mistake.
    As I said, the ActiveX has no problem to instantiate. That part works. As I said in my first post, I can open my PDF file, add an annotation to it, print it, etc. The problem I have is that I can't decide where to put my annotation (with the rect property). Please refer to my first post.
    Again, thanks for your answer.
    Edit:
    I had to retype it, because when I did copy & paste it added lot of extra blank line (that I wasn't able to delete) and formatting was a bit weird.
    It' a typo.
    Message was edited by: Rukk

  • Replacing comma with Javascript

    Hi,
    How to replace commas in an array with Javascript???
    For eg, i have an array that contain the values 1,2,3,4.
    Here i want to remove the comma. So the solution i am looking for is
    1234.
    How to do this. Can we the Java functions like replace() in javascript?
    How to import the Java classes in Javascript???
    Please do provide a solution for this.
    Regards,
    M.Ananthu

    I'm not aware of any mechanism in Javascript that can help with this. In our fully-internationalized web applicaiton we choose to perform all locale-dependent validation server-side. This includes dates, numbers, currency values etc. About the only thing we check in Javscript is that required fields are filled in.
    I'd be interested in knowing if anyone has solved this in Javscript. Its possible that you could dynamically generate a Javscript validation routine based on the locale-specific formatting symbols, but we decided it wasn't worth it.
    T

  • Custom web part with ontextual tab - show/hide on focus

    Hi,
    I built a webpart that has a contextual ribbon tab and buttons, this webpart is added to a wiki page. When the wiki page is in edit mode I would like this custom ribbon tab to be shown or hidden depending on whether my webpart is clicked.
    Great thanks, if you can show me the right direction.

    Hi,    
    To show/hide the ribbon tab depending on the click event of the web part, a workaround is that we can use JavaScript to achieve it.
    With JavaScript, we can capture the click event of one web part in a page and show/hide with the help of the corresponding JavaScript function.
    Here are some links will provide more information:
    onclick Event
    Toggle (Show/Hide) Element
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Adding Page View Web Part with dynamic URL based on visited mysite user

    Problem:
    I want to add an iframe (using Page View Web Part for example) on all mysite users front page (person.aspx) with following address:
    http://webservice/calendar?user=name
    The property "name" represents a dynamic value based on which person the user is visiting. Hence if i open "Tom Hanks" mysite profile, the iframe will show content from http://webservice/calendar?user=Tom%Hanks
    (This is a custom made calendar from Domino)
    Any suggestions welcome.
    -Terje

    Hi,
    The Page Viewer Web Part is basically an HTML IFRAME. We can use a Content Editor Web Part with an IFRAME and a little JavaScript to meet your requirement.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/d9a06d93-93d2-4340-a491-c7d0d5d4fdf3/how-to-dynamically-change-link-in-page-viewer-web-part-sharepoint-2010?forum=sharepointgeneralprevious
    More information:
    http://stackoverflow.com/questions/20981226/sharepoint-2013-get-current-user-javascript
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to make separate/individual text frame from one parent frame in indesign with javascript

    Hi all,
    Please suugest - how to make separate/individual text frame from one parent frame in indesign with javascript.
    Thanks
    Rohit

    @Larry – ah, your interpretation could be the right one…
    May I rephrase the question:
    "How to split threaded text frames to single ones?"
    "SplitStory.jsx" or "BreakFrame.jsx" under Scripts/Samples indeed could be the answer.
    From the comments in the code of "BreakFrame.jsx":
    //Removes the selected text frame (or text frames) from the
    //story containing the text frame and removes the text contained
    //by the text frame from the story.
    //If you want to split *all* of the text fames in the story, use the
    //SplitStory.jsx script.
    Uwe

Maybe you are looking for

  • Deskjet 6988dt, how to use photo/envelope slot for printing 4x6 photo paper?

    Windows 7 Home Premium 64-bit OS.  Printer has the extra250 sheet paper tray.  Upper and lower tray work fine.  I can of course load photo paper in upper tray and print photos from there, but I was trying to load just one sheet of photo paper in the

  • Monitor system

    hi all , we have monitoring system (SOLARWINS ORION) so we plan to add oracle to this moinoring system is case if any error or warning send email to our team , i know how to do this vie connected oracle enter prise manger ro mail server , but this mo

  • Premiere and matrox issues

    Hi all, new to premier having bailed out of FCP and having great difficulty seeing pictures on my matrox mx02 it plays fine in the viewer window and on the grade 1 monitor (with audio) but the edit window doesnt play at all even on the computer scree

  • Report connection error ORA-12203 : TNS : unable to connect to destination

    hi when in open report and go to query builder then show me this error REP-0501 : Unable to connect to the specified database. ORA-12203 : TNS : unable to connect to destination how i connect report and form with oracle8i which two file in copy into

  • What causes blank pages appearing suddenly in an autoflowed-text document?

    CS5.5, english version. The complete book was built-up and all master pages were applied . When reopening the file, several blank pages appeared at two places in the document. The text flow was not interrupted, but seamed «hidden» under a non-existin