Encoding URL Query String .

Suppose my url is
Now i dont want my url to look exactly like this but instead of these alpabets abc some special charaters should appear on the querry string in url .
If any body could help please .
Thanx in advance .

Don't be silly, of course you can! You just need a little JavaScript.
Somewhere in your document header put a short script like this:<SCRIPT>
function doPost(val1,val2,val3,val4){
   var f = document.formName;
   f.FirstVal.value = val1;
   f.SecVal.value = val2;
   f.ThrdVal.value = val3;
   f.FrthVal.value = val4;
   f.submit();
</SCRIPT>Your form will look something like this:<FORM NAME="formName" METHOD=POST ACTION="some.action">
<INPUT TYPE=HIDDEN NAME="FirstVal" VALUE="">
<INPUT TYPE=HIDDEN NAME="SecVal" VALUE="">
<INPUT TYPE=HIDDEN NAME="ThrdVal" VALUE="">
<INPUT TYPE=HIDDEN NAME="FrthVal" VALUE="">
</FORM>And your links will look something like this:<A HREF="javascript:doPost(1,2,3,4);">Link1</A>
<A HREF="javascript:doPost(3,4,5,6);">Link2</A>
<A HREF="javascript:doPost(4,5,6,7);">Link3</A>

Similar Messages

  • URL query string block?

    I was asked recently if there is a way to "block" the potential for someone to hijack a SWF by spoofing a variable via a URL query string.
    For example, if there was a path variable hardcoded in the SWF that is pointing to data XML file, but someone found your path variable and typed in:
    http://www.mysite.com/myFlash.swf?dataFile=maliciousdata.xml
    That could change the variable in the SWF correct? Is there a way to block this behavior? Maybe a trick? Was thinking of delaying the declaration of the variable in the SWF in order to "void" anything coming in via the query string but want to know if there are other methods that could be used.
    Thanks!

    Hi,
    in the old (AS1) days, url variables could become program variables. With AS3, you need to specifically retrieve them from an object
    Of course, if you create your swf to do that (perhaps to see different data files during testing), someone else could abuse the feature

  • How to access FlashVars or URL Query String

    I am a bit of a rookie with Flash/AS3 and I need help trying to access FlashVars or URL in Object/Embed tags. I've searched in the Internet and the forums but cannot get my head around how to implement this.  Here is my example.
    1) ACTION SCRIPT - I have created a simple flash banner with clickable button (sparkle) with a mouse down event.
    The action script (AS3) for the button is the following:
    sparkle.addEventListener(
        MouseEvent.MOUSE_DOWN,
        function(evt:MouseEvent):void {
            var url:String = "http://www.[site_url].com/as/img.cfm";
          var request:URLRequest = new URLRequest(url);
            var variables:URLVariables = new URLVariables();
            variables.gphc = "382";
            request.data = variables;
            request.method = URLRequestMethod.GET;
          navigateToURL(request);
         *** the core issue to resolve is how to make the line above (variables.gphc = "382";) to be set dynamically.  I would like for the variable to come from the FlashVars or the URL vars
    2) OBJECT/EMBED - my object/embed code with include FlashVars and URL Query String
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ID="bannerAD" WIDTH="728"  HEIGHT="90">
         <PARAM NAME="movie" VALUE="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382">
        <PARAM NAME="quality" VALUE="high">
        <PARAM NAME="bgcolor" VALUE="#FFFFFF">
        <PARAM NAME="FlashVars" value="gphc=382" />
        <EMBED src="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382" quality="high"WIDTH="728" HEIGHT="90" TYPE="application/x-shockwave-flash"  PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="gphc=382" />
    </OBJECT>
    Questions that I need answered ... How do we access the FlashVars or the URL Query String?  I have found many references to loaderInfo but no clear way to implement that I'm able to understand. So if the loaderInfo is the key, where do I add in the loaderComplete() function into my action script above in #1?
    function loaderComplete(myEvent:Event)
      var flashVars=this.loaderInfo.parameters;
      gphcTextField.text=flashVars.gphc
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    Any help is much appreciated.

    Thank you for your input.  I implemented your sugguestion in the following way without any success.  Notice below in the addEventListner that I have added the snippet of code.  Is this a good place (correct place) to set the local_var?  I did confirm that the FlashVars and URL variables were set.
    sparkle.addEventListener(
         MouseEvent.MOUSE_DOWN,
         function(evt:MouseEvent):void {
             var url:String = "http://www.[site_url].com/as/img.cfm";
             var request:URLRequest = new URLRequest(url);
             var variables:URLVariables = new URLVariables();
             var local_gphc:String = LoaderInfo(this.root.loaderInfo).parameters.gphc;
             variables.gphc = local_gphc;
             request.data = variables;
             request.method = URLRequestMethod.GET;
           navigateToURL(request);
    Thank you for your help.

  • Include XML payload as URL query string

    Hello Gurus -
    I have a business requirement that I'm hoping you all can help me with:
    Scenario: Send XML message from SAP XI to a third party system via the Receiver Plain HTTP Adapter
    I need to include the actual XML message as a query string in the target URL at the time of posting. The content of the XML message is determined within XI message mapping and will not be known until runtime, so the URL determination will need to be dynamic.
    For example - a target URL with the "xmldata=" query string:
    http://server01/receiver.asp?xmldata=<?xml version="1.0" encoding="UTF-8"?><headertag><tag1><value1></tag1></headertag>
    Does anyone know how to do this - Is there some communication channel configuration and/or programming that would work?
    Thanks to all!
    Chad

    Hi,
    This is very similar to our scenario. By manipulating some of the Plain HTTP Adapter parameters, my colleague was able to post using xmldata. He set content type to text/plain then set the prolog to xmldata=. Let me know if this worked.
    Regards

  • CiscoIPPhoneExecute with URL query strings

    Has anyone successfully used the CiscoIPPhoneExecute xml object with URLs that contain query strings? Specifically, I'm wondering how to pass query string values that include spaces.
    I'm able to successfully execute a URL such as:
    http://<webaddress>/PushPage.asp?Field1=Value1&Field2=Value2
    However, when I try to execute a URL like:
    http://<webaddress>/PushPage.asp?Field1=Value with space&Field2=Value2
    The phone displays an error message that says "Not Available", and the url that is pushed never gets executed.
    I have tried representing spaces in the query string values using both the conventional "+" symbol, and I have also tried using "%20". Neither of these escape sequences seems to work.
    Thanks for any advice.
    -Mike

    Thanks for the response. As I stated above, I know that ampersand (&) must be escaped, and I am properly escaping that character in the XML packets. I'm not having any problems pushing URLs that contain ampersand.
    What I can't figure out is how to push URLs with *SPACES* included in the query string values. Please see the example URLs I posted in my original message, specifically the second URL. Again, I omitted the necessary ampersand escape sequence there for clarity.
    -Mike

  • Howto read url query string? Help :(

    Hi everyone, I am trying to read the query string from within an applet loaded from a URL. I am loading netscape with the following URL
    "http://localhost/mypage.html?param1=help"
    I am using code:
    System.out.println(getDocumentBase().getQuery());
    and all I am getting is a null?
    This works with appletviewer so could someone tell me what is going on. I have searched the forum but it seems no answer yet exists for this. Perhaps its not possible?
    Info:
    OS: Redhat Linux 8
    java version "1.3.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
    Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

    hi,
    can it be that there is a problem with netscape?
    it would suggest to try on ie, but you use linux and i dont think theres an ie-version for linux available ;P
    i would try it on a different browser like opera or something.
    thats my suggestion.
    hope this helped
    cu Errraddicator

  • Portal URL Query String

    I am creating a Portal component and I want to catch the query string passed thru Portal url.
    Example:
    Suppose If user login thru this URL
    http://localhost:50000/irj/portal?userID=test
    I want to catch this userID=test in my component.
    Is it possible?
    Many Thanks,
    B Das
    Message was edited by: B Das

    Hi Das,
    HttpServletRequest Object contains many methods like
    HttpServletRequest servletRequest = request.getServletRequest();
    servletRequest.getRequestURL();
    servletRequest.getQueryString(); -->
    servletRequest.getParameter();
    servletRequest.getProtocol(); etc..
    Hope this helps..
    Regards,
    Karthick K Eswaran

  • HELP INPUT TYPE = hidden  values SEEN IN URL QUERY STRING!!!

    Trying to do session management using hidden fields.
    The fields that are suppose to be hidden show up in the query string of the URL.
    I have included the code, the output to the web page
    and the URL with the "hidden" fields please help.
    HIDDEN FIELDS IN URL QUESRY STRING
    http://localhost:8080/myApp/servlet/Servlet077?firstName=Sandra&item=Michael
    WEB PAGE OUTPUT
    Enter a name and press the button
    Name:
    Your list of names is:
    Michael
    Sandra
    JAVA SOURCE CODE
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet077 extends HttpServlet{
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException{
    //An array for getting and saving the values contained
    // in the hidden fields named item.
    String[] items = req.getParameterValues("item");
    //Get the submitted name for the current GET request
    String name = req.getParameter("firstName");
    //Establish the type of output
    res.setContentType("text/html");
    //Get an output stream
    PrintWriter out = res.getWriter();
    //Construct an HTML form and send it back to the client
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Servlet07</title></head>");
    out.println("<BODY>");
    //Substitute the name of your server or localhost in
    // place of baldwin in the following statement.
    out.println("<FORM METHOD=GET ACTION="
    + "\"http://localhost:8080/myApp/servlet/Servlet077\">");
    out.println("Enter a name and press the button<P>");
    out.println("Name: <INPUT TYPE=TEXT NAME="
    + "\"firstName\"><P>");
    out.println("<INPUT TYPE=submit VALUE="
    + "\"Submit Name\">");
    out.println("<BR><BR>Your list of names is:<BR>");
    if(name == null){
    out.println("Empty<BR>");
    }//end if
    if(items != null){
    for(int i = 0; i < items.length; i++){
    //Display names previously saved in hidden fields
    out.println(items[i] + "<BR>");
    //Save the names in hidden fields on form currently
    // under construction.
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + items[i] + ">");
    }//end for loop
    }//end if
    if(name != null){
    //Display name submitted with current GET request
    out.println(name + "<BR>");
    //Save name submitted with current GET request in a
    // hidden field on the form currently under
    // construction
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + name + ">");
    }//end if
    out.println("</body></html>");
    }//end doGet()
    }//end class Servlet07

    1. Change <form name=xxx action="your_servlet" mathod="Get"> to
    <form name=xxx action="your_servlet" mathod="POST">
    2. Add the following lines of code to your servlet.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {
            doGet(req,res);
            return;
    }Sudha

  • On Demand process get url query string

    Hi,
    When I call On Demand process , is there way inside that process get url query sting or whole url did call On Demand process?
    I did try below but it returns null
    owa_util.get_cgi_env('QUERY_STRING')Regards,
    Jari

    You'd know this better than me - but I seem to recall there are 2 Oracle sessions involved in normal page processing - one for the request and one for the response. wwv_flow.show seems to correspond to the response session, not the request session (that might have the env variables you're looking for). Could that explain what you're seeing?

  • HTTP Sender Adapter - URL / Query String - Posting problems ?

    Hi All,
    Scenario: Partner sending order request via HTTP adapter to XI
    I have configured my scenario and this is a sample URL I gave to Partner but when they try to post, they get "Connection Failed" error.
    http://server.cmpny.com:1234/send/test/message?
    service=Send_Order
    &namespace=urn%3Asap-com%3Adocument%3Asap%3Aidoc%3Amessages
    &interface=ORDERS.ORDERS05
    &party=ABC&qos=EO/
    Party Name : ABC
    Service : Send_Order:
    Interface: ORDERS.ORDERS05
    Namespace: urn:sap-com:document:sap:idoc:messages
    This partner has been "successfully" exchanging data for other messages using the same hostname/userid/passwd, so is there any problem my URL encoding ?
    Any help is appreciated
    Bob

    Hey
    i m not sure how u generated the URL for the scenario but the best approach would be to use the following HTTP test tool for it
    /message/266750#266750 [original link is broken]
    just use the code given by Mr.Stefan Grube .
    secondly instead of host name ,give the IP address of the XI server.
    Thanx
    Aamir

  • Project server URL Query strings

    Hello,
    I'm trying to auto populate Project Server with project details, but I can't find the strings for name and Descriptions, 
    Trying: http://servername/pwa/Project%20Detail%20Pages/ProjectDetails.aspx?NewProject=yes&EntProjectTypeUID=8e006270-7ea1-e311-93f7-00155d01206a
    using &name=test
    Didn't fill in the name
    any Idea.
    Thanks
    tony
    Antoine AL Ibry

    Antoine,
    A little more detail would help. What are you using actually to auto-populate?
    The Name, and other properties in Project Server are "fields", and not page properties (not sure if I am using the right terminology here, but hope you get the idea).
    My guess is that you will have to use one of the PSI methods to do this.
    http://msdn.microsoft.com/en-us/library/office/ms457477(v=office.14).aspx
    Also you might get better answers if you post to the Project Customization and Programming forum.
    Prasanna Adavi,PMP,MCTS,MCITP,MCT http://thinkepm.blogspot.com

  • How to pass url parameter string to a query

    I need urgent help please, to pass a mysql query string from a master page to another details jsp page using a url parameter. The master page's url parameter looks like this;
    <a href="Details.jsp?jobs=<c:out value="${row.actions_id}"/>"><c:out value="${row.action_title}"/></a>How can I query the mysql database using the url query string to get the query details.
    Please help me out with detailed example please.

    You can get the parameter value using HttpServletRequest#getParameter():String jobs = request.getParameter("jobs");You can interact with databases using the JDBC API. This is a different topic. If you aren't familiar with it yet, then learn it. There is a very good JDBC tutorial here at Sun.com: [http://java.sun.com/docs/books/tutorial/jdbc/index.html]. Once you're familiar with that, create a DAO class which does the all the database interaction tasks. Create a method which takes the jobs value as parameter and let it return result(s) accordingly. You may find this article useful either: [http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html].

  • Dealing with invalid query strings

    I have created a mysql/php site with master and product detail pages. The product details are filtered via a url query string
    e.g. domain/proddetail.php?productID=38
    This all works fine except for the case when a product is deleted and the productID is no longer valid. Because Google continues to index these pages vsitors then get a page displaying no data .
    How do I gracefully deal with these invalid productIDs? Preferbly I want to redirect to a error404 page so that Gogle delists but simply displaying a product not found notice would be better than nothing.
    Thanks

    In your proddetail.php page, test the recordset rowcount - if it is zero, redirect to your 404 page.

  • Sharepoint 2013 :Content Search Web part Property Filter By Query String - How to use ?

    Hi,
    I would like to filter data that is displayed in content search web part  by using  URL.
    I tried to use Value of a parameter from a URL - Query String.Parameter1
    But have no idea how to use it.
    Can someone help me pleas ?

    duplicate thread
    http://social.msdn.microsoft.com/Forums/en-US/f9fef155-1aa3-43b5-b285-5eae5d036b8d/content-search-webpart-property-filter-by-query-string-how-to-use-?forum=sharepointgeneral
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Passing a portlet parameters on the Query String

    Hello,
    We have a portal page with a portlet on it and would like to be able to make this portlet dynamic by using additional parameters on the portal url query string.
    Back in version 5, I was told that this couldn't be done. Perhaps someone knows whether the G6 portal supports this?

    Yes, you can pass portal url into porlet in G6.
    1. You have to check box "HostPageURI" (don't remember exactly, but close to this one) on User Information page for Web Service.
    2.Use getHostPageURLQueryString() method (for IPortletRequest) to retrive QueryString value;
    3. Parse url value manualy to access parameters and values.
    But think twice before do this. This is because there are more effective ways to pass data and "make portlet dynamic":
    1) Portlet Settings (classic way, total page refresh);
    2) Adaptive portlets techology (inline refresh, passing data to other portlets on the same page);
    3) Portal Session object (for G6). Way to pass data to portlets placed on different page.
    Edited by Bryazgin at 01/18/2007 7:11 PM

