DMXzone App Connect Support Product Page


Can't delete records. Record ID showing as "[object Object]"

Reported 07 Nov 2018 11:38:02
has this problem
07 Nov 2018 11:38:02 Bruce Wilkie posted:
Hi there

I've set up a delete record page following the video at

But it's not deleting the record when I click the button. I've changed the hidden id field to a text field and it's not showing the record id as its value. It's showing "[object Object]" instead.

Code for page:

<!doctype html>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="../dmxAppConnect/dmxAppConnect.js"></script>

<body id="deletetest" is="dmx-app">
<dmx-serverconnect id="serverconnectListPhotos" url="../dmxConnect/api/Adminarea/AdminSelectNewsPics.php" dmx-param:newsid="query.newsid"></dmx-serverconnect>
<table width="100%" border="1">

<tr dmx-repeat:repeatphotos="">
<td><form action="../dmxConnect/api/Adminarea/AdminNewPicDelete.php" method="post" name="form1" id="form1" is="dmx-serverconnect-form" dmx-on:success="serverconnectListPhotos.load({newsid: query.newsid})">
<input name="news_pic_id" type="text" id="news_pic_id" dmx-bind:value="news_pic_id">
<input type="submit" name="submit" id="submit" value="Submit">

Screenshot of page:

Any ideas what I'm doing wrong here?



Replied 07 Nov 2018 13:45:33
07 Nov 2018 13:45:33 Teodor Kuduschiev replied:
That's because the dynamic binding name is the same as the static id/name used:

<input name="news_pic_id" type="text" id="news_pic_id" dmx-bind:value="news_pic_id">

In this case change the static name and id to be different than any dynamic binding. They should not be equal to: news_pic_id
Replied 07 Nov 2018 14:42:14
07 Nov 2018 14:42:14 Bruce Wilkie replied:
Thanks Teodor, that's fixed it


Reply to this topic