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

I want to be sure to get the existing data from the column in the database and my attempt failed and broke the page.

Thread began 1/15/2020 2:49 pm by jo271221 | Last modified 1/20/2020 1:06 pm by Ray Borduin | 136 views | 14 replies |

jo271221

I want to be sure to get the existing data from the column in the database and my attempt failed and broke the page.

I have attached the details to access the page

Sign in to reply to this post

Ray BorduinWebAssist

If you see that error, then go to the rsobj.php file and queryobj.php and update the Debug setting to true. Then it will give you the actual SQL error. That will be more helpful when debugging this issue.

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

jo271221

select menu error

So the issue is the select menu. I attempted to add to options to the select menu and also retrieve the existing data from the column in the database so that when the page is updated the column data is not deleted. I have copied the code from line #224 on the original page and #243 from the page I updated. These are the lines with the select menu which I am having trouble with. This is a required field.

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to go to Window->Properties and click on the select list. Then click the Dynamic.. button in the properties window. From there you can choose to have it populated from any recordset you have on your page and choose the initially selected value from the update recordset.

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

jo271221

The button was not working for me, nothing was clickable. So here is my attempt which seems to be working except the selected item appears twice in the menu. I am also checking to be sure I did not break the required field function.

<div class="lineGroup"> <label for="royalcrown" class="sublabel" > royalcrown or rc pend:<span class="requiredIndicator">&nbsp;*</span></label>
<select class="formMenufield_Large" name="royalcrown" id="royalcrown" rel="<?php echo((isset($_GET["invalid"])?ValidatedField("stallionupdate","royalcrown"):"".$WADAhorses_update->getColumnVal("royalcrown")."")); ?>" tabindex="5" title="Please enter a value." required="true">
<option value="Royal Crown" <?php if (!(strcmp("Royal Crown", "royalcrown"))) {echo "selected=\"selected\"";} ?>><?php echo($WADAhorses_update->getColumnVal("royalcrown")); ?></option>
<option value="Royal Crown">Royal Crown</option>
<option value="Royal Crown Pending">Royal Crown Pending</option>
<?php
while(!$WADAhorses_update->atEnd()) { //dyn select
?>
<?php
$WADAhorses_update->moveNext();
} //dyn select
$WADAhorses_update->moveFirst();
?>
</select>
<?php
if (ValidatedField('stallionupdate','stallionupdate')) {
if ((strpos((",".ValidatedField("stallionupdate","stallionupdate").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?><span class="serverInvalidState" id="royalcrown_ServerError">Please enter a value.</span><?php //WAFV_Conditional stallion_update.php stallionupdate(2:)
}
}
}?>
</div>

Sign in to reply to this post

Ray BorduinWebAssist

This:

php:
<select class="formMenufield_Large" name="royalcrown" id="royalcrown" rel="<?php echo((isset($_GET["invalid"])?ValidatedField("stallionupdate","royalcrown"):"".$WADAhorses_update->getColumnVal("royalcrown")."")); ?>" tabindex="5" title="Please enter a value." required="true">

<option value="Royal Crown" <?php if (!(strcmp("Royal Crown""royalcrown"))) {echo "selected=\"selected\"";} ?>><?php echo($WADAhorses_update->getColumnVal("royalcrown")); ?></option>
<option value="Royal Crown">Royal Crown</option>
<option value="Royal Crown Pending">Royal Crown Pending</option>
<?php
while(!$WADAhorses_update->atEnd()) { //dyn select
?>
<?php
$WADAhorses_update
->moveNext();
//dyn select
$WADAhorses_update->moveFirst();
?>
</select>



should probably be:

php:
<select class="formMenufield_Large" name="royalcrown" id="royalcrown" tabindex="5" >

<option value="Royal Crown" <?php if (!(strcmp("Royal Crown"$WADAhorses_update->getColumnVal("royalcrown")))) {echo "selected=\"selected\"";} ?>><?php echo($WADAhorses_update->getColumnVal("royalcrown")); ?></option>
<option value="Royal Crown Pending" <?php if (!(strcmp("Royal Crown"$WADAhorses_update->getColumnVal("royalcrown")))) {echo "selected=\"selected\"";} ?>>Royal Crown Pending</option>
</select>
Sign in to reply to this post
Did this help? Tips are appreciated...

jo271221

I did break the required filed function. It is working on the original file.

Sign in to reply to this post

jo271221

I am attaching screen shots of the properties / select window.

Sign in to reply to this post

jo271221

That does not give an error message and inserts Royal Crown into the DB column.

Sign in to reply to this post

jo271221

With this everything works except it shows the error message even when something is selected -

<div class="lineGroup"> <label for="royalcrown" class="sublabel" > royalcrown or rc pend:<span class="requiredIndicator">&nbsp;*</span></label>
<select class="formMenufield_Large" name="royalcrown" id="royalcrown" tabindex="5" >
<option value="<?php echo($WADAhorses_update->getColumnVal("royalcrown")); ?>" <?php if (!(strcmp("royalcrown", $WADAhorses_update->getColumnVal("royalcrown")))) {echo "selected=\"selected\"";} ?>><?php echo($WADAhorses_update->getColumnVal("royalcrown")); ?></option>
<option value="Royal Crown">Royal Crown</option>
<option value="Royal Crown Pending">Royal Crown Pending</option>
<option value="Remove from RC">Remove From Royal Crown</option>
</select>
<?php
if (ValidatedField('stallionupdate','stallionupdate')) {
if ((strpos((",".ValidatedField("stallionupdate","stallionupdate").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?><span class="serverInvalidState" id="royalcrown_ServerError">Please enter a value.</span><?php //WAFV_Conditional stallion_update.php stallionupdate(2:)
}
}
}?>
</div>

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