I am trying to pass an SQL query as a URL parameter but it contains the characters + and %. As these characters are used in the encoding of a URL I get unexpected results. Is there a way round this problem?
I am trying to fill a dropdown menu with ajax, but the table contains latin characters. In mozilla i get a weird black character instead, and in internet explorer the whole code breaks because if a word ends in a latin character then it ignores the <bri put on the end, therefore affecting my data logic.
I am using results = http.responseText.split("<br>"); as a delimiter.
Is there a way to fix this without resorting to using xml encoding?
I am working on/modifying a dom script to automatically convert e-mail addresses in the text format of username [at] domain [dot] com that are inside a pair of em tags into working mailto links.
the script works by getting all em elements in the document, checking to make sure they aren't empty and also that they contain the string s[at]s in them and then converts them to mailto links
the problem im having is that the script is skipping over every other em tag, so it is only creating mailto links for the 1st, 3rd, 5th, etc. em tags I know that the problem occurs in the final line of the function
ems[i].parentNode.replaceChild( a, ems[i] );
because i've added alerts through the code and i know that its cycling through all of the em tags correctly, but when it gets to that last line for some reason it is only replacing the odd ems. Code:
Ho can i change the endoing type of the browser through the Javascript?
I am working on the bi-lingual project. In this there are 2 languages Greek and English. I am showing the data on the page but it is not in proper character set i.e. encoding.
The default encoding of the page id ISO-8859-1 i.e. english. But for the Greek characters it should be ISO-8859-7. I am not able to change the encoding (charset). can you please provide me a function by which i can change the charset of the page?
I've been fiddling with this for a while now and can only find out how to convert / change character encoding.I want to write something super small that will just display the character encoding of a file i specify.
MS has published on its sites javascript encoder, which enables "encrypting" javascript code. It allows hiding js code from being seen as a text file. There is a decoder for it, available in the net, freeware, srcdec14.exe.
I have tested both, encrypting, decrypting, the source and the final files are identical.
But what I met on a certain site is a js file, encoded I think in another way, because I cannot decrypt it using the srcdec14.exe.
This is why I have a question for genarally any information cons. this subject (are there several ways MS is able to read encrypted js files?, do you know other decoders?,...)
<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I've been googling around but found no answer that works for me. I'm loading some content from a PHP script using the load() function inside an html document that already has the utf-8 encoding meta tag. I suposed that the rule at the head of the container document will affect all loaded contents, but it doesn't. The PHP I'm loading is using a switch to serve different contents, for every case I have open php tags like this:
How can we get character encoding in any site through coding. Actually i need to add an option in my website, in which i am entering a domain name(url of any website i.e.[url]) and through coding i have to find out the character encoding, doctype, frameset.. etc of the entered URL. OR Are there any such links which can help me out to get these parameters directly by passing the url only. how to get the parameters of any site..
I have a question if it is possible to manipulate the settings of character encoding in Ms Internet Explorer 5.0, 5.5 and 6.0. The problem is that the default instalation of Ms IE seems to have hard selected default encoding to "Western European (ISO)", which means iso-8859-1. When browsing pages with some Central/Eastern European characters these are converted to iso-8859-1 so displayed wrong.
I would suppose the "auto-select" option should be default, so the browser can select the right encoding according to the meta-tags in the head of webpage. But this is apparently not true.
Please, is it possible to use JavaScript or Java applet to get the information about the current client character encoding settings and/or change it to the "auto-select" value ? How to do this ?
I'm seeking to send this string via getJSON to my app:Academia-Gate the Nanny State & The Professors: My Brief Email Exchange With The Co-Chair of the Cry Wolf ProjectI have this code immediately prior to the getJSON call:
Using Firebug, I can see that the text variable containing the above string, does contain it correctly, at the time it is used in my getJSON call. However, using breakpoints, I can see that when this text is received by my php app during the call made by getJSON, it looks like this:cademia-Gate the Nanny State & The Professors: My Brief Email Exchange With The Co-Chair of the Cry Wolf ProjectHow can I correct this?
I have web form (not MVC) that has bunch of textarea and textboxes where user can input HTML markup. For example, a textarea is provided so users can put YouTube embed iframe html tag where it will be shown on their profile. The problem is that asp.net 4.0 http request validation doesn't like things like ">" or "<", etc. I can put pagevalidation="false" on the page and/or revert back to .net 2.0 validation but why would I want to do that since I have geniuses like you guys that can show me how to do what I want with jquery without jeopardizing security.
So what I want to do is form a handler so when the form is submitted, the content of the textboxes and textarea on the page be encoded (i.e. > to > etc.) before the submission to the asp.net 4.0 so we can keep the httprequest validation stuff happy. I have added a class "mustEncode" to each of the textarea and textboxes.
I'm trying to do something, but I don't know if it's possible. Basically, I want to have a public static class method that could access a private object's method. I would like to be able to do :
Class.method(InstanceOfClass);
The method would then access a private function from Class by doing something like
function method(param) { param.privateMethodOfClass(); }
I've done a lot research and experimentations but just can't come up with a solution... I don't even know if what I'm trying to do is possible.
Why is the callwhy is the slice method only a method of an Array instance? The reason why I ask is because if you want to use it for the arguments property of function object, or a string, or an object, or a number instance, you are forced to use Array .prototype slice.call(). And by doing that, you can pass in any type of object instance (Array, Number, String, Object) into it. So why not just default it as a method of all object instances built into the language?In other words, instead of doing this:
function Core(){ var obj = {a : 'a', b : 'b'}; var num = 1;[code]....
//right now none of the above would work but it's more convenient than using the call alternative.
} Core('dom','event','ajax');
Why did the designers of the javascript scripting language make this decision?
I have two methods and I would like to call somename1 method from within somename2 method. I have tried several ways to do so however I keep getting "TypeError" or "RefernceError" I have tried several ways to reference but I am still unable. What am I doing wrong. I would think this would be easy to do.
Is the form below a valid method of changing the id of an XHTML element, specifically the one actually being referenced? It does not seem to work for me.
function doSomething () { var obj = new Obj(); obj.foo = bar; doSomethingElse(obj); }
In function doSomethingElse I want to create the following line of DHTML
<div return true;">
What I want is for onClick to be defined to be the execution of the foo method of obj.
I tried document.writeln ("<div + obj.foo + "(); return true;'>");
What I get is the source code for bar stuck into the middle of the string. So how do I get just the name of the function bar in the string? Or ultimately, how do I get the handler to be bar in the DHTML?
While submiting the form elements, if the GET method is used in the <form>tag, the data is submitted as a query string.I think there should be restriction in size of data submitted by the browser IE. Does any body know the exact details of it?