0

I would like to incorporate a help button into my application. The way i see this help button working would be something similar to what is found in windows applications, e.g. The user would click the help button and then click on the component they would like help with.

I was thinking of setting a global listener once the help button is clicked, so that the next onClick fired would be that of the component the user wants help with. I have not yet looked into doing this yet so any suggestions would be great!

Also i would like to hear your oppinnion in which way to approach this problem.

Thanks in advance!

2
  • Not sure i understand - if you're looking for help about UX design, then this isn't the best place to look. If just code help, then i think you need to decide what exactly you want, split the problem into small parts and ask separately about each task, or even better,search for existing answers - I'm sure you'll find them. :)
    – gillyb
    Oct 15, 2012 at 19:14
  • It sounds like you're looking for suggestions more than trying to get a question answered. I would look into jQuery; you can put click events on your components and based on if the help function is active have it do roll overs and what not. Can't really offer anything else without a more specific question. Oct 15, 2012 at 19:16

1 Answer 1

4

i am giving answer assuming jQuery included, well you can go for pure javascript too.

declare a global variable - lets say var helpRequested = false;
assuming that there are few elements on your web page with help provided, lets say you apply css class <div class="help someothercssclass"> ... </div> to all these element,
now subscribe to click event of all these help needed elements

$('.help').click(function(event) {
  event.preventDefault();
  if(helpRequested === true) {
    var id = $(this).attr('id');
    //based on id do your stuff... like provide help through popup window

    helpRequested = false; //finally reset
  }    
});

now subscribe to click event of help button <button id="helpbutton">Help</button> like this

$('#helpbutton').click(function() { 
     helpRequested = !helpRequested ; //toggle the value
});

i guess this will do the work... or something to start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.