|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 04/07/2009 at 07:41AM PDT, ID: 24302164 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: |
index.html contains:
<html>
<head>
<script language="javascript">
var xhttp;
function onSelectionChange(){
var mySelect = document.forms[0].portfolio;
if (mySelect.selectedIndex>-1){
//instantiate XmlHttpRequest
// Checking if IE-specific document.all collection exists
// to see if we are running in IE
if (document.all) {
xhttp = new ActiveXObject("Msxml2.XMLHTTP");
} else {
// Mozilla - based browser
xhttp = new XMLHttpRequest();
}
//hook the event handler
xhttp.onreadystatechange = HandlerOnReadyStateChange;
//prepare the call, http method=GET, true=asynchronous call
xhttp.open("GET",
"http://localhost/category_test/getcats.aspx?portfolio=" +
mySelect.selectedIndex, true);
//finally send the call
xhttp.send();
}
}
function HandlerOnReadyStateChange(){
var mySelect = document.forms[0].analyst;
// This handler is called 4 times for each
// state change of xmlhttp
// States are: 0 uninitialized
// 1 loading
// 2 loaded
// 3 interactive
// 4 complete
if (xhttp.readyState==4){
mySelect.innerHTML = "";
//responseXML contains an XMLDOM object
var nodes = xhttp.responseXML.selectNodes("//employee");
for (var i=0; i<nodes.length; i++){
var o = new Option();
o.text = nodes(i).text;
mySelect.add(o);
}
}
}
</script>
</head>
<body>
<form id="form1" name="form1" action="showresults.aspx">
<table>
<tr>
<td>Portfolio size:</td>
<td>
<select id="portfolio" name="portfolio"
onchange="onSelectionChange();">
<option></option>
<option>0 .. 10,000</option>
<option>10,000 to 100,000</option>
<option>Over 100,000</option>
</select>
</td>
</tr>
<tr>
<td>Authorized financial analyst:</td>
<td>
<select id="analyst" name="analyst">
</select>
</td>
</tr>
<tr>
<td>Comments</td>
<td>
<textarea name="comments" rows="3" cols="20"
ID=Textarea1></textarea>
</td>
</tr>
</table>
<input type=submit>
</form>
</body>
</html>
getcats.aspx contains only:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="getcats.aspx.vb" Inherits="HTUSearch.getcats" %>
getcats.aspx.vb contains:
Imports System.IO
Imports System.Xml
Partial Public Class getcats
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim xmlWriter As XmlTextWriter
Response.Clear()
Response.ContentEncoding = Encoding.UTF8
Response.ContentType = "text/xml"
Using tw As TextWriter = New StreamWriter(Response.OutputStream, Encoding.UTF8)
xmlWriter = New XmlTextWriter(tw)
xmlWriter.WriteStartDocument()
xmlWriter.WriteStartElement("employees", "employees", "")
xmlWriter.WriteStartElement("employee", "employee", "")
xmlWriter.WriteAttributeString("id", "", "1")
xmlWriter.WriteValue("Test 1")
xmlWriter.WriteEndElement()
xmlWriter.WriteStartElement("employee", "employee", "")
xmlWriter.WriteAttributeString("id", "", "2")
xmlWriter.WriteValue("Test 2")
xmlWriter.WriteEndElement()
xmlWriter.WriteEndElement()
xmlWriter.WriteEndDocument()
End Using
xmlWriter.Close()
End Sub
End Class
|
Advertisement