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

Submitting in Href

Explorer ,
Aug 23, 2006 Aug 23, 2006

Copy link to clipboard

Copied

<form...>
....Fields I need passed through...
<a href="report.cfm?b=#URL.b#&o=#URL.o#&l=#URL.l#&fileSort=Caption&urlCrit=true" onClick="javascript: submit();">
...
</form>
The reason I need an onclick="submit()" is because I need the fields on the form to passthrough but it isn't working for some reason.

What do I have to do submit on this href?

Thanks!
TOPICS
Advanced techniques

Views

386

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 ,
Aug 23, 2006 Aug 23, 2006

Copy link to clipboard

Copied

Don't mix forms and anchor tags. If you want to preserve your url variables, make them session variables or hidden form fields.

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
Explorer ,
Aug 23, 2006 Aug 23, 2006

Copy link to clipboard

Copied

I really don't have a choose no this one. I'm dealing with legacy code. Is this really the problem.

Thanks!

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
Guest
Aug 23, 2006 Aug 23, 2006

Copy link to clipboard

Copied


Have you tried using method="get" ?

ex. <form action="myaction.cfm" method="get">

I think this has the effect of turning your FORM field variables into URL variables
when you submit the form?

Good luck!

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
Explorer ,
Aug 23, 2006 Aug 23, 2006

Copy link to clipboard

Copied

LATEST
Thanks! That worked perfectly!

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