JavaScript - Script For A Talent Tree
Similar TutorialsHi, I am really in a slump right now... I thank all of the people who have helped me in this site... i have a script already that allows check boxes to show the next checkbox using the onclick function. and now I cannot figure out how to make a decision tree.. eg. a person will call or ask for 4 possible inquiries.. billing leads to 2 scenarios - the caller wants the charges explained; once explained its good - the caller wants the charges cancelled technical leads to 2 scenarios -the caller asks for technical assistance; hence resolved -the L1 tech cannot resolve the problem and escalates it to a higher dept gen inq leads 3 scenarios - sell the product - higher department cannot locate any account - declines the sale cancellation leads to 2 scenarios - with refund - no refund i am thinking of a combo box for this to make things much easier.. but it is not.. the hard part for me is when the last check box is clicked I want this drop down shown then, after the user selects the any of the scenarios another check box appears and then another one to finish the process. also I had a script were in all the selected values can be copied to a clipboard but, doesnt copy it. I am really really depressed about this.. I want to learn the js. but I am stuck with the level 0 degree.. please help me.. I would like to put a script on our website that users could interact with and that would ask a series of questions and based on those questions propose answers. Im surprised I cant find much on the web to help me do this. Does anyone know a PHP script, widget, or template that could provide me this functionality? I just want to be able to input a series of questions and answers and the logical flow and be able to host it on our web server. woundering if any could point me in the right direction, where i can find a soul tree canculator script or any one who can make one. thanks shaun. I could use some help. I'm technically a CSS/Javascript newbie, so I have no idea where to start. I've been researching the past few hours, but I'm completely lost. If anyone could help, I would greatly appreciate it. I don't need someone to build the whole thing for me. What I could use, is an example. Basically a simple setup that someone could create real quick would help. For the example, if anyone has the time and willing to help, make this type of simple setup. I basically look at wow's talent cal, but this isn't a wow talent calculator. It's for a different game. I still need 3 trees. You don't have to put in a ton of icons or mouseover tooltips. I would like this though(for a quick setup): 3 talent trees 2 talent points per tree each talent has at least 1 talent point that can be added tooltip that could say like "0%" with 0 talent points in it, and say "33%" when 1 talent point is added. If possible make the 2nd tier unactive until 1st tier has the point in it. This would be a simple setup. I don't know how to go about doing it. But, if someone could create something like this, and perhaps a "howto" of how to add new talents, like where to add them in the script files, it would be appreciate. I know this is a lot of work, but any help ie appreciated. Hi all, I'm looking to find a way to making a FAQ selection search which has a hierarchy effect. For example: Whats your favorite color? Red Blue Green Say you select red What shade of red do you prefer? Dark Light Say you select Light Final page that will contain the information that you had rounded down through the search. Does any one have any ideas on how I can do this as I cant seem to find anything on the net! Thanks Hi, need help in making a check box list menu, wherein when initial check box is clicked another checkbox will appear. Help Help Hello I am trying to create a family tree, parents / grandparents etc, of a single person... My database etc is already working but I cannot find any working examples that I can make sense of... Each of my records has a name, dob and id of each parent.... How can I get X generations from this.. I thought something like this might work.. GetParents For each parent GetParents And so on... But I have no idea how to put this into code... Any suggestions to put me on the right line would be greatly appreciated Thanks Hi all. I'm experiencing an issue with dijit.Tree/ForestStoreModel/ItemFileWriteStore and I just can't seem to figure out what's going on. If I start with an empty store model ... var myData= { "identifier" : "id", "label" : "name", "items" : [] }; var myStore = new dojo.data.ItemFileWriteStore({ data: myData }); var myModel = new dijit.tree.ForestStoreModel({ sto masterStore, query: {type: 'task'}, rootId: "tasks_id", rootLabel : "Tasks", childrenAttrs: ["children"] }); If I eventually execute newItem on the store, the tree is not updated. myStore.newItem( { id: "2", name : "someName2", type : 'task', children : [], } ); However, if during declaration of my data, I include 1 item, ie. var myData= { "identifier" : "id", "label" : "name", "items" : [ {"id" : "1", "name" : "someName", "type" : "task"} ] }; Then I can subsequent call newItem as many times as I wish, and the tree is updated correctly. If anybody has any ideas, I'm all eyes. I need to render a tree in freemarker. I am not sure about what technology should be used. I was thinking Jquerys jsTree plugin. My requirements - 1. Tree control -Name and instead of Icon ,i want customized letters(A,B,C) that represents type of element. 2.I dont want dotted lines connecting root and children like folder tree. 3.collapsable. Please suggest what and how can i do .? Code: <script type="text/javascript"> function validate(form) { // Checking if at least one period button is selected. Or not. if (!document.form1.sex[0].checked && !document.form1.sex[1].checked){ alert("Please Select Sex"); return false;} var total="" for(var i=0; i < document.form1.scripts.length; i++){ if(document.form1.scripts[i].checked) total +=document.form1.scripts[i].value + "\n" } if(total=="") alert("select scripts") else alert (total) return false; } </script> <table border='0' width='50%' cellspacing='0' cellpadding='0' ><form name=form1 method=post action=action_page.php onsubmit='return validate(this)'><input type=hidden name=todo value=post> <tr bgcolor='#ffffff'><td align=center ><font face='verdana' size='2'><b>Sex</b><input type=radio name=sex value='male'>Male </font><input type=radio name=sex value='female'><font face='verdana' size='2'>Female</font></td></tr> <tr><td align=center bgcolor='#f1f1f1'><font face='verdana' size='2'><b>Scripts You know</b><input type=checkbox name=scripts value='JavaScript'>JavaScript <input type=checkbox name=scripts value='PHP'>PHP <input type=checkbox name=scripts value='HTML'>HTML </td></tr> <tr bgcolor='#ffffff'><td align=center ><input type=submit value=Submit> <input type=reset value=Reset></td></tr> </table></form> In this code a checkbox is accessed as "document.form1.scripts[i].checked" If we see the tree view of this document, it is "table/form1/tr/td/scripts[i].checked" SO are we not required to add table elements in the path to the checkbox ? I guess its not required. But why ? Because cell, row and table are the parent elements in HTML tree, then why are they not required ? Hello, I have a specific need in javascript. Can I be guided in this context if its possible or not??? I am using virtuemart extension in joomla to make an ecommerce website. I will try to explain my requirement with the example. Following is the sample category tree with number. 1.0 .....1.1 ..........1.1.1 ..........1.1.2 .....1.2 ..........1.2.1 ..........1.2.2 .....1.3 ..........1.3.1 ..........1.3.2 2.0 .....2.1 ..........2.1.1 ..........2.1.2 .....2.2 ..........2.2.1 ..........2.2.2 .....2.3 ..........2.3.1 ..........2.3.2 Now I have a drop down main menu as 1.0 and 2.0. I want that when i click on 1.0 all the nodes of 1.0 should be opened and 2.0 should be closed and similarly when i click on 2.0 all its child nodes should be opened and 1.0 should be closed. What happen with most extensions is that at a time only one child is opened. If i click on 1.0 then only 1.1 or 1.2 or 1.3 will remain open at a time. Does this kind of customization can be done or is available in javascript .... I hope i will be helped... Thanks a lot for the time. Code: oaktree.addItem("RC Mail", branch1, "rcmail/") //Add this item to branch2 I can open it up in the current page, but the menu is in a frame and I need to open it in a fram called "home". How can I do that~?? I am having trouble with a sub-menu of the 1st item only and can not seem to figure it out. All the others are fine. Any help is appreciated. Here is the code: var NoOffFirstLineMenus=7; // Number of first level items var LowBgColor='white'; // Background color when mouse is not over var LowSubBgColor='white'; // Background color when mouse is not over on subs var HighBgColor='black'; // Background color when mouse is over var HighSubBgColor='black'; // Background color when mouse is over on subs var FontLowColor='black'; // Font color when mouse is not over var FontSubLowColor='black'; // Font color subs when mouse is not over var FontHighColor='white'; // Font color when mouse is over var FontSubHighColor='white'; // Font color subs when mouse is over var BorderColor='black'; // Border color var BorderSubColor='black'; // Border color for subs var BorderWidth=1; // Border width var BorderBtwnElmnts=1; // Border between elements 1 or 0 var FontFamily="arial,comic sans ms,technical" // Font family menu items var FontSize=9; // Font size menu items var FontBold=1; // Bold menu items 1 or 0 var FontItalic=0; // Italic menu items 1 or 0 var MenuTextCentered='center'; // Item text position 'left', 'center' or 'right' var MenuCentered='center'; // Menu horizontal position 'left', 'center' or 'right' var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static var ChildOverlap=.2; // horizontal overlap child/ parent var ChildVerticalOverlap=.2; // vertical overlap child/ parent var StartTop=05; // Menu offset x coordinate var StartLeft=05; // Menu offset y coordinate var VerCorrect=0; // Multiple frames y correction var HorCorrect=0; // Multiple frames x correction var LeftPaddng=3; // Left padding var TopPaddng=2; // Top padding var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL var MenuFramesVertical=1; // Frames in cols or rows 1 or 0 var DissapearDelay=1000; // delay before menu folds in var TakeOverBgColor=1; // Menu frame takes over background color subitem frame var FirstLineFrame='navig'; // Frame where first level appears var SecLineFrame='space'; // Frame where sub levels appear var DocTargetFrame='space'; // Frame where target documents appear var TargetLoc=''; // span id for relative positioning var HideTop=0; // Hide first level when loading new document 1 or 0 var MenuWrap=1; // enables/ disables menu wrap 1 or 0 var RightToLeft=0; // enables/ disables right to left unfold 1 or 0 var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover var WebMasterCheck=0; // menu tree checking on or off 1 or 0 var ShowArrow=1; // Uses arrow gifs when 1 var KeepHilite=1; // Keep selected path highligthed var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5,10]; // Arrow source, width and height function BeforeStart(){return} function AfterBuild(){return} function BeforeFirstOpen(){return} function AfterCloseAll(){return} // Menu tree // MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width); // For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg" Menu1=new Array("Home","","",3); Menu1_1=new Array("The Ayllu","The Ayllu.htm","",0,20,150); Menu1_2=new Array("Acknow","Acknowledgement.htm","",0); Menu1_3=new Array("Prayer","Prayer.htm","",0); Menu2=new Array("About Us","","",4); Menu2_1=new Array("Debra","bio.htm","",0,20,150); Menu2_2=new Array("Seamus","Seamus.htm","",0); Menu2_3=new Array("Locations","location.htm","",0); Menu2_4=new Array("Contact Us","contact.htm","",0); Menu3=new Array("Services","","",7); Menu3_1=new Array("Shamanic Healing","http://www.Ayllu.us/Shamanic Healing.htm","",0,20,150); Menu3_2=new Array("Shamanic Counseling","http://www.Ayllu.us/Shamanic Counseling.htm","",0); Menu3_3=new Array("Sacred Ceremonies","http://www.Ayllu.us/Sacred Ceremonies.htm","",0); Menu3_4=new Array("Sacred Body Work","http://www.Ayllu.us/sbw.htm","",0); Menu3_5=new Array("Full Moon Crystal Bowl","http://www.Ayllu.us/fm.htm","",0); Menu3_6=new Array("Sound Healing","http://www.Ayllu.us/Sound Healing.htm","",0); Menu3_7=new Array("LaHo-Chi","http://www.Ayllu.us/lahochi.htm","",0); Menu4=new Array("Calendar","http://www.ayllu.us/calendar.htm","",0); Menu5=new Array("Gallery","http://www.ayllu.us/gallery.html","",0); Menu6=new Array("Articles","","",3); Menu6_1=new Array("Test 1","http://www.Ayllu.us/blank.htm","",0,20,150); Menu6_2=new Array("Test 2","http://www.Ayllu.us/blank.htm","",0); Menu6_3=new Array("Test 3","http://www.Ayllu.us/blank.htm","",0); Menu7=new Array("Links","http://www.ayllu.us/links.htm","",0); Hi All, I have two scripts which I want to try and integrate. I am using a nice gallery script to show thumbnails which are appended to a an image wrapper which on click of the thumbnail shows the larger image in the image wrapper, I am trying to implement cloud zoom which is a plugin which uses image srcs to then point to an anchor href to show another larger zoom image either in the same place.. which is what I am trying to do or in another div beside. I have had to set me img srcs up in a certain way to easily enter some product details. and I need to try an manipulate the code to make it work to suit my file layout. I am using a var= images [ with a series of file locations and info such as below { src: 'romanticabride/thumbs/tn_Shauna.jpg', srcBig: 'romanticabride/images/Shauna.jpg', title: 'Shauna', longDescription: '<b><H1>Shauna</H1></b><br><b>Romantica Of Devon <br><br><h2>Sizes Available:</h2><br> 6 - 32.<b><br><b><br><b><b><b><H2>Colours Available:</h2><b><br>Various<br>Please Enquire Below<br><br><br><br><a href="mailto:tracy@cherishbridal.co.uk?subject=Web Enquiry Regarding Romantica Shauna Bridal Gown"class="enquiry rose glow" >Click To Enquire About This Item </a>' }, what I need is for cloud zoom to work when the main image wrapper is hovered over which means it will need to add a class or when the whichever srcBig: is hovered over it gets wrapped by href to make the script work . one of my pages is http://www.cherishbridal.co.uk/romaticabride.html the cloud zoom script is at http://www.professorcloud.com/mainsite/cloud-zoom.htm.. I am happy to share a jsfiddle with someone or explain further or post some code. Thank you in advance I have a script that works in seamonkey(my html editor) but when I use it in IE8 it says errors happen. Here's the code (the first line is on line 7 of the html file): Code: <script type="text/javascript"> function enlarge(imageNum) { var numToString = ""; if(parseInt(imageNum) < 10){ numToString = "0" + imageNum; } else { numToString = imageNum + ""; } window.open("images/LgScreenshot"+numToString+".jpg","Screenshot "+imageNum,"status=0,height=675,width=900,resizable=0"); } </script> And the errors: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB0.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.3; .NET CLR 3.0.30729) Timestamp: Wed, 10 Feb 2010 14:58:16 UTC Message: Object expected Line: 150 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html Message: Invalid argument. Line: 18 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html does any expert know how to pass parameters in the <script ..> tag? for instance; Code: <script type="text/javascript" src="script.js ?param1=val1¶m2=val2&etc "> in the javascript script.js, how would we read the params after the question mark? for example, google this; google shopping cart /v2_2/cart.js I need to assign a key in the javascript to actually make the javascript work,. I have a bookmark in chrome , a javascript , which actually works when clicked on it .,. but how can i edit it so that i can actually make it work on click a key or combination of keys. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. Thanks in advance ., Nani On this website: http://evancoleman.net/index.php I really like on the top how the menu has like 5 or 6 icons, and when you hover over them it shows a bubble with the name in them. Does anybody know where I can find this script? Thanks. Hello again . If these questions concerning Regular Expressions are inappropriate in this forum please let me know . Thank You. This expression <script[^>]*>.*?</script> matches ... Code: <script type="text/javascript">var cnnIsHomePage = true;</script> but not ... Code: <script type="text/javascript"> var cnnIsHomePage = true; </script> Please , how can i match the latter ? Hi there, I'm not too familiar with js, so I'm asking for help I have this script below which loads flash object after clicking fb like button. My question is how to do it after clicking the fb like button automatically to recognize youtube flash object or an object from another tube site? Is it possible? Thank you in advance! Code: <script type='text/javascript'> window.fbAsyncInit = function() { FB.init({appId: "0000000000000", status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement("script"); e.async = true; e.src = document.location.protocol + "//connect.facebook.net/en_US/all.js"; document.getElementById("fb-root").appendChild(e); }()); FB.Event.subscribe('edge.create', function(href, widget) { setTimeout("playvideo1();", 0); }); function playvideo1() { document.getElementById('playvideo1').innerHTML = '<object ....... </object>'; } </script> |