Search Results

Search found 19374 results on 775 pages for 'url modification'.

Page 61/775 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • ajax parameter to send correctly a variable to a specified url

    - by kawtousse
    I am trying to send data to a servlet from a js file but the servlet never received the parameter. so this is what I have: function showProject(prj) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="ServletxmlGenerator"; idprj = prj.options[prj.selectedIndex].value; //alert(idprj); url=url+"?idprj="+idprj; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } and to capture th request it is with: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String projectcode=request.getParameter("idprj"); System.out.println("++++projectCode:=" +projectcode); the output is like: ++++projectCode:=null Can any one explain it to me it seems to be correct but i didnot find the error.Thinks

    Read the article

  • PHP Dynamic Breadcrumb

    - by Adrian M.
    Hello, I got this code from someone and it works very well, I just want to remove the link from the last element of the array: //get rid of empty parts $crumbs = array_filter($crumbs); $result = array(); $path = ''; foreach($crumbs as $crumb){ $path .= '/' . $crumb; $name = ucfirst(str_replace(array(".php","_"),array(""," "), $crumb)); $result[] = "<a href=\"$path\">$name</a>"; } print implode(' > ', $result); This will output for example: Content Common File I just want a to remove the link from the last item - "File" to be just plain text.. I tried myself to count the array items and then if the array item is the last one then to print as plain text the last item.. but I'm still noob, I haven't managed to get a proper result.. Thank you!

    Read the article

  • Automatically hyper-link URL's and Email's using C#, whilst leaving bespoke tags in place

    - by marcusstarnes
    I have a site that enables users to post messages to a forum. At present, if a user types a web address or email address and posts it, it's treated the same as any other piece of text. There are tools that enable the user to supply hyper-linked web and email addresses (via some bespoke tags/markup) - these are sometimes used, but not always. In addition, a bespoke 'Image' tag can also be used to reference images that are hosted on the web. My objective is to both cater for those that use these existing tools to generate hyper-linked addresses, but to also cater for those that simply type a web or email address in, and to then automatically convert this to a hyper-linked address for them (as soon as they submit their post). I've found one or two regular expressions that convert a plain string web or email address, however, I obviously don't want to perform any manipulation on addresses that are already being handled via the sites bespoke tagging, and that's where I'm stuck - how to EXCLUDE any web or email addresses that are already catered for via the bespoke tagging - I wan't to leave them as is. Here are some examples of bespoke tagging for the variations that I need to be left alone: [URL=www.msn.com]www.msn.com[/URL] [URL=http://www.msn.com]http://www.msn.com[/URL] [[email protected]][email protected][/EMAIL] [IMG]www.msn.com/images/test.jpg[/IMG] [IMG]http://www.msn.com/images/test.jpg[/IMG] The following examples would however ideally need to be automatically converted into web & email links respectively: www.msn.com http://www.msn.com [email protected] Ideally, the 'converted' links would just have the appropriate bespoke tags applied to them as per the initial examples earlier in this post, so rather than: <a href="..." etc. they'd become: [URL=http://www.. etc.) Unfortunately, we have a LOT of historic data stored with this bespoke tagging throughout, so for now, we'd like to retain that rather than implementing an entirely new way of storing our users posts. Any help would be much appreciated. Thanks.

    Read the article

  • Limit URL Parameter Length in Web.Config

    - by Alex
    Is it possible to add some kind of restriction to the web.config to limit URL parameter length? I want to prevent people at the earliest possible point from submitting too large URL parameters so the server doesn't get taxed more than necessary in the event that somebody tries to "attack" it with large invalid URL parameters.

    Read the article

  • How to execute an Ant task only when source files have been modified?

    - by hughalexb
    There must be an easy way to do this. I build a Flex app using ant that depends on a SWC library, which works fine except that it rebuilds the library whether it needs to or not. How do I tell ant to only run the task if any of the sources files of the library (*.as, *.mxml) are newer than the SWC? I've looked at <dependset but it only seems to delete files, not determine whether a task should be run or not. <depend seems to expect a one-to-one relationship between the source and target files rather than a one-to-many relationship -- I have many input files and one output file, but no intermediate object files. Thanks a lot, Alex

    Read the article

  • AxWindowsMediaPlayer does not play audio/video from url ?

    - by Madhup
    HI, I am using activeXMediaPlayer to play files from url but each time I pass a url to it shows the message , "either the file is corrupted or player does not support the file format u are playing." But when i run the same url on browser the file is downloaded and this downloaded file can be played on the media player. I am not able to find out what the problem is . Because the same cod plays the local file and the downloaded files but not file from url Although the same code worked few months ago for the urls So is this my fault or some server related issues can affect this thing. Please help me I am in big trouble. Regards, Madhup

    Read the article

  • getting parts of url window.location

    - by ilkin
    Can someone help me with url hash? I use this code to get the current url and then send the data as json, but the hash part seems to be stripped then. i tryed to use href and hash and i always get the default.aspx but no hash part like #anchor. var location = String(window.location); var title = String(document.title); var text = { 'url': location, 'title': title };

    Read the article

  • Facebook redirect after login not working when url is dynamic

    - by dythffvrb
    This is my code: $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions', 'redirect_uri' => 'http://mysite.com/', )); It works but if I remove redirect_uri it doesn't work anymore. $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions' )); According to Facebook domcumentation redirect_uri is optional. https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/ Im trying to redirect the users to the same url they were on before logging in. Update: This problem occurs when the url is mysite.com/post23 but when url is mysite.com/staticpage or mysite.com there are no problems Any workarounds? EDIT: It looks like a bug, it doesn't work with certain url in the same site I wil try and report it to Facebook.

    Read the article

  • jquery ajax vs browser url

    - by danwoods
    Hello all, I'm trying to use youtube's api to bring back a listing of a user's videos. The request url looks something like: http://gdata.youtube.com/feeds/api/users/username/uploads with 'username' being the correct username. This bring back the appropriate url in the browser. However when I try to access that url via jQuery's $.ajax or $.get functions, using something like: $.ajax({ //set parameters url: "http://gdata.youtube.com/feeds/api/users/username/uploads", type: "GET", //on success success: function (data) { alert("xml successfully captured\n\n" + data); }, //on error error:function (XMLHttpRequest, textStatus, errorThrown, data){ alert(" We're sorry, there seem to be a problem with our connection to youtube.\nYou can access all our videos here: http://www.youtube.com/user/username"); alert(data); } }); $.get("http://gdata.youtube.com/feeds/api/users/username/uploads", function(data){ alert("Data Loaded: " + data); }); I get an empty document returned. Any ideas why this is?

    Read the article

  • C#: convert Unicode to use as url

    - by Feryt
    Hi. I'm working on multilingual Asp.NET MVC application. In url i need to use category name. Is there any way how to convert i.e japanese text to its url safe equivalent? Or should i use original text in url(www.example.com/??/? = www.example.com/product/car)?

    Read the article

  • Make phone browser open a URL on Symbian S60 3rd Ed programmatically

    - by ardsrk
    On clicking a URL displayed in my application running on a Symbian S60 3rd Edition device should make the phone browser ( which is already open ) open the specified URL. Here is the code: _LIT( KUrlPrefix,"4 " ) void CMunduIMAppUi::OpenInBrowser(const TDesC& aUrl) { HBufC *url = NULL; const TInt KWmlBrowserUid =0x10008D39; TUid id( TUid::Uid( KWmlBrowserUid ) ); TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); TApaTask task = taskList.FindApp( id ); // Checks if the browser is already open if ( task.Exists() ) { HBufC8* parameter = HBufC8::NewL( aUrl.Length()+ KUrlPrefix().Length()); parameter->Des().Copy(KUrlPrefix); parameter->Des().Append(aUrl); task.BringToForeground(); task.SendMessage(TUid::Uid(0), *parameter); // UID not used delete parameter; parameter = NULL; } } When I use this code to open a URL the browser comes to the foreground but does not get directed to the URL. I suspect something is wrong in SendMessage call that is called after the browser is brought to foreground: task.SendMessage(TUid::Uid(0), *parameter); // UID not used

    Read the article

  • url to http request object

    - by takeshin
    I need to convert string like this: $url = 'module/controller/action/param1/param1value/paramX/paramXvalue'; to url regarding current router (including translation and so on). Usually I generate the target urls using url view helper, but for this I need to specify all params, so I would need to manually explode the string. I tried to use request object, like this: $request = new Zend_Controller_Request_Http(); // some code here passing the $url Zend_Debug::dump($request->getControllerName()); // null instead of 'controllers' Zend_Debug::dump($request->getParams()); // null instead of array but this seems to be suspected. Do I need to dispatch this request? How to handle this case well?

    Read the article

  • Can't seem to sign AWS Cloud Front URL properly

    - by Joe Corkery
    Hi everybody, I found a lot of detailed examples online on how to sign an Amazon CloudFront URL for private content. Unfortunately, whenever I implement these examples my URL doesn't seem to work. The resource path is correct because I can download the file when it is set for world read, but the URL doesn't work when set just for authorized users. The PHP code I am using is below. If anybody has any insights as to what I might be doing wrong (I'm guessing it is something obvious that I am just not seeing right now), it would be greatly appreciated. function urlCloudFront($resource) { $AWS_CF_KEY = 'APKA...'; $priv_key = file_get_contents(path_to_pem_file); $pkeyid = openssl_get_privatekey($priv_key); $expires = strtotime("+ 3 hours"); $policy_str = '{"Statement":[{"Resource":"'.$resource.'","Condition":{"DateLessThan":{"AWS:EpochTime":'.$expires.'}}}]}'; $policy_str = trim( preg_replace( '/\s+/', '', $policy_str ) ); $res = openssl_sign($policy_str, $signature, $pkeyid, OPENSSL_ALGO_SHA1); $signature_base64 = (base64_encode($signature)); $repl = array('+' => '-','=' => '_','/' => '~'); $signature_base64 = strtr($signature_base64,$repl); $url = $resource . '?Expires=' .$expires. '&Signature=' . $signature_base64 . '&Key-Pair-Id='. $AWS_CF_KEY; print '<p><A href="' .$url. '">Download VIDA (CloudFrount)</A>'; } urlCloudFront("http://mydistcloud.cloudfront.net/mydir/myfile.tar.gz"); Thanks.

    Read the article

  • Invoking a URL - c#

    - by user177883
    I m trying to invoke a URL in C#, I am just interested in invoking, and dont care about response. When i have the following, does it mean that I m invoking the URL? HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

    Read the article

  • xsl transform: problem with Ampersand URL parameters

    - by Rac123
    I'm having issues with transforming XSL with parameters in a URL. I'm at a point that I can't change the C# code anymore, only can make changes to xsl file. C# code: string xml = "<APPLDATA><APPID>1052391</APPID></APPLDATA>"; XmlDocument oXml = new XmlDocument(); oXml.LoadXml(xml); XslTransform oXslTransform = new XslTransform(); oXslTransform.Load(@"C:\Projects\Win\ConsoleApps\XslTransformTest\S15033.xsl"); StringWriter oOutput = new StringWriter(); oXslTransform.Transform(oXml, null, oOutput) XSL Code: <body> <xsl:variable name="app"> <xsl:value-of select="normalize-space(APPLDATA/APPID)" /> </xsl:variable> <div id="homeImage" > <xsl:attribute name="style"> background-image:url("https://server/image.gif?a=10&amp;Id='<xsl:value-of disable-output-escaping="yes" select="$app" />'") </xsl:attribute> </div> </body> </html> URL transformed: https://server/image.gif?a=10&Id='1052391' URL Expected: https://server/image.gif?a=10&Id='1052391' How do I fix this? The output (oOutput.ToString()) is being used in an email template so it's taking the URL transformed literally. When you click on this request (with the correct server name of course), the 403 (Access forbidden) error is being thrown.

    Read the article

  • ASP.NET MVC: Have total control over the URL

    - by Luke101
    Hello, I am developing a website that has nested categories. I would like the categories to be in the url such as something like this http://www.dmoz.org/Computers/Programming/Component_Frameworks/NET/Chats_and_Forums/ as you can see in the above url the categories are in the url itself. How can I develop something like this in asp.net mvc?

    Read the article

  • url optimization in rails?

    - by piemesons
    Hello I want to create seo optimize url in rails.Same like done in stackoverflow. Right now this is my url http://localhost:3000/questions/56 I want to make it something like this:- http://localhost:3000/questions/56/this-is-my-optimized-url i am using restful approach. is there any plug-in available for this.

    Read the article

  • Need help with PHP URL encoding/decoding

    - by Kenan
    On one page I'm "masking"/encoding URL which is passed to another page, there I decode URL and start file delivering to user. I found some function for encoding/decoding URL's, but sometime encoded URL contains "+" or "/" and decoded link is broken. I must use "folder structure" for link, can not use QueryString! Here is encoding function: $urll = 'SomeUrl.zip'; $key = '123'; $result = ''; for($i=0; $i<strlen($urll); $i++) { $char = substr($urll, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $result = urlencode(base64_encode($result)); echo '<a href="/user/download/'.$result.'/">PC</a>'; Here is decoding: $urll = 'segment_3'; //Don't worry for this one its CMS retrieving 3rd "folder" $key = '123'; $resultt = ''; $string = ''; $string = base64_decode(urldecode($urll)); for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)-ord($keychar)); $resultt.=$char; } echo '<br />DEC: '. $resultt; So how to encode and decode url. Thanks

    Read the article

  • URL tracking functionality

    - by Mika H.
    I want my webpage to have two parts. The top part has a textbox. When the user types a URL into the textbox, the bottom part browses to the content of that URL. When the user clicks a link within the bottom part, the bottom part navigates to the new URL, and the textbox in the top part changes to the new URL. How can I do it? NOTE: This behavior is the same as in Google Translate (e.g. here), but without any translation.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >