PDA

View Full Version : How to integrate existing code with Sencha



ssdesign
27 Jun 2010, 11:16 PM
I have a existing webpage that I want to display in one of the tabs using Sencha.

The existing page has its own JS scripts which the page needs to use.

For example.
My page needs to be like this:

<div id="translControl">Type in <select id="languageDropDown" onchange="javascript:languageChangeHandler()"></select></div>

so I added the required JS files in the head of my html page.
Then in my index.js file, I did this


{ iconCls: 'download',
title: 'Download',
html: 'Select <select id="languageDropDown" onchange="javascript:languageChangeHandler()"></select></div>',
cls: 'card2' },

As you can see, I have an "onChange" on a select element.

When I run this page, the select box is empty.
Is it supposed to be done like this or I am doing it wrong?

I would like to know if external webpages can be loaded in the tabs.

Any help is greatly appreciated.

Thanks

TommyMaintz
28 Jun 2010, 12:45 PM
In HTML you need to specify <option> tags inside a select control.

ssdesign
28 Jun 2010, 5:58 PM
Thanks, I realised that my problem is I am trying to use Google Transliteration JSAPI, which does not seem to work with Sencha.

Has anyone tried to work with Google JSAPI? Is there any place I can refer to on how to integrate Sencha with it?