Solved

url field type and passing it around

Posted on 2000-05-11
5
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

732 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