Page 5 of 28

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Fri Jun 01, 2012 3:27 pm
by luisvasquezcl
Hi again,

new method setget value for controls.

function Value( cid, cvalue ) {
var el = document.getElementById( cid );

switch ( arguments.length ) {
case 1:
el.value; break;
case 2:
el.value = cvalue; break;
}

return el.value;
}

best regards,

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Fri Jun 01, 2012 7:41 pm
by Roberto Lopez
luisvasquezcl wrote:Hi again,

new method setget value for controls.

function Value( cid, cvalue ) {
var el = document.getElementById( cid );

switch ( arguments.length ) {
case 1:
el.value; break;
case 2:
el.value = cvalue; break;
}

return el.value;
}

best regards,
Thanks!

I still working in server communication, when finished, I'll include these new functions on the library.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Fri Jun 01, 2012 8:35 pm
by luisvasquezcl
Estimado,
para solucionar el problema con el control imagen cambia lo siguiente en el archivo hmgscript.js


function Image( cId , cParentId , nRow , nCol , cSrc )
{
Dice : var control = document.createElement( "image" ) ;
Cambiar por : var control = document.createElement( "img" ) ;


Esto soluciona el problema de imagen en Firefox.
Saludos cordiales,

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Fri Jun 01, 2012 10:34 pm
by Pablo César
Cambiar document.createElement( "image" ) ;
por document.createElement( "img" ) ;

Esto soluciona el problema de imagen en Firefox.
Increíble, funciona en FieFox, IE y G.Chrome.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Fri Jun 01, 2012 11:33 pm
by Pablo César
To further mimic the window with the Windows style, I´ve changed at hmgs.xp.css adding border-top-left-radius and border-top-right-radius:

Code: Select all

.window
{
   position                 : absolute                 ;
   background-color         : rgb(236,233,216)         ;
   text-align               : center                   ;
   border                   : 3px solid rgb(2,106,254) ;
   border-top-left-radius   : 0.5em                    ;
   border-top-right-radius  : 0.5em                    ;
}   

.window h1
{
   font-family              : Arial                    ; 
   font-size                : 12pt                     ;
   background               : rgb(2,106,254)           ;
   color                    : white                    ;
   margin                   : 0                        ;
   padding                  : 4px                      ;
   border-top-left-radius   : 0.2em                    ;
   border-top-right-radius  : 0.2em                    ;
} 
It is not working in lower version of IE9, but in G.Chrome, FireFox it´s works !
Image

I have a question, why not use myWindow=window.open("","","width=600,height=400"); ? With it is going to open a windows of OS.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Sat Jun 02, 2012 1:41 am
by Roberto Lopez
luisvasquezcl wrote:Estimado,
para solucionar el problema con el control imagen cambia lo siguiente en el archivo hmgscript.js


function Image( cId , cParentId , nRow , nCol , cSrc )
{
Dice : var control = document.createElement( "image" ) ;
Cambiar por : var control = document.createElement( "img" ) ;


Esto soluciona el problema de imagen en Firefox.
Saludos cordiales,
Gracias!

AHora funciona bien en FF.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Sat Jun 02, 2012 1:58 am
by Roberto Lopez
Pablo César wrote:To further mimic the window with the Windows style, I´ve changed at hmgs.xp.css adding border-top-left-radius and border-top-right-radius:
It looks good!

I've already applied your changes.
Pablo César wrote: I have a question, why not use myWindow=window.open("","","width=600,height=400"); ? With it is going to open a windows of OS.
It is only a design decision, based on that (AFAIK) we has not full control over it. ie: (AFAIK again) you can't make it modal or avoid minimize and maximize buttons, etc. Maybe I'm missing something, since I'm just learning.

More important, being non-modal clicking outside it, it will simply disappear (you must search it at taskbar).

Another consideration is how it behaves in other OSs than Windows.

Anyway, it can be added as an alternate way to do things.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Sat Jun 02, 2012 3:07 am
by Pablo César
I see. Thank you Roberto for clarifying.

I also will see what I can do with Standard ou Win7 style. I saw another frame with rounded border.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Sat Jun 02, 2012 6:07 am
by Roberto Lopez
Hi All,

R005 with this new features:

- Server demo: you must start the included server before test.
- Contrib demo: a separated .html page and .js files for contributed samples.
- Contrib lib: A separated library for contributions.

Spliting the core from contrib (library and demos) will make easier and more effective our work.

I've included Rathi, Luis and Pablo contributions.

The server access requires a lot of work yet... I know :)

Enjoy!

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Sat Jun 02, 2012 6:13 am
by Roberto Lopez
Hi All,

I want to turn the server in a way that no recompile be required.

I'm thinking on make it able to run precompiled .hrb files called from the web client.

Anybody knows how to invoke (run) a .hrb file from an application?

TIA.