Loading ...
Sorry, an error occurred while loading the content.

use same database in different pages

Expand Messages
  • niz75018
    hello, sorry for my english in my index.html page, i created a database but when i call data in another page i have undefined message. Is this normal? how
    Message 1 of 4 , Oct 27, 2012
    • 0 Attachment
      hello,
      sorry for my english

      in my index.html page, i created a database but when i call data in another page i have "undefined" message.

      Is this normal?

      how can i use the same database in different pages?

      i am using phonegap.

      Thank you
    • David Kantowitz
      Hello, I haven t used phonegap, but a common javascript browser trick is to assign your data to the variable top.name . This variable keeps it s value across
      Message 2 of 4 , Oct 28, 2012
      • 0 Attachment
        Hello,
        I haven't used phonegap, but a common javascript browser trick is to assign your data to the variable "top.name".  This variable keeps it's value across html pages as long as you stay in the same browser tab.
        Regards,
        David K.
      • niz75018
        thank you but i want my db persist, even if y close browser/application. maybe i will use sqlite if i don t find a solution but i really like the simplicity of
        Message 3 of 4 , Oct 29, 2012
        • 0 Attachment
          thank you but i want my db persist, even if y close browser/application.
          maybe i will use sqlite if i don't find a solution but i really like the simplicity of taffydb...




          --- In taffydb@yahoogroups.com, David Kantowitz <dkantowitz@...> wrote:
          >
          > Hello,
          > I haven't used phonegap, but a common javascript browser trick is to assign
          > your data to the variable "top.name". This variable keeps it's value
          > across html pages as long as you stay in the same browser tab.
          > Regards,
          > David K.
          >
        • Ian Toltz
          If storing the database is important for you, then this might not be the right solution. That said, the database is just a JavaScript object, and you could use
          Message 4 of 4 , Oct 29, 2012
          • 0 Attachment
            If storing the database is important for you, then this might not be the right solution.

            That said, the database is just a JavaScript object, and you could use Local Storage to store it. If it's small enough, you could also serialize it to JSON and store it in a cookie.

            On Mon, Oct 29, 2012 at 5:11 PM, niz75018 <niz75018@...> wrote:
             

            thank you but i want my db persist, even if y close browser/application.
            maybe i will use sqlite if i don't find a solution but i really like the simplicity of taffydb...



            --- In taffydb@yahoogroups.com, David Kantowitz <dkantowitz@...> wrote:
            >
            > Hello,
            > I haven't used phonegap, but a common javascript browser trick is to assign
            > your data to the variable "top.name". This variable keeps it's value
            > across html pages as long as you stay in the same browser tab.
            > Regards,
            > David K.
            >




            --
            -Ian Toltz
          Your message has been successfully submitted and would be delivered to recipients shortly.