Professional Web Applications Themes

Driving me crazy .... - Macromedia ColdFusion

Ok, I have a Coldfusion page. On that page I have a image, that is linked to the following code: <img src="images/logos/email2.jpg" alt="Send printer info" title="Send printer info" onClick="MM_openBrWindow('../CF/Email.cfm','','width=400,height=500')"> On the email.cfm page, I am then trying to recapture the calling page's URL with: cgi.http_referer Can you not do that with a new window? Every time I dump out the info in cgi.http_referer I get something that says its a empty string. What do I have messed up here? Thanks, Steve...

  1. #1

    Default Driving me crazy ....

    Ok, I have a Coldfusion page. On that page I have a image, that is
    linked to the following code:

    <img src="images/logos/email2.jpg" alt="Send printer info" title="Send
    printer info"
    onClick="MM_openBrWindow('../CF/Email.cfm','','width=400,height=500')">

    On the email.cfm page, I am then trying to recapture the calling page's
    URL with: cgi.http_referer

    Can you not do that with a new window? Every time I dump out the info
    in cgi.http_referer I get something that says its a empty string.

    What do I have messed up here?

    Thanks,
    Steve
    Steve Guest

  2. #2

    Default Re: Driving me crazy ....

    I don't know if that variable gets populated when using javascript
    window.open() to create a pop-up window.

    You could pass the page information as a url parameter or possibly use
    javascripts's "doent.referrer" property.

    --- psuedo code
    onClick="MM_openBrWindow('../CF/Email.cfm?refPage='+
    #CGI.SCRIPT_NAME#?#CGI.QUERY_STRING# ......

    mxstu Guest

  3. #3

    Default Re: Driving me crazy ....

    Is there a way to open a window that will allow the variable to be
    populated?

    I tried something similar to the code you have below, I had:

    MM_openBrWindow('../CF/Email.cfm?#cgi.script_name#?#cgi.query_string#.
    When then using the cgi variables, I got a whole mess of stuff:

    http://www.site.com/cf/email?http://www.site.com/scooters/pform.cfm?PID=2
    when I just need the info after and including the 2nd http.....

    mxstu wrote: 
    Steve Guest

  4. #4

    Default Re: Driving me crazy ....

    >Is there a way to open a window that will allow the variable to be 

    Use a regular anchor tag with target="_blank" instead of using javascript to
    open the window. However, you don't get as much control over the window size
    and options as with javascript.
     

    I don't think those variables should produce the results you're describing,
    but try something like this:

    <cfoutput>
    <cfset thisPage = URLEncodedFormat(CGI.SCRIPT_NAME &"?"& CGI.QUERY_STRING)>
    <.....
    onClick="MM_openBrWindow('../CF/Email.cfm?refPage=#thisPage#','','width=400,heig
    ht=500')">
    </cfoutput>



    mxstu Guest

Similar Threads

  1. Cht driving me crazy!
    By correo@ironcito.com in forum MySQL
    Replies: 2
    Last Post: January 3rd, 02:56 PM
  2. CDONTS is driving me crazy. Please help !!!
    By owen in forum ASP Components
    Replies: 5
    Last Post: February 18th, 01:47 PM
  3. focusManager driving me CRAZY!
    By CylOlyc in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 16th, 08:11 PM
  4. help!!! this is driving me crazy
    By Joy in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 7
    Last Post: September 26th, 03:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139