兄弟我想通过javascript向asp传值,网上看了一些帖子 自己还是没搞定,请能人看看!~~~map.asp
<SCRIPT LANGUAGE=JavaScript>
function doPassVar(args,ts){
var sendText = args.value;
window.document.map.SetVariable("a", sendText);//a为在flash主体里定义的一个变量
var sendtaishu = ts.value;
window.document.map.SetVariable("b", sendtaishu);//b为在flash主体里定义的一个变量
window.document.map.TCallFrame("playerTime_mc",0);
}
</SCRIPT>
<p><strong>查询系统<br>
</strong>类型:
<select name="SerZhongLei" class="style3" id="SerZhongLei" >
<option value=" " >请选择</option>
<option value="1" >吊车</option>
<option value="2" >项目</option>
</select>
<br>
吨位:
<input name="sendText" type="text" size="10" maxlength="10" >
<br>
车主:
<input type="submit" value="查找" onClick="doPassVar(sendText,SerZhongLei)">
</p>flash中 map.fla
在主体里定义了两个变量
var a;
var b;
在主体中加入了一个剪辑 playerTime_mc_root.select.text = _root.a;//select为主体中的一个文本框
_root.taishu.text = _root.b;;//taishu为主体中的一个文本框
trace(_root.select);
trace(_root.taishu);
我的想法就是把:map.asp中 类型和吨位的值,传给flash中的两个文本框,select和taishu。现在运行 map.asp中总是报错 说map.asp中有"未知名定义",我估计是
window.document.map.TCallFrame("playerTime_mc",0);这一句有问题;
请大家看看!~~~跪求!~~
如小弟还有没说清楚地地方,请留言!~~~
<SCRIPT LANGUAGE=JavaScript>
function doPassVar(args,ts){
var sendText = args.value;
window.document.map.SetVariable("a", sendText);//a为在flash主体里定义的一个变量
var sendtaishu = ts.value;
window.document.map.SetVariable("b", sendtaishu);//b为在flash主体里定义的一个变量
window.document.map.TCallFrame("playerTime_mc",0);
}
</SCRIPT>
<p><strong>查询系统<br>
</strong>类型:
<select name="SerZhongLei" class="style3" id="SerZhongLei" >
<option value=" " >请选择</option>
<option value="1" >吊车</option>
<option value="2" >项目</option>
</select>
<br>
吨位:
<input name="sendText" type="text" size="10" maxlength="10" >
<br>
车主:
<input type="submit" value="查找" onClick="doPassVar(sendText,SerZhongLei)">
</p>flash中 map.fla
在主体里定义了两个变量
var a;
var b;
在主体中加入了一个剪辑 playerTime_mc_root.select.text = _root.a;//select为主体中的一个文本框
_root.taishu.text = _root.b;;//taishu为主体中的一个文本框
trace(_root.select);
trace(_root.taishu);
我的想法就是把:map.asp中 类型和吨位的值,传给flash中的两个文本框,select和taishu。现在运行 map.asp中总是报错 说map.asp中有"未知名定义",我估计是
window.document.map.TCallFrame("playerTime_mc",0);这一句有问题;
请大家看看!~~~跪求!~~
如小弟还有没说清楚地地方,请留言!~~~
解决方案 »
- easyui datagrid能否实现动态表头 动态标题,如附图那样
- nodejs和普通的js是不是不能混在一起写?
- 变量作用域问题。。
- 求教高手!新手js问题……
- 请教大家 我想在td中的文本域放入文字,但是td有背景。我把文本域设置成透明的,但是输入文字的时候文字也是透明的。
- createElement的问题
- 大家来讨论一下,这种效果不错,点击产品图片,出现一个弹出窗口,有人知道这种效果是怎么做的吗
- 如果有两个frame,通过什么方法可以用第一个frame中的按钮来控制打印第二个frame中的内容,急,急,急......,大哥们多多帮忙,谢谢了。
- 在线等待,各位大哥们,帮帮我?
- 跪求!!移动端可拖拽div自动吸附边缘
- 查找IE插件的问题
- 高分真银求IE弹窗代码!
=>
document.getElementById("map") // map <= <object ..... id="map".....
js调用,应该是
document.all.idOrName ->all后面接id或name,也可以这样写document.all("idOrName")
document.getElementById("id"); ->通过id取对象
document.getElementsByName("name"); ->通过name来取对象
<SCRIPT LANGUAGE=JavaScript>
function doPassVar(args,ts){
var obj = parent.document.getElementById("map");//map为flash的id
var sendText = args.value;
obj.SetVariable("a", sendText);
var sendtaishu = ts.value;
obj.SetVariable("b", sendtaishu);
obj.TCallFrame("playerTime_mc",0);
}
</SCRIPT>但问题还是没有解决,仍然出现显示obj.TCallFrame("playerTime_mc",0);有未指明的错误!~~
请二位在给支支招!~~`
_root.taishu.text = _root.b;;//taishu为主体中的一个文本框
trace(_root.select);
trace(_root.taishu);----------------------------------------------------------------
把这段代码放在playerTime_mc的第2帧里去,在playerTime_mc第一帧加上stop();用obj.TCallFrame("playerTime_mc",1);调用脚本