[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2013-01-26
3
Medium Priority
?
384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

650 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