Skip to main content

Having a problem with jmaki's ext menu widget

8 replies [Last post]
wildbull
Offline
Joined: 2007-10-17

hi guys,

I lately used the jmaki's ext menu widget...
Very nice design I must say..
But got a problem......Consider the following code..

wat does this "url" mean.... does this mean that it goes to the jsp that is defined in the server... When this Page is seen in the browser and onclick event of the item i cannot redirect the page to the desired webpage.. the link shown is to the same jsp with a "#" sign....

Another problem that i have is :I have dynamically created a variable in javascript of the same file that creates a link to another page How do i pass that variable to the widget...

I think that i can pass the link to another jsp or servlet using an ajax request and then make a json object and pass it to the url of menu widget..

Please help me ...

Thanks a lot.........

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
carlavmott
Offline
Joined: 2005-02-10

To set the href you do that in label property. You should be able to say

{label: 'item 1', href: 'http://ajax.dev.java.net'}

Is that not working? Not sure what you mean by pass a javascript variable to a widget. Please
provide more info.

Thanks,
Carla

wildbull
Offline
Joined: 2007-10-17

hi carla...
Well i had mentioned it in the first post above...
I have a page say 'page1.jsp' and there are a number of check boxes...
When the user clicks on any one of the checkbox a java script runs which will construct the link depending on which check box was checked... and the newly constructed link to the next page is stored in the javascript variable say"link".

Now i have a jmaki widget i.e. ext menu .... which will have a dropdown containing the respective link that was constructed....

So my question was... how do i pass on the variable "link" as href to those items in the drop down.....

Please help....
Its urgent
Thanks ....

carlavmott
Offline
Joined: 2005-02-10

ok. you want to "pass" the value of the href to the menu after it has been constructed. Is that right? Menus don't subscribe to topics so can't receive data. A tree would do what you are saying if I understand you correctly. Please verify.

Thanks,
Carla

wildbull
Offline
Joined: 2007-10-17

I think u haven't understood me .... I have a menu that has items in it...
Now ... when the user clicks on those items it is supposed to take the user to the page mentioned by the href in that widget... Now i want to change that href value to the constructed link...
Thanks ...
Sam..

gmurray71
Offline
Joined: 2003-07-31

Hi,

This is an older version of jmaki and we updated the naming to be a little more clear:

Today we use "href" to mean a link you can navigate to which is what url means in this case I belive

What version of jMaki / Ext are you using? I'd like to know before I go into too much more detail.

You can find out the version of jMaki by looking at the jmaki-uncompressed.js file for jmaki.version.

In the /resources/ext/menu/widget.json file there will be the version of the Menu widget.

Once I've got that information I can help a little more.

-Greg

wildbull
Offline
Joined: 2007-10-17

Hey greg ... thanks for the prompt reply...
Well i checked that out... the version was .9

and this is wat i saw ::
'name': 'Menu',
'type': 'extjs',
'version': '.9',
'jmakiVersion': '.9',
'image': 'images/ext-menu.jpg',
'description': 'A menu widget.',

I use netbeans 5.5 and had recently updated the jmaki plugin...went to module manager..
it shows jmaki ajax support version 1.6.11

wildbull
Offline
Joined: 2007-10-17

hi

I also wanna know how to pass a javascript variable to a widget and set the href of the widget menu ....

wildbull
Offline
Joined: 2007-10-17

hi guys i need help very soon ....
Times running out.....