Srikkanth Mohanasundaram

Ranch Hand
+ Follow
since Feb 07, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Srikkanth Mohanasundaram

Thanks Dinesh. I'm using image mapster for now. But this library is not actively maintained , the last release was way back in 2012. I'm not sure if there are newer libraries written which would probably have more features like adding an overlay text etc.,

I also used gimp to generate the image maps. It wasn't really tough...
Hi Paul,
Thanks for your reply.

I did read about the map , area tags which can be used to define a region on an image. There are a couple of questions though

1. The examples which i see basically include href attributes in the area, so when you click on an area it would behave like an hyperlink. I'm wondering if the area element supports click , ondrop events like other HTML elements.
2. Is there a tool which can generate the polygon co-ordinates for the area elements, hand-crafting this looks very tedious.

Thanks
Srikkanth
Hello all,

I'm working on a health application which would have a capability to register wounds on the body by clicking on an image. If the user clicks on point in the image it should be able to tell the corresponding body part. I think, in theory, the way to go is create a SVG image and create multiple regions and have javascript interact with it. But can you guys give me pointers like

1. How should i create this complex SVG image ? What would be the tool and how can i maintain this co-ordinate and the body part mapping ?
2. What is the best option ( or the best hacky approach ) out there to achieve this sort of functionality with Javascript ?


Thanks
Srikkanth
Hi Arushi,

ajaxStart is a global ajax event handler ( think of it as a configuration which needs to be done only once ). If you're doing it thrice the last executed code is going to override the previously setup configuration. If you want to show different images based on forms , the handler function should do some work to identify who triggered the ajax call and make the decision as to what image needs to be shown.

Thanks
Srikkanth
Hi Partheban,

I'm not familiar with angular datatables ( sure there's a ton of directives out there trying to things with tables ). But what did you specifically try with this library , show us some code and we'll be able to help ?

I think angular js offers search only for visible columns(correct me if I am wrong)

Not correct. AngularJS doesn't have any search capabilities built-in ( sure it does have filters but most likely you might want to extend it)
Ok. This means the "timesheetdisplay" function which you are trying to execute is not loaded in the memory, make sure your javascript files which contains this function is included. I would really clean up the code , a function with 10 parameters or more really calls for it. ?

Ahsan Bagwan wrote:
I meant the routes placed inside the <a> tag.



I"m still not sure which links you're talking about. Links to view1 and view2 ?

Thanks
Srikkanth

But subsequently after a few seconds "Ask" request is also fired



The problem lies in this piece of code in view1.html.



You've added a controller to the section of the DOM and the constructor of "View2Ctrl" is being called.

Also clicking on links for views in index.html also does not seem to respond and direct me to a view.


which links in here ?

Thanks
Srikkanth
Hi Devaka,

Another issue which i noticed.
Steps to reproduce
1. Click on a user's profile.
2. Go to the users posts.
3. Try to filter the user's posts by a forum.
4. The link is broken ( https://coderanch.com/posts/listByUser/-1/0/{userId} instead of https://coderanch.com/forums/posts/listByUser/-1/0/{userId} )

If you want i can add some screenshots later tonight.

-- Srikkanth
9 years ago
Hi Mayuran,

I haven't tried this out myself but from the documentation, there are a couple of things which you might want to try out

1. Set a timeout.
2. Or send an instruction from the code that this appender is no longer needed.

..., it may be easier to pinpoint a location in your code after which a nested appender is no longer needed. If such a location exists, even approximately, log from that location using the FINALIZE_SESSION marker.




Thanks
Srikkanth
9 years ago
Kishor,

I want to give admin permission to add and delete a post while other can only read that.



Why do you need to model for this in the database ?

One approach I am thinking is based on UserLevel for permissions.


Yes the calling application checks the permission before it issues an update / delete query.

Thanks
Srikkanth
Why are you accessing the jsp files directly ? It should go inside the WEB-INF folder, they are meant to be used as view files.

But here are the steps that you might need to create a Filter.

1. Create a CustomFilter class which implements Filter interface. ( Rename the class based on your requirements )
2. Implement the doFilter() method
3. In the doFilter() method, check if the user session has an indicator which tell you if he's an admin or no, if not an admin redirect. HttpResponse has methods for redirecting.
4. Configure the filter in your web.xml. This is two step, you define your filter and you also define the URL-mapping mentioning the requests which this filter needs to handle. If all requests has to pass through this filter, you need to use a *.


-- Srikkanth
9 years ago
JSP

what is risk of using getServletContext()?



There's one ServletContext which is share by the web app. Whereas a HttpSession object is created for each user session. So where do you think you'll keep your session attributes ?

Search this forum , and you'll find this question answered a lot of times.

-- Srikkanth
9 years ago
JSP