PDA

View Full Version : [SOLVED] How to correctly instantiate/use designer made viewports?



RKoopmans
24 Mar 2010, 1:29 AM
I fixed it, took a break and then found out that there was a "mockup" folder in which i could find the index.js :-) thanks for the help!

Hello,
i'm a newbie to ExtJS (at least the designer, and using this in an ASP webapp). I really like the quick and easy creation of a page. But when I load it in an ASPX page, all i see is white. The problem is, I think, that I don't know how to instantiate / use my own custom "MyViewport".
Here is my code for adding the scripts and css to my masterpage

<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<linkreltype="text/css"href="css/ext-all.css"/>
<script type="text/javascript" src="extjs/ext-base.js"></script>

<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="extjs/MyViewport.ui.js"></script>
<script type="text/javascript" src="extjs/MyViewport.js"></script>
</head>

Again, I am probably forgetting something, but that's why I'm still a newbie in ExtJS :((;)
This is what happens:

realjax
24 Mar 2010, 1:59 AM
Try adding a space bewteen 'script' and 'type'....

Condor
24 Mar 2010, 2:00 AM
The order of .js files is wrong (see here (http://www.extjs.com/learn/Overview#What_is_the_proper_include_order_for_my_JavaScript_files.3F)).

RKoopmans
24 Mar 2010, 2:03 AM
Try adding a space bewteen 'script' and 'type'....
Thanks but no help. When I looked in my masterpage I noticed the copy pasting must have gone wrong, since there are spaces in the actual masterpage..

The strange thing is, when using these filse (myviewport.ui.js and the myviewport.js) the project crashes on those two files..

realjax
24 Mar 2010, 2:04 AM
Yep, its the order like Condor said

RKoopmans
24 Mar 2010, 2:06 AM
The order of .js files is wrong (see here (http://www.extjs.com/learn/Overview#What_is_the_proper_include_order_for_my_JavaScript_files.3F)).
thanks, page now loads correctly, doesn't display anything, but that's probably my own fault. Thanks!