close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Second Insert button not passing ID to insert page properly?

Thread began 2/17/2015 7:48 am by MagsW | Last modified 2/17/2015 3:07 pm by Jason Byrnes | 906 views | 9 replies |

MagsW

Second Insert button not passing ID to insert page properly?

I have a slightly customised results page in that it's a "second level" results page. The first page is www.domainname.com/accountants_results.php. This is a standard DataAssist results page, but on this page I have a link where you can view clients associated with each record, so when you click the link next to the record it passes a variable to the second level results page, i.e. www.domainname.com/clients_results.php?AccountantID=12.

This "second level" results page again is the standard DataAssist results page which has the usual two Insert buttons - one that shows along with the table when there are already records in existence, and one which shows when there are no existing records. I've discovered that although the first one works fine, the second one isn't passing the AccountantID correctly, even though I've copied the button code exactly. It does add the record to the database but it doesn't pass the ID (even though the URL variable seems to be passed to the insert page OK, so the Insert Client button takes you to www.domainname.com/clients_insert.php?AccountantID=12.

Any idea why this Insert button isn't working properly?

Sign in to reply to this post

Jason ByrnesWebAssist

I would need to see the code, please attach a copy of the page.

Sign in to reply to this post

MagsW

Hi Jason, I've attached the relevant pages. accountants_results.php is the first level results page. The Click Here link takes you to acclients_results.php and I've also attached the acclients_insert page.

Sign in to reply to this post

Jason ByrnesWebAssist

I'm confused. which page is it that the problem happens on?

Sign in to reply to this post

MagsW

It's acclients_results.php - and it only happens on the insert button that shows when there are no existing records.The other insert button works fine. I've put login and ftp info in the PM section.

Sign in to reply to this post

Jason ByrnesWebAssist

on the acclients_insert.php page, in the insert record behavior, you have bound the AccountantID column to the AID session variable.

i don't see where that session is being set.

you should use the AccountantID Hidden form element on your page instead.

Sign in to reply to this post

MagsW

Ah, that's what the problem was - I've bound it to the hidden form element and it now works fine. Only one other question - on the acclients_results.php page, when I delete a record, it does delete but it then says "no clients found" and I have to hit the back button to see the updated list of clients. I fear that users will panic and think they've deleted all the records!

Sign in to reply to this post

Jason ByrnesWebAssist

change line 127:

$WA_redirectURL = "acclients_results.php?ClientID=".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"") ."";

to:
$WA_redirectURL = "acclients_results.php?AccountantID=".((isset($_GET["AccountantID"]))?$_GET["AccountantID"]:"") ."";

Sign in to reply to this post

MagsW

Sorted, thanks again!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...