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

Dynamic Url parameters not working?

New Here ,
Nov 30, 2010 Nov 30, 2010

Copy link to clipboard

Copied

Hi, not sure if I am overlooking something ridiculously simple, but I am having a problem using the dynamic url link parameter function.

I have a repeating region of dynamic text which selects a category based on a name from a recordset. I link the dyanmic text to a category.php page, and click the parameter section in the link dialog, enter the category name in the box, click the lightening icon and select the appropriate field. DW CS 4 always prints the link in PHP code  like this -

<a href="SpryAssets/category.php?<?php echo $row_rsCategories['categoryID']; ?>="><?php echo $row_rsCategories['categoryName']; ?></a>

which does not work. To get it working, I continually have to manually change the PHP code to something like this -

<a href="category.php?categoryID=<?php echo $row_rsCategories['categoryID']; ?>"><?php echo $row_rsCategories['categoryName']; ?></a>

I have tried to follow tutorials in David Powers' and other books that use this method very carefully but with great frustration as my Dreamweaver never prints the correct code.

TOPICS
Server side applications

Views

543
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

correct answers 1 Correct answer

LEGEND , Dec 01, 2010 Dec 01, 2010

purplebetter1 wrote:

I have tried to follow tutorials in David Powers' and other books that use this method very carefully but with great frustration as my Dreamweaver never prints the correct code.

Dreamweaver generates the correct code. You're just doing it wrong - as do countless others.

Here's an illustration from my Dreamweaver CS4 book. Examine it carefully.

16100f1416scrap.jpg

You type the variable name in the Name field of the Parameters dialog box, and then click the lightning icon to the right of the Value fi

...

Votes

Translate
LEGEND ,
Dec 01, 2010 Dec 01, 2010

Copy link to clipboard

Copied

LATEST

purplebetter1 wrote:

I have tried to follow tutorials in David Powers' and other books that use this method very carefully but with great frustration as my Dreamweaver never prints the correct code.

Dreamweaver generates the correct code. You're just doing it wrong - as do countless others.

Here's an illustration from my Dreamweaver CS4 book. Examine it carefully.

16100f1416scrap.jpg

You type the variable name in the Name field of the Parameters dialog box, and then click the lightning icon to the right of the Value field. What confuses you and so many others is that there is a lightning icon to the right of the Name field also.

Click the wrong lightning icon, and you get the result that you did. Click the correct one, and Dreamweaver generates the expected code.

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