Hello,
I added a new item in the radcontext menu using javascript, and this one works, but upon setting the image url of the new item added on the context menu, it does not display the image given the image url using the function set_imageUrl(string image url).
Hopefully you can help me with this problem.
Hope to hear from you soon.
Greetings,
~cLyde~
I added a new item in the radcontext menu using javascript, and this one works, but upon setting the image url of the new item added on the context menu, it does not display the image given the image url using the function set_imageUrl(string image url).
Hopefully you can help me with this problem.
Hope to hear from you soon.
Greetings,
~cLyde~
7 Answers, 1 is accepted
0
Hi Clyde,
I am not able to replicate this issue at our side. Could you please paste a sample code here, so we can examine it? Thanks
Regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am not able to replicate this issue at our side. Could you please paste a sample code here, so we can examine it? Thanks
Regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
calai
Top achievements
Rank 2
answered on 08 Dec 2008, 02:14 AM
var nodeValue = node.get_value();
var nodeArray = nodeValue.split("*");
var newItem = new Telerik.Web.UI.RadMenuItem();
if (nodeArray[2] == "2") // check if cat ID is image(2) then add new item for image as thumbnail
{
contextMenu.trackChanges();
newItem.set_imageUrl("~/Images/edit.gif");
newItem.set_text("Y");
contextMenu.get_items().insert(0,newItem);
contextMenu.commitChanges();
}
*here is my code in adding new item for my rad menu. I've set the image url but, it does not display the image at all.
Thank you in advance.*
Greetings,
~cLyde~
^_^
var nodeArray = nodeValue.split("*");
var newItem = new Telerik.Web.UI.RadMenuItem();
if (nodeArray[2] == "2") // check if cat ID is image(2) then add new item for image as thumbnail
{
contextMenu.trackChanges();
newItem.set_imageUrl("~/Images/edit.gif");
newItem.set_text("Y");
contextMenu.get_items().insert(0,newItem);
contextMenu.commitChanges();
}
*here is my code in adding new item for my rad menu. I've set the image url but, it does not display the image at all.
Thank you in advance.*
Greetings,
~cLyde~
^_^
0
calai
Top achievements
Rank 2
answered on 09 Dec 2008, 10:56 AM
Hello Telerik Team,
I have already figured out why it does not display the image because it can't locate the image url i provided.
I have corrected the image url, and it already displays the image on the IE browser only, not in firefox.
Do you have any idea why is this so? It is because, I tried to copy the url and run it on the mozilla firefox browser, and it displays the image but when assigned to the rad menu item image url, it does not display at all.
Hope someone can help me here with this one. Any help will be greatly appreciated.
Thank you.
Greetings,
~cLyde~
^_^
I have already figured out why it does not display the image because it can't locate the image url i provided.
I have corrected the image url, and it already displays the image on the IE browser only, not in firefox.
Do you have any idea why is this so? It is because, I tried to copy the url and run it on the mozilla firefox browser, and it displays the image but when assigned to the rad menu item image url, it does not display at all.
Hope someone can help me here with this one. Any help will be greatly appreciated.
Thank you.
Greetings,
~cLyde~
^_^
0
Hello Clyde,
Please try to set the image like this:
without "~" sign in the url and tell us how it goes.
Greetings,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please try to set the image like this:
newItem.set_imageUrl("Images/edit.gif"); |
Greetings,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
calai
Top achievements
Rank 2
answered on 10 Dec 2008, 02:21 AM
Hello Yana,
Thank you so much for your latest reply. It does work on both browsers IE and Firefox with out the tilde sign "~".
I have another scenario, I also used to assign on the set_imageUrl(), an UNC path.
ie. //193.0.165.120/130/10.jpg
But it only displays the image on the IE browser not on the Firefox. Do you know the reason why it behaves like this?
Thank you.
Greetings,
~cLyde~
^_^
Thank you so much for your latest reply. It does work on both browsers IE and Firefox with out the tilde sign "~".
I have another scenario, I also used to assign on the set_imageUrl(), an UNC path.
ie. //193.0.165.120/130/10.jpg
But it only displays the image on the IE browser not on the Firefox. Do you know the reason why it behaves like this?
Thank you.
Greetings,
~cLyde~
^_^
0
Hi clyde rose,
This seems to be a browser specific limitation. You can try instead of \\server\image.gif to use file://///server/image.gif
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This seems to be a browser specific limitation. You can try instead of \\server\image.gif to use file://///server/image.gif
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jhonny
Top achievements
Rank 2
answered on 31 Jan 2014, 02:46 PM
Hi Yana, This is working well, Thanks.