Re: EMY - receiving an asynchronous request

2018-03-24 Thread Remi Grumeau
Why not use emy.ajax?

Usage is really easy

var urlToSend = “http://mydomain.com/“;
var param = {“foo”:”bar”, “test”:true};

emy.ajax(urlToSend, param, “get”, function(success){
// do what you want with the success text callback
},function(error){
// if a problem or timeout occurred 
});

Any custom needs this method doesn’t have that you needed ?
What it doesn’t support for ex is file upload (ishould create a plugin for 
that...)

Remi

> Le 22 mars 2018 à 15:19, Rune Back  a écrit :
> 
> I have only ONE section:
> 
>  data-hidebackbutton="true">
> 
> In the function goingTo(val) I also have 
> document.getElementById("viewTitle").innerHTML=getTitle(val) which updates 
> the title, so the user gets the feeling of moving between different screens. 
> I don't use emy.ajax(), but I have made my own function for it.
> 
> R
> 
> 
> 2018-03-22 12:08 GMT+02:00 Remi Grumeau :
>> 
>>> I like Emy.
>> 
>> Me too :)
>> 
>> 
>>> I use callbacks only in order to send/receive something to/from another App 
>>> via the server. I've also made it possible for making  a backup of the ldb 
>>> in the server and of course to retrieve the ldb from there. At leat 95% of 
>>> my code is JavaScript. I tiny little bit of my code is in the server.
>>> 
>>> The link may look like this: href="javascript:goingTo(11);"
>>> 
>>> In goingTo(val) I have switch (val) ...
>>> ...
>>> case 11: MAKE_MAIN(); break
>>> ...
>>> MAKE_MAIN() stuffs the html code into a variable dump, and finally I have
>>> document.getElementById("HOME").innerHTML=dump
>>> 
>>> I have two variables "comingFrom" and "whereAmI". I have a back button up 
>>> in the right corner with goingTo(comingFrom). As I already mentioned, it's 
>>> very fast.
>>> 
>>> If not Emy, what then?
>> 
>> If you use emy.ajax() for the ajax calls, emy.$ for selectors or other 
>> screens transitions to the rest of the app, or simply like the UI themes, 
>> then stick with it :)
>> https://emy-library.org/documentation/latest/core-documentation.html#emy-ajax
>> https://emy-library.org/documentation/latest/core-documentation.html#emy-$
>> --> document.getElementById("HOME") can be emy.$(‘#HOME’) or 
>> emy.getSelectedView() if you are on this view.
>> 
>> 
>> If not, then you probably don’t need a library at all to just pull / push 
>> data from a server.
>> 
>> Remi
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "iPhoneWebDev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to iphonewebdev+unsubscr...@googlegroups.com.
>> To post to this group, send email to iphonewebdev@googlegroups.com.
>> Visit this group at https://groups.google.com/group/iphonewebdev.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to iphonewebdev+unsubscr...@googlegroups.com.
> To post to this group, send email to iphonewebdev@googlegroups.com.
> Visit this group at https://groups.google.com/group/iphonewebdev.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.


Re: EMY - receiving an asynchronous request

2018-03-22 Thread Rune Back
I have only ONE section:

**

In the *function goingTo(val)* I also have
*document.getElementById("viewTitle").innerHTML=getTitle(val)* which
updates the title, so the user gets the feeling of moving between different
screens. I don't use *emy.ajax()*, but I have made my own function for it.

R


2018-03-22 12:08 GMT+02:00 Remi Grumeau :

>
> *I like Emy.*
>
>
> Me too :)
>
>
> I use callbacks only in order to send/receive something to/from another
> App via the server. I've also made it possible for making  a backup of the
> ldb in the server and of course to retrieve the ldb from there. At leat 95%
> of my code is JavaScript. I tiny little bit of my code is in the server.
>
> The link may look like this: *href="javascript:goingTo(11);"*
>
> In *goingTo(val)* I have *switch (val)* ...
>
> ...
> *case 11: MAKE_MAIN(); break*
> ...
>
> *MAKE_MAIN()* stuffs the html code into a variable *dump*, and finally I
> have
> *document.getElementById("HOME").innerHTML=dump*
>
> I have two variables "comingFrom" and "whereAmI". I have a back button up
> in the right corner with goingTo(comingFrom). As I already mentioned, it's
> very fast.
>
> *If not Emy, what then?*
>
>
> If you use emy.ajax() for the ajax calls, emy.$ for selectors or other
> screens transitions to the rest of the app, or simply like the UI themes,
> then stick with it :)
> https://emy-library.org/documentation/latest/core-
> documentation.html#emy-ajax
> https://emy-library.org/documentation/latest/core-documentation.html#emy-$
> --> document.getElementById("HOME") can be emy.$(‘#HOME’) or
> emy.getSelectedView() if you are on this view.
>
>
> If not, then you probably don’t need a library at all to just pull / push
> data from a server.
>
> Remi
>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to iphonewebdev+unsubscr...@googlegroups.com.
> To post to this group, send email to iphonewebdev@googlegroups.com.
> Visit this group at https://groups.google.com/group/iphonewebdev.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.


Re: EMY - receiving an asynchronous request

2018-03-22 Thread Remi Grumeau

> I like Emy.

Me too :)


