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

Setting a hiddle variable to a url variable.

LEGEND ,
Jun 16, 2006 Jun 16, 2006

Copy link to clipboard

Copied

Why isn't this working? It works fine pulling it for text on the document,
but it wont register for the hidden variable.

I tried:
<input name="rotty" type="hidden" id="rotty"
value="<cfoutput>#url.name#</cfoutput>" />
and
<input name="rotty" type="hidden" id="rotty" value="#url.name#" />


Help.

--
Wally Kolcz
Developer / Support
Rottyrescue.org


TOPICS
Advanced techniques

Views

310

Translate

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
LEGEND ,
Jun 16, 2006 Jun 16, 2006

Copy link to clipboard

Copied

Wally Kolcz wrote:
> Why isn't this working? It works fine pulling it for text on the document,
> but it wont register for the hidden variable.
>
> I tried:
> <input name="rotty" type="hidden" id="rotty"
> value="<cfoutput>#url.name#</cfoutput>" />
> and
> <input name="rotty" type="hidden" id="rotty" value="#url.name#" />
>
>
> Help.
>
<cfoutput><input name="rotty" type="hidden" id="rotty"
value="#url.name#" /></cfoutput>

Are you absolutely sure url.name has a value at this time?

Votes

Translate

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
LEGEND ,
Jun 16, 2006 Jun 16, 2006

Copy link to clipboard

Copied

Yes, I also use that variable in text on the page. It appears fine.


Votes

Translate

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
LEGEND ,
Jun 16, 2006 Jun 16, 2006

Copy link to clipboard

Copied

Wally Kolcz wrote:
> Yes, I also use that variable in text on the page. It appears fine.
>
>
Is anything setting or clearing the value after it is output? If you
look at the source does the hidden field value property have anything in
it? A bit of code might help further diagnosis.

Votes

Translate

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
Participant ,
Jun 16, 2006 Jun 16, 2006

Copy link to clipboard

Copied

Wally, Please post the code as well as the resulting HTML output from the browser.

If the browser is displaying the page, then url.name is defned, just reset to "".

If the browser displays an error on url.name, then the value isn't in the url scope, or the scope has been deleted somehow.

Seeing the code will help us to help you.

William

Votes

Translate

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
Community Expert ,
Jun 17, 2006 Jun 17, 2006

Copy link to clipboard

Copied

LATEST
The second one should be <cfoutput><input name="rotty" type="hidden" id="rotty" value="#url.name#" /></cfoutput>. Make sure url.name exists and that there are no nested cfoutput tags, that is, no cfoutput tag within a cfoutput tag.


Votes

Translate

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
Resources
Documentation