close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic Selection Lists not working

Thread began 7/06/2021 12:28 pm by john70964 | Last modified 7/07/2021 3:00 pm by Ray Borduin | 88 views | 5 replies |

john70964

Dynamic Selection Lists not working

I have some selection field lists on an add record page.

The Boat Type field and the Hull Materials field return only the first record from the list even when a different field was selected.

Can you please see where I am going wrong

I am attaching the page code. Perhaps I would do better to make the fields non dynamic.

Thanks

John

Sign in to reply to this post

Ray BorduinWebAssist

Can I get a url and FTP access? I'll debug it.

Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Thanks Ray
Please see PM

Sign in to reply to this post

Ray BorduinWebAssist

Lines 71-72 you have:
$InsertQuery->bindColumn("Category1", "s", "".($rsCatBoats->getColumnVal("Category")) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("HullMaterial", "s", "".($rsHullMaterial->getColumnVal("HullMaterial")) ."", "WA_DEFAULT");

I think it should be:
$InsertQuery->bindColumn("Category1", "s", "".($_POST['Category']) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("HullMaterial", "s", "".($_POST['HullMat']) ."", "WA_DEFAULT");

On line 260 you have:
<option value="<?php echo($rsCatBoats->getColumnVal("Category")); ?>"<?php if (!(strcmp($rsCatBoats->getColumnVal("Category"), ($rsCatBoats->getColumnVal("sort"))))) {echo "selected=\"selected\"";} ?>><?php echo($rsCatBoats->getColumnVal("Category")); ?></option>

I think it should be:
<option value="<?php echo($rsCatBoats->getColumnVal("Category")); ?>"<?php if (!(strcmp($rsCatBoats->getColumnVal("Category"), (ValidatedField("boatsInsert_531","Category"))))) {echo "selected=\"selected\"";} ?>><?php echo($rsCatBoats->getColumnVal("Category")); ?></option>

Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Thanks Ray,
Yes it appears to be working correctly now.
Have you any idea why this should occur ?

I could not see anything amiss with the dynamic List/Menu.
Strange how some Drop Downs were OK and some not.

Just thinking of next time and what not to do!
Anyway thanks again.
John

Sign in to reply to this post

Ray BorduinWebAssist

I can't say what caused it or when. I just saw the issues in the code. I can't really imagine the cause.

Sign in to reply to this post
Did this help? Tips are appreciated...

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...