> I use callbacks only in order to send/receive something to/from another App 
> via the server. I've also made it possible for making  a backup of the ldb in 
> the server and of course to retrieve the ldb from there. At leat 95% of my 
> code is JavaScript. I tiny little bit of my code is in the server.
> 
> The link may look like this: href="javascript:goingTo(11);"
> 
> In goingTo(val) I have switch (val) ...
> ...
> case 11: MAKE_MAIN(); break
> ...
> MAKE_MAIN() stuffs the html code into a variable dump, and finally I have
> document.getElementById("HOME").innerHTML=dump
> 
> I have two variables "comingFrom" and "whereAmI". I have a back button up in 
> the right corner with goingTo(comingFrom). As I already mentioned, it's very 
> fast.
> 
> If not Emy, what then?

If you use emy.ajax() for the ajax calls, emy.$ for selectors or other screens 
transitions to the rest of the app, or simply like the UI themes, then stick 
with it :)
https://emy-library.org/documentation/latest/core-documentation.html#emy-ajax
https://emy-library.org/documentation/latest/core-documentation.html#emy-$
--> document.getElementById("HOME") can be emy.$(‘#HOME’) or 
emy.getSelectedView() if you are on this view.


If not, then you probably don’t need a library at all to just pull / push data 
from a server.

Remi

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.


Re: EMY - receiving an asynchronous request

2018-03-22 Thread Rune Back
*I like Emy.* I use callbacks only in order to send/receive something
to/from another App via the server. I've also made it possible for making
a backup of the ldb in the server and of course to retrieve the ldb from
there. At leat 95% of my code is JavaScript. I tiny little bit of my code
is in the server.

The link may look like this: *href="javascript:goingTo(11);"*

In *goingTo(val)* I have *switch (val)* ...

...
*case 11: MAKE_MAIN(); break*
...

*MAKE_MAIN()* stuffs the html code into a variable *dump*, and finally I
have
*document.getElementById("HOME").innerHTML=dump*

I have two variables "comingFrom" and "whereAmI". I have a back button up
in the right corner with goingTo(comingFrom). As I already mentioned, it's
very fast.

*If not Emy, what then?*

Rune


2018-03-22 0:31 GMT+02:00 Remi Grumeau :

> Humm
>
> I'd rather put this in a DIV rather than a SECTION then.
> Emy uses all direct SECTION tags child nodes as views.
> So it won't bother you with this DIV (just put a display:none on it would
> be enough)
>
> But ... if you're doing the ajax call on your side and uses one single
> section to replace its content without any navigation transition, why using
> Emy ? :)
>
> Also, , you forgot a "
>
> Remi
>
> Le 21 mars 2018 à 16:49, Rune Back  a écrit :
>
> I tried...
>
> 
>
>
> ​...​
> and theat seems to work fine
> ​, so far at least​
> . / R
>
> 2018-03-21 10:08 GMT+02:00 Rune Back :
>
>> Hi!
>>
>> I use only one section tag "HOME" in my code. When the user navigates to
>> "another" section tag, I only change the code of the section tag. - *Very
>> fast!*
>>
>> I do have another section tag called "DUMP", for *internal *use only.
>> That's where I receive the answers for any asynchronous requests sent to
>> the server. After I've sent something to the server I check the "DUMP"
>> every second.
>>
>> It seems to me that the section tag isn't the right tag for this use. -
>> Any suggestions?
>>
>>
>> Thanks,
>>
>> Rune
>>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to iphonewebdev+unsubscr...@googlegroups.com.
> To post to this group, send email to iphonewebdev@googlegroups.com.
> Visit this group at https://groups.google.com/group/iphonewebdev.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to iphonewebdev+unsubscr...@googlegroups.com.
> To post to this group, send email to iphonewebdev@googlegroups.com.
> Visit this group at https://groups.google.com/group/iphonewebdev.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.


Re: EMY - receiving an asynchronous request

2018-03-21 Thread Remi Grumeau
Humm

I'd rather put this in a DIV rather than a SECTION then.
Emy uses all direct SECTION tags child nodes as views.
So it won't bother you with this DIV (just put a display:none on it would be 
enough)

But ... if you're doing the ajax call on your side and uses one single section 
to replace its content without any navigation transition, why using Emy ? :)

Also, , you forgot a "

Remi

> Le 21 mars 2018 à 16:49, Rune Back  a écrit :
> 
> I tried...
> 
> 
> 
> ​...​and theat seems to work fine​, so far at least​. / R
> 
> 2018-03-21 10:08 GMT+02:00 Rune Back  >:
> Hi!
> 
> I use only one section tag "HOME" in my code. When the user navigates to 
> "another" section tag, I only change the code of the section tag. - Very fast!
> 
> I do have another section tag called "DUMP", for internal use only. That's 
> where I receive the answers for any asynchronous requests sent to the server. 
> After I've sent something to the server I check the "DUMP" every second. 
> 
> It seems to me that the section tag isn't the right tag for this use. - Any 
> suggestions?
> 
> Thanks,
> 
> Rune
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to iphonewebdev+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to iphonewebdev@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/iphonewebdev 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.


Re: EMY - receiving an asynchronous request

2018-03-21 Thread Rune Back
I tried...




​...​
and theat seems to work fine
​, so far at least​
. / R

2018-03-21 10:08 GMT+02:00 Rune Back :

> Hi!
>
> I use only one section tag "HOME" in my code. When the user navigates to
> "another" section tag, I only change the code of the section tag. - *Very
> fast!*
>
> I do have another section tag called "DUMP", for *internal *use only.
> That's where I receive the answers for any asynchronous requests sent to
> the server. After I've sent something to the server I check the "DUMP"
> every second.
>
> It seems to me that the section tag isn't the right tag for this use. -
> Any suggestions?
>
>
> Thanks,
>
> Rune
>

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.