Solved

url field type and passing it around

Posted on 2000-05-11
5
169 Views
Last Modified: 2013-12-24
I have a page that has a form whose method is "get" for an action page so that I get a fully qualified url with query string attached.  I do this so that when I load another window with some frames in it, I can easily pass around the query string part of the url from page to page.  When the initial submission runs, my target window page (a frameset) receives the query string successfully (I debug and see the string intact).  So, in the frameset, I load a page into one of the frames and basically want to "pass through" that query string to the secondary page in that frame.  In the code for that secondary page I have a debug process that shows me (from Java) what the query string is and lo-and-behold, there is only one parameter in the query string instead of the 5 that were sent to the frameset page.  I am really confused about this?  Anyone have any ideas?
0
Comment
Question by:beregoth
  • 3
  • 2
5 Comments
 
LVL 1

Author Comment

by:beregoth
ID: 2799853
Furthermore, I just turned on the debugging features of CF server and have discovered that it appears as if the query string is intact, yet when I pass it to the next page, I only get the first page.  In otherwords, the frameset page receieves the following:

?page=acctnum=1098&acctname=Mike+Craig

but if I query #url.page#, i only get

acctnum=1098

why is that?
0
 
LVL 1

Author Comment

by:beregoth
ID: 2799867
To add a little more...I think I have the problem mostly figured out so here is my final question (I think)..what is the syntax to pass the entire query string from one location to another?
0
 
LVL 2

Accepted Solution

by:
dlewis9 earned 50 total points
ID: 2800297
The query string can be accessed from the CGI.QUERY_STRING variable within Cold Fusion.  You can pass it to another page like this:

Hyperlink example:

<CFOUTPUT>
  <A HREF="page.cfm?#CGI.QUERY_STRING#">click here</A>
</CFOUTPUT>

Does that help in your situation?
0
 
LVL 1

Author Comment

by:beregoth
ID: 2800677
yes and you get the points.  but if you could comment...for some reason I tried cgi.query_string and it failed but when I used just query_string it worked...why?  And lastly...is there nothing more that we can do with the url field type than access parameters in it...no iterating through it, no way to just access the whole url?
0
 
LVL 2

Expert Comment

by:dlewis9
ID: 2807803
Not sure why CGI.QUERY_STRING didn't work..what did it do?

As for getting the rest of the URL, you can get the whole thing in pieces:

http://www.mysite.com/page.cfm?parm1=yes

CGI.SERVER_NAME="www.mysite.com"
CGI.SCRIPT_NAME="/page.cfm"
CGI.QUERY_STRING="parm1=yes"

and there are lots more CGI variables..there are not really any special functions to work with the URL, but you should be able to do just about anything you need with those variables...or you can resort to using javascript.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question