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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Static Menu Item in Dynamic LIst

Thread began 3/17/2017 12:21 pm by Mike Perry | Last modified 3/17/2017 2:53 pm by Ray Borduin | 142 views | 6 replies |

Mike Perry

Static Menu Item in Dynamic LIst

My Dynamic List/Menu is not showing the statis menu itam in the select box when the page is loaded.

<select code below>

<div class="fullColumnGroup"><label for="leagueName" class="sublabel" >League Name:</label>
<select class="formMenufield_Medium" name="leagueName" id="leagueName" rel="<?php echo((isset($_GET["leagueName"])?$_GET["leagueName"]:"")); ?>" tabindex="1" title="Please enter a value.">
<option value="" <?php if (!(strcmp("", $row_WADAMenuleagueName['id']))) {echo "selected=\"selected\"";} ?>>Select a League</option>
<?php
do {
?>
<option value="<?php echo $row_WADAMenuleagueName['id']?>"<?php if (!(strcmp($row_WADAMenuleagueName['id'], $row_WADAMenuleagueName['id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAMenuleagueName['leagueName']?></option>
<?php
} while ($row_WADAMenuleagueName = mysql_fetch_assoc($WADAMenuleagueName));
$rows = mysql_num_rows($WADAMenuleagueName);
if($rows > 0) {
mysql_data_seek($WADAMenuleagueName, 0);
$row_WADAMenuleagueName = mysql_fetch_assoc($WADAMenuleagueName);
}
?>
</select>
</>

The last last item in the recordset is the default selection instead of "Select a League".

Thanks,

Mike

Sign in to reply to this post

Ray BorduinWebAssist

You have this as your selected value code:

<?php if (!(strcmp($row_WADAMenuleagueName['id'], $row_WADAMenuleagueName['id']))) {echo "selected=\"selected\"";}

If you remove that it will select the first item instead.

Sign in to reply to this post

Mike Perry

I had found that solution in a previous post and tried it -- no luck.


Here is my opening select code and the first option code:

<select class="formMenufield_Medium" name="leagueName" id="leagueName" rel="<?php echo((isset($_GET["leagueName"])?$_GET["leagueName"]:"")); ?>" tabindex="1" title="Please enter a value.">
<option value="">Select a League</option>

The last item in the dynamic array is still what shows as the default. .

Sign in to reply to this post

Ray BorduinWebAssist

It is the code in the repeated option that has to be updated. What do you have there?

Sign in to reply to this post

Mike Perry

<option value="<?php echo $row_WADAMenuleagueName['id']?>"<?php if (!(strcmp($row_WADAMenuleagueName['id'], $row_WADAMenuleagueName['id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAMenuleagueName['leagueName']?></option>

ETA: Okay -- changed it in the repeated section and it's good.

What do I need to change in the wizard inputting to keep that code from appearing?

Sign in to reply to this post

Ray BorduinWebAssist

Don't add anything in the "set selected value" field.

Sign in to reply to this post

Mike Perry

Got it--

Thanks again, Ray!!

Sign in to reply to this post

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