Maybe you are looking for

  • RSPC Variant does not exist - Could not find or load print parameters

    We are on BI 7.0 (support pack SAPKW70017).  We recently freshed test system from production.   After the refresh, we have problems opening all the process chains.   1. When I go to RSPC to open a process chain, I get many messages like this: Variant

  • Beware: Preview deletes changed/unsaved file without asking

    Since this happened to me twice now and I lost an hour of work, I'd like too share with you my bad experience with Preview.app A nice feature of Preview is the ability to add annotations to any pdf-file. If you add an annotation (e.g. a comment or so

  • RFC Message Creation

    Hello All, I am new to XI and trying out and RFC scenario. I have an SAP R/3 system. All I wanted to know is how I can create an RFC message with two import parameters and one export paramter. The two import parameters will serve as request parameter

  • Contribute & the webdesigner's clients

    Hi here is my question , i am a web designer, i am creating a website "Aqua" for my client "Bob" in Dreamweaver, I create editable regions , templates etc... in Contribute i create a Bob user password, a contribute key access etc... to allow Bob to e

  • Why can Pages not be stopped?

    I never had any problems with Pages '08 untill the last days: I can use the program, but can only stop it with force quit. There are no problems with Keynote and Numbers. I uninstalled and reinstalled IWork '08 and the updates. I used DiskUtility, On