Results 1 to 3 of 3
  1. #1
    Cozzy's Avatar
    Cozzy is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default HELP: web page created from visio

    Good Morning people,
    here is my problem, I have seen Java before but never really understood it, I have created a drawing from visio 2010 and published it as a web page that creates java scripts etc, the idea of the drawing is to be a "computer locator" the 2 problems that I have is that I want the shape to change color when located (hightlighted) and the second part is to disabe ctrl+click to access the hyperling that runs the command (which might be a IE8 thing not java??)

    here is the script I think I need to change to highlight the shape
    Java Code:
    function FindOnClick()
    {
    	var count, indexOfString;
    	
    	var fieldsToSearchArray = new Array();
    	if (parent.xmlData != null && document.theForm[strProps + strChkBox].checked)
    	{
    		for( count=0; count < document.theForm.length; count++ )
    		{
    			indexOfString = document.theForm[count].name.indexOf(strPropChkBox);
    			if( -1 != indexOfString && document.theForm[count].checked )
    			{
    				fieldsToSearchArray[ fieldsToSearchArray.length ] = document.theForm[count].name.slice(0, indexOfString);
    			}
    		}
    	}
    
    	var searchTokensArray = CreateSearchTokens (document.theForm.findString.value);
    
    	if (searchTokensArray.length > 0)
    	{
    		var findArray = Find(searchTokensArray, fieldsToSearchArray);
    		var ArrayLength = findArray.length;
    		var strResultsHTML = "No matches found.";
    		var lastPageID = null;
    		var shapeID;
    		
    		
    		if(ArrayLength > 0)
    		{
    			strResultsHTML = strResults + ' <b>'+ parent.HTMLEscape(document.theForm.findString.value) +'</b>';
    			for ( count = 0; count < ArrayLength; count++)
    			{
    			
    				if( lastPageID != findArray[count].PageID )
    				{
    					lastPageID = findArray[count].PageID;
    				}
    
    				shapeID = findArray[count].ShapeID;
    				strResultsHTML += '<p class="results"><a href="javascript:populateSearchResultDetails(\'results_'+ lastPageID +'_'+ shapeID +'\', '+ lastPageID +','+ shapeID +'); TogglePlus(\'results_' + lastPageID + '_' + shapeID + '\',\'img_' + lastPageID + '_' + shapeID + '\', hideResults)"><img src="plus.gif" style="padding-left:13px" alt="Barrie Changed this" width="13" height="9" border="0" id="img_'+ lastPageID +'_'+ shapeID +'"></a>\n'
    				strResultsHTML += '<a  class="blu1" href="JavaScript:FindQuerySelect(';
    
    				strResultsHTML += findArray[count].PageID + ",";
    				strResultsHTML += findArray[count].ShapeID + ",";
    				strResultsHTML += findArray[count].PinX + ",";
    				strResultsHTML += findArray[count].PinY;
    
    				strResultsHTML += ')">'+ findArray[count].Title +'</a></p>\n'
    
    				strResultsHTML += '</div>\n';
    				strResultsHTML += '<div class="indent" id="results_'+ lastPageID +'_'+ shapeID +'" style="display:none;width:90%;"></div>\n'
    			}
    
    		}
    		var divAdvSrch = document.getElementById("hideAdvSrch");
    		var imgAS0 = document.getElementById("as0");
    		
    		var tmpObj = document.getElementById("hideResults");
    		if( tmpObj != null )
    		{
    			tmpObj.innerHTML = strResultsHTML;
    			tmpObj.open = "true";
    			tmpObj.style.display = "block";
    any help would be very much appricated

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    Unfortunately for you Java is not JavaScript. They simply have similar names (which was done on purpose for JavaScript by the Netscape people to ride the popularity/buzz that Java was already creating). So, find a JavaScript forum.

  3. #3
    Cozzy's Avatar
    Cozzy is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

Similar Threads

  1. running the created jar file
    By Mostafa_mech in forum NetBeans
    Replies: 12
    Last Post: 07-02-2010, 11:06 AM
  2. Folder Date Created
    By Tokajac in forum Advanced Java
    Replies: 2
    Last Post: 05-05-2010, 06:26 PM
  3. visio application development
    By aannuu in forum Advanced Java
    Replies: 5
    Last Post: 09-20-2009, 05:18 PM
  4. Exporting UML diagrams to MS Visio
    By lettyh in forum NetBeans
    Replies: 0
    Last Post: 10-30-2008, 06:19 PM
  5. Help, created a username and password box
    By cachi in forum AWT / Swing
    Replies: 1
    Last Post: 08-07-2007, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •