READURL Call on Macintosh, won't pass variables with spaces???

Here is my code and the problem. I am trying to passing a
tablename and a classname with READURL and the PHP script takes the
info and returns to me my classid. This works wonderfully on the
PC, but on the MAC, when I click on a classname with a space I get
back a empty string as my return value.....here is my code from AW
and PHP......If you can help I would readlly appreciate it.

http doesn't like spaces in URLs.
This clicking on a classname -- is that happening on a web
page, or in AW?
Either way, you should urlencode the link. Replace any spaces
in the URL
with + signs, either manually on a web page, or by using the
replace
function in AW [replace("", "+", string)]. Then, in your PHP
script, you can
change the $_classname assignment to include urldecode:
$_classname = urldecode($_GET["classname"]);
This should return it to the multi-word format.
Paul Swanson
Portland, Oregon, USA
"bradsteele" <[email protected]> wrote in
message
news:[email protected]...
> Here is my code and the problem. I am trying to passing
a tablename and a
> classname with READURL and the PHP script takes the info
and returns to me
my
> classid. This works wonderfully on the PC, but on the
MAC, when I click
on a
> classname with a space I get back a empty string as my
return
value.....here is
> my code from AW and PHP......If you can help I would
readlly appreciate
it.
>
>
>
> getClassID.php code ....
>
> <?PHP
>
> // MAKE THE SCRIPT NON_CACHEABLE
> header("Expires: Mon, 26 Jul 1990 05:00:00 GMT");
> header("Last-Modified: " . gmdate("D, d M Y H:i:s",
time() + 300) . "
GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
>
> // SET VARIABLES
> $_table = $_GET["table"] . "_classes";
> $_classname = $_GET["classname"];
>
> // LOGIN TO THE DATABASE
> mysql_connect("localhost", "user", "user") or
die("Cannot connect to
DB!");
> mysql_select_db("trek") or die("Cannot select DB!");
>
> // GET CLASS ID
> $sql = "SELECT classid FROM `$_table` where classname =
'$_classname'";
> $r = mysql_query($sql);
>
> // IF MORE THAN 1 ROW, THEN PRINT FALSE (ERROR)
>
> while ($row = mysql_fetch_assoc($r)) {
> $query = $row['classid']; }
> print $query;
> ?>
>
>
> AUTHORWARE 7.02 CODE BELOW:
>
> -- Get the Class ID
> if NetConnected then
> www_action := "?action=getData"
> www_query :="&table=" ^ tablePrefix ^
"&classname=" ^
LowerCase(ClassName)
> www_URLString := NetLocation ^ "getClassID.php" ^
www_action ^
www_query
> www_ClassID := ReadURL(www_URLString, 10)
> end if
>

Similar Messages

  • Passing arguments with spaces through to asc.jar

    According to the docs, we can pass arguments through to llc using -fllvm-llc-opt.  Additionally, with llc we can pass arguments through to asc.jar using -ascopt.  Let's say I want to define an AS3 variable in my flascc swf/swc.  asc.jar says that I can do this using "-config <ns::name=value>".
    So it seems like I should be able to do this:
    gcc ... -fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true
    But this doesn't work, as the "-config" parameter takes its next argument via a space and not an equals, which throws the whole thing off.  gcc thinks its another argument.  Trying it with spaces like this:
    gcc ... "-fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true"
    also doesn't work.  The toolchain outputs:
    Error:
    LLVM ERROR: Failed to run /usr/bin/java with args:
    -Xmx1500M -jar /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/asc2.jar -merge -md -abcfuture -AS3
    -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/builtin.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/playerglobal.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/BinaryData.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/Exit.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/LongJmp.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/ISpecialFile.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/InMemoryBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IVFS.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/CModule.abc
    -config CONFIG::RELEASE=false -d /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccQPoczK.lto.2.as /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccZDGxMF.lto.1.as -outdir . -out output
    As you can see, the "-config" command made it to asc.jar.  What I think is happening is that its being passed to asc.jar as one argument (not two).  For example, I can copy-paste this command into bash and it will work-- just not when done from gcc.
    So: how do I pass arguments with spaces through to asc.jar?

    I believe you should be able to do this by splitting it across two fllvm-llc-opt flags:
    gcc ... -fllvm-llc-opt=-ascopt=-config -fllvm-llc-opt=-ascopt=CONFIG::release=true
    The Makefile in the 12_Stage3D sample that ships with the FlasCC SDK demonstrates this.

  • Passing variables with page redirect

    I have a cfform. After it is filled out and submitted, the
    action page generates a random reference_no and puts the data into
    a database. I then do a cflocation url and pass the reference_no to
    another page. This page takes the reference_no and does a cfquery
    again to get all the information just entered and displays it on
    the form. A javascript popup/alert message then tells the user the
    form was submitted with the reference_no and to print the form. I
    was advised to do it this way so that the form cannot be
    resubmitted again. Everything works fine the way I have it.
    Now here is what I would like to do. After the form is
    displayed with the popup, I would like to pause 3-5 seconds and
    then redirect that page to another page that is identical (minus
    the javascript popup message) with the cfdoucment tag because I
    want them to print the form in pdf format. The problem I am having
    is when I do another cflocation url at the end of the display page
    and pass the referendce_no, to go to the pdf page, it works but it
    never stops at the display page to display the javascript popup
    message. So I tried to use the meta tag refresh rediredct set at 3
    seconds and pass the reference_no. The display page with the
    javascript message works then the page is redirected but the
    reference_no is never passed and the pdf form comes up but without
    anything to display. I guess you cannot pass variables in a meta
    tag since that is not cf ?
    How can I go from the page with the javascript popup to the
    page with cfdocuement pdf format ?
    Thanks

    You would have to craft the url of the popup page to pass the
    reference_no. I'm going to assume that you're using the "Post"
    method on your form, which means you have to pass the reference_no
    form value as a url/GET value.
    <cflocation
    url="somesite.com/popup.cfm?reference_no="#form.reference_no#">
    and then on the popup.cfm page, consume the url.reference_no
    again as part of the url in the meta refresh
    <cfoutput>
    <meta http-equiv="refresh"
    content="10;url=http://somesite..com/pdfDisplay.cfm?reference_no=#url.reference_no#"
    />
    </cfoutput>
    If you're just trying to prevent double submission, you could
    just lock the
    form from double submission clientside. In the method below,
    it actually hides the form. There are other options such as
    displaying an inline IFRAME which would simulate a popup and would
    remain until the page was refreshed from the form submission. I
    would also consider this old school. You might want to check out
    other options as far as Web 2.0 using AJAX and frameworks such as
    JQuery.
    <script language="javascript">
    function formSubmit(){
    if (document.myForm.isSubmitted.value != "no"){
    return false;
    }else{
    document.myForm.isSubmitted.value = "yes";
    document.getElementById('submitdiv').style.display =
    "block";
    document.getElementById('formdiv').style.display = "none";
    document.myForm.submit();
    </script>
    <div id="submitdiv" style="display:none">
    Your Form has been submitted.
    </div>
    <div id="formdiv" style="display:block">
    <form method="post" name="myForm" id="myForm"
    action="HandleSubmission.cfm">
    <input type="text" name="isSubmitted" value="no">
    <input type="button" name="manSubmit" value="submit"
    onclick="formSubmit();">
    </form>
    </div>

  • Passing Variable with a URL

    Hi,
    I’m trying to pass variables first - from a non-secure
    web site to a secure (on another server) form. I have that figured
    out, but when I go to submit the form, the variables I passed to
    the form, are not showing up on my return e-mail from the form.
    Here is the code for the FORM ACTION & Reurn Template -

    What do you see in the URL scope when you CFDUMP the page?
    (Hint: this problem is about scoping variables.)

  • RWCLIENT issue when passing parameters with spaces

    AS 10.2.0.2 on Sun Solaris 10. We have reports that are scheduled and sum of the parameters have spaces in the value. For example parm1=I am with spaces. We would then generate a command line that shows the parameter like rwclient.sh server=rep_serv report=report1 parm1=I am with spaces. This errors with numerous messages. I tried surrounding the value in single quotes like this rwclient.sh server=rep_serv report=report1 parm1='I am with spaces'. When running the quoted command the report server shows the parameter as parm1='I' am with spaces. We have the parameter page of the report as the first page which allows us to see what was actually used as parameters. Of course the data in the database has no value that matches with the single quotes so no data. I need to be able to pass a value with spaces and it actually show as a parameter with spaces. We do not have this issue when we can run with forms built-ins as you actually build a parameter list to pass. Thanks in advance.
    Edited by: gdaustin1 on Jan 26, 2012 8:03 AM

    It's a bit of both I guess. On a command line a space is used to separate switches and variables. Like this demo.bat:
    @echo off
    echo %1Results in:
    C:\Temp>demo.bat Hello World
    Hello
    C:\Temp>demo.bat "Hello World"
    "Hello World"If you want to remove the double quotes, you have to change your source code to:
    @echo off
    echo %~1Now you get:
    C:\Temp>demo.bat "Hello World"
    Hello World

  • Passing parameter with space?

    How does java pass parameter value with spaces? e.g. url?param1=value with space .
    Is there any built in method like PHP's addslashes?
    Thanks.

    URLEncoder.encode("value with
    space","UTF-8")Also the core JSTL tag c:url will encode parameters with spaces, and of course there's the crude way of just using the + sign.

  • Passing parameters with spaces in Oracle reports

    I hav a system that passes a query string to a servlet and generates an Oracle Report. All of the varibles worked Ok as long as they don't have spaces in them. Whenever a parameter with spaces is encountered,it generates an error. i tried to enclose it in single or double quotes but it didn't work. I also tried to insert the Url Encode for spaces which is %20 but it also generated an error. pls help me on this one...

    I suppose you're working with GET instead of POST. Try to use the POST method; this gives you the possibility to work with a URL without parameters behind the question mark. This might be the solution to your problem.

  • Passing variables with cfhttp

    I need to pass a dynamic variable using cfhttp. 
    This code:
    <cfhttp method="get" url="#cgi.server_name#/page.cfm?pageid=#pageid#" resolveurl="Yes">
    <cfoutput>
        #cfhttp.FileContent#
    </cfoutput>
    Returns the error:
    The 3 parameter of the Mid function, which is now -8, must be a non-negative integer.
    This code returns the same error.
    <cfhttp method="post" url="#cgi.server_name#/page.cfm" resolveurl="Yes">
        <cfhttpparam type="Formfield"
            value="#pageid#"
            name="pageid">
    </CFHTTP>
    <cfoutput>
        #cfhttp.FileContent#
    </cfoutput>
    Any assistance would be appreciated.

    You don't say what line in your code is throwing the error...???  Try putting a
         <CFDUMP var="#cgi#">
    before the first line and a
         <CFDUMP var="#cfhttp#">
    after the CFHTTP call.  That will help you to understand if there is something wrong with the CGI var you are trying to pass as part of the URL, and will also show you whether the CFHTTP gets executed and what the return status is. Let us know how that works out and we can help you with further debugging.
    good luck!
    reed

  • Passing variable with function in AS3

    This is a function on the first frame of a .fla updated to AS3 from an old AS2 file:
    function initialize() {
    MovieClip(root).stage_target_mc.max_messages = 600;
    When the function is called it should set "max_messages" to 600 in AS3, right?
    Thanks

    Only if the function is called.  If this is going to be a set value that applies any time, then you don't need that line in a function, and if it's on the main timeline, you don't need the root reference.

  • How to do a Get-ADGroup and pass SamAccountName with spaces

    Hi,
    I read a text file of groups in SamAccountName form into a variable, then do a Get-ADgroup to ensure they are in a specific SearchBase, then I want to delete them if found in the Searchbase.  Problem is the SamAccountNames have spaces in them
    and I cant figure out the right syntax in the Get-ADGroup for the $Group variable to accomodate the spaces, or put quotes around the $Group variable.  Examples of SamAccountNames are Accounts Payable and LDW URP 
    $EGroups = Get-Content c:\MyGroups.txt
    [int]$counter = 0
    Foreach ($Group in $EGroups) {
    Try {
    $counter++
    $DMGroup = Get-ADGroup -Filter {SamAccountName -eq $Group} -SearchBase "OU=Test,DC=Acme,DC=Com" -SearchScope Subtree
    Remove-ADGroup $DMGroup -Whatif
    $Group | Out-File $env:HOMEPATH\EGroupsRemoved.txt -Append
    Catch {
    $Group | Out-File $env:HOMEPATH\EGroupsNotRemoved.txt -Append
    Write-Host "Processed $counter Groups"
    Thanks for your help! SdeDot

    If you're using the SamAccountName then I would recommend you use the parameter set that allows you to provide it to the -Identity parameter, not the -Filter parameter. You can see the three parameter sets if you do a Get-Help Get-ADGroup and look in the
    Syntax section. The example below will read in groups listed in a text file, even if there are spaces in the groups, and return information about each of them as they pass through the Get-ADGroup cmdlet. You'll definitely want to keep your try-catch blocks
    in place to help gracefully handle any issues where a group cannot be found in the directory.
    Example Text File
    ADMIN-Front Office Staff
    ADMIN-Front Office Students
    $Groups = Get-Content -Path 'C:\GroupFile.txt'
    Foreach ($Group in $Groups) {
    Get-ADGroup -Identity $Group

  • Passing parameters with spaces to SCCM Run PowerShell Script task

    I am working on an OS deployment task sequence in SCCM 2012 R2 with several Run PowerShell Script tasks.  Most of them run fine, but I am having trouble with the one I need to pass parameters to.
    The parameters I need to pass are:
    -ComputerOU "ou=All Workstations,dc=contoso,dc=com" -GroupDN "cn=Group1,ou=All Groups,dc=contoso,dc=com"
    I have that line (with actual DNs) entered in Parameters of the task.
    But when the script runs on the target machine, the values of the parameters in the script are truncated at the spaces.  $ComputerOU is set to "ou=All" and $GroupDN is set to "cn=Group1,ou=all"
    What syntax should I be using the Parameters field of the Task in order to properly pass PowerShell parameter string values that include spaces?
    Tim Curwick
    MadWithPowerShell.com

    Thank you, TC, but I am not calling the parameters from within PowerShell.
    The parameters are in the settings of a task sequence task to be used by the task to launch a script.  The syntax I am using would be correct for use within PowerShell or from a command line or batch script, but SCCM appears to be doing some parsing
    before or while it is passing them to the script, possibly dropping the quotes which causes mishandling of the spaces in the string values.
    Historically, it is always challenging to give one application parameters to pass to another application, and the required syntax can get quite tricky when the two application handle quotes or spaces differently, or when the parent application wants to parse
    something intended to be passed on as is to the child application.
    I'm sure someone has already figured out what the syntax needs to be for doing this with an SCCM 'Run PowerShell Script" task, it's just one of those issues that is hard to Google effectively.
    Any other ideas?
    Tim Curwick
    MadWithPowerShell.com

  • Reference query variable with space in it

    We are trying to display the results of a query where we have
    no control over the query to be able to do any aliasing. One of the
    query variables is called"Mail List" and has a space in it. >:-(
    Is there a way to have ColdFusion resolve that variable within
    pound signs like normal? I thought maybe #[Mail List]# but that
    didnt work. I know I can alias this out in the query but like I
    said we cant. Is this even possible?

    can you post your code?
    you did replace "yourquery" with your actual query name,
    didn't you?..
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Programmatic launch of reader 11.0.3 won't open file with spaces in the path?

    The application I work on uses a PDF file for online help.  We programmatically launch the help file into the user's PDF viewer.  The path to the help file may have spaces in the directory names or filename.  With previous versions of Adobe Reader, it would launch just fine (path passed in on the command line).  However, with 11.0.3, I find that if I don't include an extra set of quotation marks around the path, it fails to open when there are spaces in the directory name.  What changed between then and now to cause this problem?  If I add extra quotation marks, will users with an older version of Reader not be able to open the file?
    Edit -- running in Windows 7, launched from C# .NET 3.5.

    benten2000 wrote:
    Install is fine and the icon is shown on the desktop and pdf files icons also change to Acrobat.
    I seem to have missed this part when reading your original post.  See if anything in this article fixes your problem: http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Can I Pass String with Spaces in it To exec()

    Hello All,
    I am passing a Command in Runtime.exec() method, which is a String and contains a folder name(Folder---Name) which is having Spaces in it. For eg. c:/Folder/Folder(Spaces in between)Name/Data.java
    My Problem is when i pass it to exec() it automatically gets converted to a Folder name with only one space
    E.g c:/Folder/Folder(One Space in between)Name/Data.java,
    Because of which my command is not able to find the Folder specifed.
    I want the Original Path(c:/Folder/Folder(Spaces in between)Name/Data.java) to be passed and executed through
    exec() so that the command runs successfully..........
    Any help will be highly appreciable..
    Thanks
    Er.Atul

    When I make a simple array of String a, Try to run simple command like "change Directory"....
    *try {*+
    String[] a = {"cd atul", "cd poc"};+
    Runtime runtime = Runtime.getRuntime();+
    Process procedure = runtime.exec(a);+
    +*} catch (IOException ex) {*+
    Logger.getLogger(Testing.class.getName()).log(Level.SEVERE, null, ex);+
    It Gives me this type of Exception............
    Feb 20, 2009 5:13:36 PM Testing <init>
    SEVERE: null
    java.io.IOException: Cannot run program "cd atul": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:466)
    at Testing.<init>(Testing.java:26)
    at Testing.main(Testing.java:36)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
    at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
    *... 4 more*

  • Using shell pass parameters with space to Java

    Hi friends,
    I have a shell script accepting parameters as below
    #!/bin/sh
    #test.sh
    ./setEnv.sh
    java -classpath $CP com.rky.Main *$@*
    CP=
    If I run the script like this ./test.sh -annotation "This is a problem".
    If shell pass the parameters to Java, the parameter "This is a problem" will recognized as 4 parameters by java. That's not what I want . I still need java use it as a whole parameter.
    Do you have any easy ideas to resolve this problem out of my java code?
    Thank you.

    yes, from the bash manpage:
           @      Expands to the positional parameters, starting from  one.   When
                  the  expansion  occurs  within  double  quotes,  each  parameter
                  expands to a separate word.  That is, "$@" is equivalent to "$1"
                  "$2"  ...   If the double-quoted expansion occurs within a word,
                  the expansion of the first parameter is joined with  the  begin-
                  ning  part  of  the original word, and the expansion of the last
                  parameter is joined with the last part  of  the  original  word.
                  When  there  are no positional parameters, "$@" and $@ expand to
                  nothing (i.e., they are removed).(your manpage could be a little different because of versions, and I got this from the manpage of bash on a mac. but the main things should apply)

Maybe you are looking for

  • Problem connecting to a wireless network

    I am using 'Aztech' wifi router/ADSL modem for wireless network at my home. I had been connecting fine with the internet using it until yesterday, when, after a software update, I have been unable to connect to the network (I can access it with my wi

  • Resource Controls on Oracle Systems

    The normal resource controls for the oracle user are pretty straight forward -- per the Oracle documentation even though it is hugely Solaris 10 deficient. (we are deploying on solaris 10 u8) We are deploying a new data center with 2 and 3-node SFRAC

  • Endless Loop: Ipod in Recovery Mode

    i have a 5th gen 30G Ipod that goes into recovery mode every time it is plugged into my computer. I will restore it to factory settings only to have it return to recovery mode. I have changed the drive name of the Ipod and also reformatted the hardri

  • Add a New line to ALV Grid control

    Hi experts,    My requirement is after filling ALV grid, user will select a + button from the menu, I need to add a new line next to the selected ALV line (Like in a table control).  Does it posible to do this? If can any body tell me how I can do th

  • Static interface Vs Static nested interface declaration

    Hi, I have observed that static interface declaration is not allowed in Java. However static nested interface declaration is allowed. I could not understood reason behind this behavior. e.g. interface A{      void AA();      public static abstract in