使用ajax api完成documnet正文翻译后,组合框选择正在消失 [英] Combo box selection is disappearing after documnet body translation is done using ajax api

查看:80
本文介绍了使用ajax api完成documnet正文翻译后,组合框选择正在消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我在我的网页上有组合/下拉框,一旦我使用ajax api转换页面,我就失去了我的选择,它总是在组合/下拉框中选择第一项。
Microsoft.Translator .translate(document.body,"en","es");

感谢

Venkat Nayineni

Hey,
I have combo/dropdown boxes in my web page and once I transulate the page by using ajax api then I am loosing my selection and its always select first item in the combo/dropdown box.

Microsoft.Translator.translate(document.body,"en","es");

Thanks

Venkat Nayineni

推荐答案


嘿,我的网页上有组合/下拉框,一旦我转移使用ajax api的页面然后我放弃了我的选择,它总是在组合/下拉框中选择第一项。



我的小部件也有同样的问题。我加载了一个类似"编辑我的个人资料"的页面其中包括预先添加了与用户在数据库中的选择相匹配的选项的下拉框(使用Value =来自下拉列表,而不是用户看到的字符串)。如果我用英文加载页面,我看到选择是正确的。当我使用窗口小部件翻译成另一种语言时,选择将丢失。如果我然后提交该页面,我的验证人会给出一条错误消息,例如"请选择一个国家/地区"。表示未进行选择。 (我在列表中首先有一个虚拟值。)


I have the same problem with the widget. I load a page like "edit my profile" that includes dropdown boxes pre-seeded with selections that match the user's choices in the database (using Value= from the dropdown, not the string the user sees). If I load the page in English I see that the selection is correctly made. When I translate to another language using the widget, the selection is lost. If I then submit the page, my validators give an error message like "please select a country" indicating the selection wasn't made. (I have a dummy value first in the list.)

为什么会发生这种情况,我需要做些什么来防止它?

Why does this happen and what do I need to do to prevent it?


这篇关于使用ajax api完成documnet正文翻译后,组合框选择正在消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