<script>
            function submitform(){
                var ourprice = $('channel_our_price').value;
                var marketprice = ourprice + 0.000001
                if (false){}           
<% if "sourcingmap" != edit_channel_name    %>
                marketprice = $('channel_market_price').value;
                 if( !ckeckFloat('channel_market_price') || marketprice <= 0){
                    alert('market price must be greater than zero.');
                    focusOnEdit('channel_market_price');
                }
<%  end    %>
                else if (!ckeckFloat('channel_our_price') || ourprice <= 0 ) {
                    alert ('our price must be  greater than zero .');
                    focusOnEdit('channel_our_price');
                }else if(parseFloat(ourprice) > parseFloat(marketprice)){
                    alert('market price must be greater than or equal to our price.');
                    focusOnEdit('channel_market_price');               
                }else{
                    $('channel_our_price').form.submit();
                }               
            }
function ckeckFloat(elementId){
    var inId1 = $(elementId);
    var inId1_value = inId1.value
    //float regular expresion
    var re = /^[0-9]*\.?[0-9]+$/
    var result = re.exec(inId1_value);
    if (result != null){//" null" is stand for matching failure of regular Expression.
            return true;
        }else{
            return false;
    }
}
</script>

评论
xu_wccq 2007-09-27
<style>

.class_name *{
//color;
font:normal normal normal medium normal "Times New Roman";
letter-spacing:normal;
line-height:normal;
//list-style:disc outside none;
text-align:left;
text-indent:0;
text-transform:none;
white-space:normal;
word-spacing:normal;
//margin:0 0;
padding:0;
}

[title] { color: blue;background-color:; }

.class_name td{
padding:1;
}

li {
color:red;
//list-style:none;
}
</style>
发表评论

您还没有登录,请登录后发表评论

xu_wccq
搜索本博客
我的相册
Ac7ad940-edbc-3b23-8443-5fe2ea338061-thumb
productcenter.bmp
共 2 张
最近加入圈子
存档
最新评论