Solved

How do I set up a client-side combo box selection and response feature

Posted on 2013-01-26
3
343 Views
Last Modified: 2013-11-19
Dear Experts,

I would like to set up a feature on my webpage that identifies the person/people in our organization that can assist a user with their concern.

The code below is what I currently have set up. When a user clicks a 'challenge' in the dropdown the page will automatically go to the person that can assist. The problem is that there might be more than one person that can assist.

What I would like to do (of course if you see a better solution let me know) is set up a memo box object that would 'fill in' all the people or person who could assist with this concern. The syntax would have to be client site as I do not have server side scripting capabilities at the moment. Perhpas XML? Bottom line is if the user picks the first option "logging into the network" the memo box or div would populate with names and contact information for those individuals who could assist.

Any ideas you could suggest would be most helfpul. Thanks!

<SELECT onchange="window.location.href=this.options[this.selectedIndex].value">
<OPTION VALUE="#iss">Select an response</OPTION>
<OPTION VALUE="#smith">logging into the network</OPTION>
<OPTION VALUE="#johnson">replacing computer ink</OPTION>
<OPTION VALUE="#ladden"></OPTION>
</SELECT>


<div id="smith"></div>
<div id="iss_info">
<img src="images/female-icon.png" />
<p class="boxTxt"><span class="name">Terri Smith</span> <span class="title"> - IT Specialist</span><br />
  How can I support you....<br />
    &raquo; &nbsp;Here is where I would write Ms. Smith responsibilities in the organization and contact information.
 </p>

Open in new window

0
Comment
Question by:shogun5
  • 2
3 Comments
 

Author Comment

by:shogun5
ID: 38823144
I suppose I could use something like this but I would need to populate a text box or memo box with the string. How would I do this?

function PrintValues(){

  var myString = document.mainform.file.value
  var myStringLength = myString.length
  var Comma = myString.lastIndexOf(',')
  var SufNumChars = Comma + 1

  document.who.result.value=('');

  for(i=0; i<Comma; i++) 
  document.who.result.value+=(myString.charAt(i));

  document.who.result.value+=(' ');

  for(i=SufNumChars; i<myStringLength; i++) 
  document.who.result.value+=(myString.charAt(i));

}
</script>




<form name="mainform">
<select name="file" size="1" onchange="PrintValues();"  target="_parent._top" onmouseclick="this.focus()">
  <option value="Joe,Yin">First Option</option>
  <option value="Hi,Me">Second Option</option>
</select>
</form>




<form name="who">
<textarea cols="40" rows="5" name="result">

</textarea>
</form>

Open in new window


Is there is better way to do this?
0
 
LVL 11

Accepted Solution

by:
mcnute earned 500 total points
ID: 38824030
The html file is retreiving values from within the xml file according to the selected value. Enjoy!
index.html
area-support.xml
0
 

Author Closing Comment

by:shogun5
ID: 38825090
Yep! Worked like a charm! Thanks!

Cheers!

Mike
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now