Blackberry Webworks(小部件)JavaScript 和XML/JSON 帮助

发布于 2024-10-17 02:53:13 字数 943 浏览 3 评论 0原文

场景如下...

构建一个 Blackberry WebWorks(小部件),用作远程网站的门户。大多数页面都是远程的。我是用户可定制的主页,用户可以添加信息和链接。

我在使用 JDE 时执行此操作的方法是拥有一个 xml 属性文件,我可以使用所需信息添加/编辑/远程节点,并且每次运行应用程序时我都可以处理该文件。但是,为了让 webworks 应用程序正常工作,我需要通过向 html 页面添加信息来完成这一切。

我相信我需要通过 javascript 来完成此操作,但是我几乎没有 javascript 经验,甚至更少的黑莓 API 经验。

因此,我正在寻找一个从头到尾的示例,说明如何通过 JavaScript 加载保存的 XML 或 JSON 属性文件,以便动态构建我的小部件的主页。此外,我还在寻找如何通过 javascript 从配置文件添加/编辑/删除 xml 或 json 对象的示例。

我一直在寻找,不确定我是否走在正确的道路上,但我没有运气。我看过一些如何在 microsoft/mozilla 浏览器中编辑 XML 的示例,所以我不确定这是否相同......如果是这样,只是寻找一些确认。

基本上,这是我的头脑告诉我需要发生的事情的概述......

<html>
...
<script>
//Read XML/JSON Properties file
// For each item loaded process and publish html source code
</script>
...
<!-- HTML to add desired information back to properties file -->
<script>
// Perform insert/edit/delete of XML/JSON
</script>
...
</html>

感谢您的帮助! -JD

Here is the scenario...

Builing a Blackberry WebWorks (widget) that is used as a portal to a remote website. Most of the pages are remote. I am user customizable homepage that users can add information and links.

The way I would do this in using the JDE is to have an xml properties file that I could add/edit/remote nodes with the desired information and everytime the app would run I could process that file. However, for the webworks app to work, I need to accomplish this all via adding information to the html page.

I believe that I need to do this via javascript, however I have little javascript experience and even less blackberry API experience.

So I am looking for a beginning to end example of how to load a saved properties file either XML or JSON via JavaScript that can dynamically build the homepage of my widget. In addition, I am looking for examples of how to add/edit/remove the xml or json objects from the config file via javascript as well.

I have searched and searched, not sure if I am on the right track or not, but I have had no luck. I have seen some examples of how to edit XML in microsoft/mozilla broswers, so I am not sure if this is the same or not... If so just looking for some confirmation.

Basically here is an outline of what my head tells me needs to happen...

<html>
...
<script>
//Read XML/JSON Properties file
// For each item loaded process and publish html source code
</script>
...
<!-- HTML to add desired information back to properties file -->
<script>
// Perform insert/edit/delete of XML/JSON
</script>
...
</html>

Thanks for your help!!!
-JD

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花桑 2024-10-24 02:53:13

我不确定您想要构建什么,以及您的问题是什么。你能解释一下吗?

您可以在此处开始查看官方 Blackberry Webworks 文档和一些工作示例:http://us. blackberry.com/developers/browserdev/learningresources.jsp

最好!

I'm not sure what do you want to build, and what is your question. Could you explain yourself?

You can start looking at official Blackberry Webworks documentation and some working examples here: http://us.blackberry.com/developers/browserdev/learningresources.jsp

Best!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文