Recent Questions Xhtml Css Tree
Q: The AJAX sample for tree menu script on website does not have any styling applied at the moment.
I am assuming that it would support full styling with AJAX as well.
Is this correct?
A: You can use any style and templates for the AJAX sample.
Create a menu and set style you need using Individual Item Styles.
To enable AJAX Tree Menu use the following menu parameters:
var tajax=1;
Then set your menu in such way:
var tmenuItems = [
["Javascript/DHTML Tree: XP Style","", "", "", "", "XP Title Tip", "", "0", "", "data-samples/data-ajax5.js", ],
["+Samples Gallery","", "", "", "", "XP Title Tip", "", "0", "0", "", ],
["|Samples Block 1","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
["|Samples Block 2","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
["|Samples Block 3","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
];
Each .js file must contain menuItems variable for the submenu in the following format:
var tmenuItems = [
[text, link, icon1, icon2, icon2, tip, target, itemStyle, submenuStyle, jsFileName],
];
Where jsFileName - .js filename on the server that contains tmenuItems variable for the submenu.
For example:
var tmenuItems = [
["Home","testlink.htm", "", "", "", "Home Page Tip", "", "", "", "", ],
["Product Info","", "", "", "", "Product Info Tip", "", "", "", "data-samples/data-ajax2.js", ],
["Samples","", "", "", "", "Samples Tip", "", "", "", "data-samples/data-ajax4.js", ],
["Purchase","testlink.htm", "", "", "", "Purchase Tip", "", "", "", "", ],
["Support","", "", "", "", "Support Tip", "", "", "", "", ],
["|Write Us","mailto:[email protected]", "", "", "", "", "", "", "", "", ],
];
Q: Is it correct that in javascript treeview menu you can specify your target as a different frame?
A: Yes, you can specify frame name as the target in Javascript/DHTML Tree:
var titemTarget="frame";
Q: I’m trying to setup a simple DHTML MENU (TREE MENU). It works just fine. I just have an issue that I can’t solve.
The parameter “ var tmenuHeight = "0"; Your documentation says the following
-----------
Height of the menu in (px, % or other units).
If the value 0 - the menu sets its height automatically.
If the value is small - scrollbars appear.
In IE it looks fine but I cannot see the menu in Firefox. When I set the parameter to for example 100 then it shows up both in IE and Firefox. But I cannot set a value in pixels. I don’t know how big the menu is because it’s dynamically built. According to your doc I can specify the value in percentage but this doesn’t work. When I set the value to “100%” it doesn’t show up in Firefox again.
How can I solve this issue?
A: Try to set this parameter in the following way:
var tmenuHeight = "auto";
Q: Two more questions, while waiting for this answer:
1) calendarDatePicker.handlers( ['dtEvent', 'dtEvent', {type : 'datetime', format:'%L %d, %Y, %l:%M %p', locale:'en'}] ); is ignoring the date format.
2) If I have a button that in an onclick I want to popup calendar, how would I do that?
3) I am getting 'incorrect copyright', suggestions?
Thank you, I have people waiting for me to bring this site live - your fast help is appreciated
A: >I am getting 'incorrect copyright', suggestions?
You should write NOSCRIPT tag in the following way:
<noscript><a href="http://calendardatepicker.com">Javascript Calendar Date Picker by calendardatepicker.com</a></noscript>
> 1) calendarDatePicker.handlers( ['dtEvent', 'dtEvent', {type : 'datetime',
> format:'%L %d, %Y, %l:%M %p', locale:'en'}] ); is ignoring the date format.
> 2) If I have a button that in an onclick I want to popup the calendar, how
> would I do that?
You should install the calendar in the following way:
<form>
<script>
window.onload = function(){
calendarDatePicker.handlers(['cal', 'txt', {type : 'datetime', IiI:'%L %d, %Y, %l:%M %p', locale:'en'}]);
};
</script>
<input type="button" value="Click to open calendar" id="cal" name="cal" onClick="">
<input type="text" id="txt" value="">
<div id="test-box" style="width:40px;height:40px;position:absolute;left:200px;top:10px;"></div>
</form>