View Full Version : OminiSlide Problem

why not
02-02-2008, 11:29 AM
hi . i have problem with this script : http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm
Problem : i have a javascript link for ajax page load so now not work with OmniSlide . Example : for load each page ( link ) I have : <A class=menu
href="#">example </A> <= this link load page for ajax page !!
NOW how to import this link in OmniSlide Script ( work with Omniscript ) ??? Thanks for support . im waiting for reply

02-02-2008, 03:37 PM
Is the class attribute significant? If not, you have two basic choices:

1 )

menuItems:[ // REQUIRED!!
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Menu"], //create header
["example", "javascript:page_loader('example.php')", ""],
["What's New", "http://www.dynamicdrive.com/new.htm",""],
["What's Hot", "http://www.dynamicdrive.com/hot.htm", ""],
["Message Forum", "http://www.dynamicdrive.com/forums", ""],
["Submit Script", "http://www.dynamicdrive.com/submitscript.htm", ""],
["Link to Us", "http://www.dynamicdrive.com/link.htm", ""],

This will (when clicked) disable the animation of animated .gif's on that page (if any) in IE though, and perhaps disrupt other ongoing processes on a page in IE, this is due to a strict, but somewhat quirky interpretation on IE's part of what (the HTML code that would result from my above example):

<a href="javascript:page_loader('example.php')">example</a>

means. Very often this isn't an issue though (there aren't animated .gif's on the page or any other ongoing processes that this interrupts), and it is a simple way to carry out the operation.

2 ) This method is a bit more complicated, but safer. You can use the script's design_mode property set to true to see the menu's generated HTML and styles. Once you get them, you can copy and edit the HTML to be anything that you like, then use it instead of the script generated HTML by setting design_mode back to false, user_defined_markup to true, and placing your edited markup on your page. Incidentally, with this second method, you could include the class attribute if it is required.

02-04-2008, 05:12 PM
I've been looking into this a bit further, and we can avoid the potential problem of method one in IE by altering this line in mmenu.js:

tb+='<td '+(i_tem==o.menuItems.length-1&&!o.wrapbar&&o.menupos!='top'? 'id="'+o.id+'lastrow" ' : '')+'colspan="'+(o.menuItems[i_tem][3]&&o.menuItems[i_tem][3]!==''? o.menuItems[i_tem][3] : o.d_colspan)+'"><a href="'+o.menuItems[i_tem][1]+'" target="'+(o.menuItems[i_tem][2]? o.menuItems[i_tem][2] : o.linktarget)+'">'+o.menuItems[i_tem][0]+'</a></td>'


tb+='<td '+(i_tem==o.menuItems.length-1&&!o.wrapbar&&o.menupos!='top'? 'id="'+o.id+'lastrow" ' : '')+'colspan="'+(o.menuItems[i_tem][3]&&o.menuItems[i_tem][3]!==''? o.menuItems[i_tem][3] : o.d_colspan)+'"><a href="'+o.menuItems[i_tem][1]+'"'+(/^javascript:/.test(o.menuItems[i_tem][1])? ' onclick="'+o.menuItems[i_tem][1].replace(/^javascript:/,'')+';return false;"' : '')+' target="'+(o.menuItems[i_tem][2]? o.menuItems[i_tem][2] : o.linktarget)+'">'+o.menuItems[i_tem][0]+'</a></td>'

To avoid confusion, it is the first of only two rather long lines in the file that begin with:


This won't help you with the class name though. However, if it is only for styling the link, you can set the links style with the menu's properties and styles. If it is used for some other purpose, either your page_loader() function could be changed to get the information represented by the class attribute in another way, or you could still use the second method mentioned in my previous post.

Note: Using this modification to the mmenu.js file will create a link something like:

<a href="javascript:page_loader('example.php')" onclick="page_loader('example.php');return false;">example</a>

why not
02-05-2008, 12:39 PM
wow ! thanks men . my page work with this script ! Now problem with other script . Please See this typic . . . [ http://www.dynamicdrive.com/forums/showthread.php?p=129208#post129208 ] i with <a href="javascript:page_loader('example.php')">example</a> load external page in index page !! but not work this script : Typing Text Script . what's problem ?? thanks men