|
|
I have a drop-down menu:
<select name="clas" tabindex="6" STYLE="color: black; font: 8pt Verdana, Arial, Helvetica, sans-serif;">
<option value="1">First</option>
<option value="2">Business</option>
<option value="3">Economy</option>
<option value="4">Premium Economy</option>
</select>
I have a asp variable with a value of either 1,2,3 or 4.
How to i set the SELECTED value as the one that matches the ASP variable value.
e.g.
theclass = request("class")
response.Write "the class = "&theclass&"<br>"
gives me 3. How do i make <option value="3">Economy</option> the selected value?
Picco
|
|
|
|
<option value="3" selected>Economy</option>
<%
...
if(selected check) Response.Write(" selected")
....
|
|
|
|
|
|
|
|
In Notepad, create an HTML document with the HTML and head tags. Put this script in the head:
<script type="text/javascript">
function changeTheBox() {
var changeNum = parseInt(changer.value);
setTheBox(changeNum);
changeNum = changeNum + 1;
if (changeNum > 3)
{
document.all("changer").value = "0";
}
else
{
document.all("changer").value = changeNum;
}
}
function setTheBox(val) {
document.all("clas").selectedIndex = val;
}
</script>
Then, put this in between the body tags:
<select name="clas" tabindex="6" STYLE="color: black; font: 8pt Verdana, Arial, Helvetica, sans-serif;">
<option value="0">First</option>
<option value="1">Business</option>
<option value="2">Economy</option>
<option value="3">Premium Economy</option>
</select>
<input type="button" value="Change the Value" onclick="changeTheBox();" />
<input type="text" value="0" id="changer" name="changer" />
|
|
|
|
u jst simply dwnload a s/w for this its... sothink dtml
try it its really work awesome for drop down menu
|
|
|
|
u jst simply dwnload a s/w for this its... sothink dtml
try it its really work awesome for drop down menu
|
|
|
|
u jst simply dwnload a s/w for this its... sothink dtml
try it its really work awesome for drop down menu
|
|
|
|
in what I am proposing we don't need to find matching nodes, we just need to check if the element that generated the event matches a given selector. If the element has not been parsed yet (ex: page not completely loaded) it can not generate events real estate companies. When the node will be loaded or appended/inserted in the DOM it will react to the events we attached to the selector for it. We can still check for this kind of complex selectors "li.menu:last-child", if we can do it fast enough, however my proof of concept doesn't need to go so far... Dean this should be old stuff for you seen the fastest IE selectors implementation I have seen to date....This is a cross-browser solution (some limitations due to lighter selector engine).
@Peter,
you have completely focussed my need in this matter and a quick look to what you have posted above let me believe the method will be good. Let me put some test online so you can see this concept at work and I can test the speed.
I would really like to solve also for non bubbling events, I have a couple of ideas. However I knew from the start there will be some limitations with this solution. Now let see how far we can go. I will first concentrate in correcting some bugs with my current selector engine and see what method achieve better performances. I would say I am already at a very good point, but being a dumb ass programmer I asked your help student loan consolidation.
I like very much jQuery concise syntax but I still believe the "$find " method is slow by concept for this implementation. John...it is still the fastest between the working selector engines, don't worry...this is completely another method similar to Behaviors but not quite like it. It has improvements over it but it will not do all of what Behavior does at least not syntactically (not yet).
The other option we have to evaluate is: instead of passing a selector, we would be passing an object with the properties/values we want to check:
({
id: 'test',
className: 'test', secured credit card
nodeName: 'table',
younamedit: '100px'
})
For speed concerns, the above was the way I would like to extend my concept before giving a try to selectors. Now after seeing your "match.js" I understand that also complex selectors can yeld good results. Peter, thank you again for writing that on specific request, I hope I can give back to FORK in some way...
As soon as I can, I will have samples online with your "FORK.match" instead of my bad hack on Simon Willison good code. You will find the new tests at the end of the test cases list, I will also include duplicated test cases for Dean cssQuery and John jQuery...
At the moment, only my original NWEvents Delegate tests are available online, see here:
NWEvents
and click on the "Event Delegate" test case at the bottom. forex trading
|
|
|
|
|
|
|
|