Solved

url field type and passing it around

Posted on 2000-05-11
5
168 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 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