Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Update Spry Table via link in row?

New Here ,
Apr 21, 2007 Apr 21, 2007

Copy link to clipboard

Copied

Hi All,

Anyone know the procedure for doing this? If it's possible?

Basically, I've got a a Spry table with three columns and the 3rd column contains a "Delete" link for every row. I'd like to be able to click that link and have the record associated with that row be deleted and the table data updated without refreshing the page. Massimo Foti wrote an article describing similar functionality here but it involves using a form and I'm not sure how to either make use of it for my needs or modify the concept to work for me.

Thx!
TOPICS
Server side applications

Views

606
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 21, 2007 Apr 21, 2007

Copy link to clipboard

Copied

"MikeyJ" <mikeyj@pttracker.com> wrote in message
news:f0e17q$mek$1@forums.macromedia.com...
> Anyone know the procedure for doing this? If it's possible?
>
> Basically, I've got a a Spry table with three columns and the 3rd column
> contains a "Delete" link for every row. I'd like to be able to click that
> link
> and have the record associated with that row be deleted and the table data
> updated without refreshing the page. Massimo Foti wrote an article
> describing
> similar functionality
> http://www.adobe.com/devnet/dreamweaver/articles/edit_data_in_ajax.html
> but it
> involves using a form and I'm not sure how to either make use of it for my
> needs or modify the concept to work for me.

What kind of server-side language are you using?

If you use CF, you can find a complete example here:
http://www.massimocorner.com/spry/dynamic_spry.zip

It's more sophisticated than the article you mentioned.


--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

Thx Massimo! This looks like it should work but I seem to be having an issue.

I'm trying to modify the example to do the Update where the Delete is in the example but I'm getting a "can't retrieve data" error popup. The url shown in the popup is correct and my Error/Status codes are 100/4/500. If, on the action page I bypass the component code and just leave the update query it will work but that kind of defeats the purpose! 😉 Any thoughts?

Thx!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

"MikeyJ" <mikeyj@pttracker.com> wrote in message
news:f0l9bc$kcq$1@forums.macromedia.com...
> Thx Massimo! This looks like it should work but I seem to be having an
> issue.
>
> I'm trying to modify the example to do the Update where the Delete is in
> the
> example but I'm getting a "can't retrieve data" error popup. The url shown
> in
> the popup is correct and my Error/Status codes are 100/4/500. If, on the
> action
> page I bypass the component code and just leave the update query it will
> work
> but that kind of defeats the purpose! 😉 Any thoughts?

Are you using CF?
Do you have something we can see?
Why you want to trigger the update using a link, hw do you collect the
updated data without a form?

Do you have an HTTP sniffer or Firebug? Can you see what's going on at the
HTTP level?


--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------




Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2007 Apr 27, 2007

Copy link to clipboard

Copied

Thanks for the help! It was of course, user error....somehow gateway.cfc got placed in a subdirectory. DoH! I finally figured out how to see the errors using Firebug...thx for the hint!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

Another quick question Massimo...

Have you ever run into an issue when there is an ampersand in one of the fields you are pulling into a Spry dataset? Everything was working ok for me until someone entered a name like "Bob & Judy" into the Name field and then the records wouldn't show. The "Loading data..." message would never go away. Once I narrowed it down and deleted the ampersand everything was ok again.

Thx,
Mike

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

"MikeyJ" <mikeyj@pttracker.com> wrote in message
news:f17q8t$d98$1@forums.macromedia.com...
> Another quick question Massimo...
>
> Have you ever run into an issue when there is an ampersand in one of the
> fields you are pulling into a Spry dataset? Everything was working ok for
> me
> until someone entered a name like "Bob & Judy" into the Name field and
> then the
> records wouldn't show. The "Loading data..." message would never go away.
> Once
> I narrowed it down and deleted the ampersand everything was ok again.

The ampersand is a special char in XML. You either encode it on the
server-side, or put all your XML text inside CDATA blocks.
If you look at my example, it uses XMLFormat() on the server-side


--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

Ok, so should I be using XMLFormat on all my data as I pull it from the db or is there a way to incorporate it into your example code so it's done automatically? Does the process need to be reversed when the data is outputted so the user sees an ampersand again and not the ascii version of it?

Thx,
Mike

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

"MikeyJ" <mikeyj@pttracker.com> wrote in message
news:f17vg3$jd0$1@forums.macromedia.com...
> Ok, so should I be using XMLFormat on all my data as I pull it from the db
> or
> is there a way to incorporate it into your example code so it's done
> automatically?

My sample use this CFML custom tag:
http://www.olimpo.ch/tmt/tag/spryxml/

There are many alternativies, like:
http://ray.camdenfamily.com/index.cfm/2006/7/2/ToXML-CFC--Converting-data-types-to-XML



> Does the process need to be reversed when the data is outputted
> so the user sees an ampersand again and not the ascii version of it?

No.

Massimo


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

LATEST
May have just answered my own question! I applied it when pulling the data from the db and creating the xml file and it seems to work. Display shows the ampersand as it should as well.

Thx!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines