NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - de la Rosa

Pages: [1] 2 3 ... 9
1
Ok, I'll try to attend.

Btw, my 14.07 app wizard generates two scripts in the PageFooterTag  "one" html routine as follows

one  Routine
  packet.append(p_web.AsciiToUTF(|
    '<<div class="nt-left">Copyright <<!-- Net:d:year --><</div><<div id="countdown" class="nt-countdown"><</div><13,10>'&|
    '',net:OnlyIfUTF,net:StoreAsAscii))

  Routine
  packet.append(p_web.AsciiToUTF(|
    '<<div class="nt-left">Copyright <<!-- Net:d:year --><</div><<div id="countdown" class="nt-countdown"><</div><13,10>'&|
    '',net:OnlyIfUTF,net:StoreAsAscii))



2
any entry in quotes such as 'console.log("am here")'

3
Hi Bruce,

In the NetWebBrowse field OnClick javascript embed point, if I try to enter anything, devtools responds as follows:

nt-idb.js:508 Uncaught DOMException: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
    at doGet (http://192.168.7.123:88/scripts/nt-idb.js:508:35)
    at idbOpen (http://192.168.7.123:88/scripts/nt-idb.js:84:20)
    at idbGet (http://192.168.7.123:88/scripts/nt-idb.js:506:2)
    at V.<computed>.<computed>.clickRow (http://192.168.7.123:88/scripts/jquery.nt-browse-ls.js:389:3)
    at a.<computed> [as clickRow] (http://192.168.7.123:88/scripts/jquery-ui-1.13.2.custom.min.js:17:10)
    at HTMLDivElement.<anonymous> (http://192.168.7.123:88/scripts/jquery-ui-1.13.2.custom.min.js:26:955)
    at Function.each (http://192.168.7.123:88/scripts/jquery-3.7.0.min.js:2:3129)
    at ce.fn.init.each (http://192.168.7.123:88/scripts/jquery-3.7.0.min.js:2:1594)
    at V.fn.<computed> [as ntbrowsels] (http://192.168.7.123:88/scripts/jquery-ui-1.13.2.custom.min.js:26:773)
    at V.<computed>.<computed>.clickRow (http://192.168.7.123:88/scripts/jquery.nt-browse.js:598:27)


- Under Javascript, there are two entry fields,  onclick and javascript, what is the plain javascript for?

4
Web Server - Ask For Help / Re: Inserting a record in idb
« on: October 07, 2023, 07:48:24 AM »
Ok, thanks Bruce!

5
Web Server - Ask For Help / Re: Inserting a record in idb
« on: October 05, 2023, 04:46:52 PM »
My problem with popups is say for example a button on a form

 - the Onclick javascript wont run if there is a destination URL or procedure defined
 - client side onclick javacript does not run either
 - is it possible to call the popup from javascript?

 yes, am using local storage in the meantime 

6
Web Server - Ask For Help / Re: Inserting a record in idb
« on: October 04, 2023, 10:40:52 AM »
>>  idbAdd(database,users,users.record,false,function(){console.log('success')},function(err){console.log('fail')});

   It turned out it wanted the db parameters to be fully specified as follows:

       idbAdd(database,database.users,database.users.record,false,function(){console.log('success')},function(err){console.log('fail')});

      Thanks Bruce!

   Now that I can add a record. I need to collect db.table.record values from several pages before adding a record. However, the db.table.record buffer is cleared on every page. Where should I
   declare a buffer variable that will be persistent in different pages until I get to complete priming the db.table record? I can't declare  global variables in custom.js as it continously resets. 

7
Web Server - Ask For Help / Re: Inserting a record in idb
« on: October 03, 2023, 07:36:21 AM »
 here's my script

function amHere() {
     //database.users.guid = Math.random().toString(36).substr(3,8).toUpperCase() + Math.random().toString(36).substr(3,8).toUpperCase();
     database.users.name = "Ellen";
     console.log('Am Here Save!'  + database.users.guid + database.users.name + Organisation);
     idbAdd(database,users,record,fromSync,oncomplete,onerror);
     
}

- btw, Now, adding a record to device table also returns the same "device is not defined" ReferenceError

- is there a need to prime oncomplete and onerror?

- I notice priming such as database.users.name = "Ellen"; and database.users.record.name = "Ellen"; are both accepted, are there internal issues in the usage?

- In the OnClick of a button of a NetWebform, is there a way that both the javascript and the URL or procedure gets executed? I wanted to execute the script and jump to another page. Or is there an equivalent javascript embed point upon opening of the target page?

- Since the script is available on the client side, are there any safeguards we can use to avoid malicious code to be introduced?




   

8
Web Server - Ask For Help / Re: Inserting a record in idb
« on: October 02, 2023, 03:23:07 PM »
I am trying to add a record to an idb table in a PWA.

1.  Using idbAdd on the device table resulted in a new record but with only the guid and lastsyncdate populated. 
2.  Using idbAdd on any other table did not create a new record. Dev tools report  for users table

    Uncaught ReferenceError: users is not defined
    at amHere (sq_custom.js:37:28)
    at HTMLButtonElement.onclick (MakeABooking?PressedButton=SelAMBUBtn:383:205)

 Btw,I'm still on 14.04 though, will 14.05 be fully ready for push notifications?
   



9
Web Server - Ask For Help / Inserting a record in idb
« on: October 01, 2023, 05:17:20 PM »
Hi,

Can I request a sample javascript to properly insert a record in an idb table using database.js device table example as follows:

{ name: "device",
      syncproc: "syncdevice",
      objectStore:{},
      everythingafter:0,
      primarykeyfield: "guid",
      timestampfield: "ts",
      servertimestampfield: "sts",
      deletedtimestampfield: "dts",
      indexes: [
        {name:'timestampkey',unique: false, fields:["ts"]},
        {name:'servertimestampkey',unique: false, fields:["sts"]}
      ],
      relations: [
      ],
      record: {
        guid:"",
        ts:0,
        sts:0,
        dts:0,
        syncurl:"",
        mobileno:"",
        email:"",
        user_name:"",
        password:"",
        description:"",
        lastsyncdate:"",
        lastsynctime:"",
        registered:0
      },

     I was thinking of doing it as follows but not so sure of the proper usage:

    database.device."guid" = Math.random().toString(36).substr(3,8).toUpperCase() + Math.random().toString(36).substr(3,8).toUpperCase();
    database.device."ts" = 0;
    database.device."sts" = 0;
    database.device."user_name" = ' Sample Name";
    idbWrite(database,device,record,fromSync,oncomplete,onerror)

    Thanks,
    Vic

10
Web Server - Ask For Help / Re: Saving QR Code to an ImageFile
« on: March 15, 2022, 09:34:40 AM »
Ok Bruce, Thanks!

11
Web Server - Ask For Help / Re: Saving QR Code to an ImageFile
« on: March 11, 2022, 12:04:43 PM »
Hi Alberto,

Sorry, I'm not familiar on how to compile it without an *.app file. There are 2 project files but with no app files?

Will appreciate any help.

Thanks,
Vic

12
Web Server - Ask For Help / Re: Saving QR Code to an ImageFile
« on: March 10, 2022, 09:25:15 PM »
Hi Jane,

Yes, can you point me to an example I can refer to?

Thanks,
Vic

13
Web Server - Ask For Help / Saving QR Code to an ImageFile
« on: March 05, 2022, 05:18:04 PM »
Hi,

In the below Code, the QR Code is generated in the Element defined by ElementID, how can I save the generated QR image to an image file on disk where it can be retrieved and displayed elsewhere?

    Glo:st.remove('<123>')
    Glo:st.remove('<125>')
    Glo:st.remove('<10>')
    Glo:st.remove('<13>')
     
    ElementData = 'QRDisplayForm?RefNo =' & p_web.GSV('RefNo') & '& CustID =' & p_web.GSV('CusttID')
     
    ElementID = 'Ticket_QR'
       
    p_web.script('generateQrCode('& '''' & CLIP(elementID) & '''' & ',' & '''' & Clip(ElementData) & '''' & ');')




TIA
Vic


14
Web Server - Ask For Help / Re: OfficeInside in NT WebServer
« on: September 17, 2020, 07:18:05 PM »
Hi Bruce,

Ok, will try it out. I think the limitation is fine in this case as I only intend to have the administrator perform such operation.

Thanks agian,
Vic

15
Web Server - Ask For Help / OfficeInside in NT WebServer
« on: September 11, 2020, 07:59:09 PM »
Hi,

Is there a way for the "Choose file to upload" in Excel.Import() to get the file from the web app client workstation instead of the app server? Or whatever can be done to accomplish it?

Vic



Pages: [1] 2 3 ... 9