Solved

url field type and passing it around

Posted on 2000-05-11
5
164 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now