unescaping working or not working

I have created a very simple webservice, which returns a string like this : <div>hello world</div>. When returning the string, it is encoded like this:  "\u003cdiv\u003eHello world\u003c/div\u003e".

I would then like to place the returned string (in the variable called value) on a div in my HTML like this:        $get('myDiv').innerHTML=unescape(value);

But the value is not decoded/unescaped.

If I then start firebug and enter: unescape( "\u003cdiv\u003eHello world\u003c/div\u003e") it is decoded/unescaped correct. Why doesn't it unescape when setting innerHTML?

 

Thanks

Thomas 

0
thomasabcd
3/30/2008 1:22:26 AM
asp.net.client-side 24353 articles. 0 followers. Follow

1 Replies
582 Views

Similar Articles

[PageSpeed] 20

 Hi thomasabcd,

I don't know what happens in your code,but please try the following code snippet:

----------

<html>
<head>
<script>
function test()
{
    var s="\u003cdiv\u003eHello world\u003c/div\u003e";
    document.body.innerHTML=unescape(s);
   
}
</script>
</head>
<body>
<input type=button onclick="test()")  value="button"/>
</body>
</html>

----------

good luck 


code for fun
----------------
Don't forget to mark it as Answer if it's useful for you
0
ycm119
3/30/2008 9:55:01 AM
Reply:

Similar Artilces:

ScriptManager Work in Client side and not Work in server
 i have this line in my site            ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "script", "call3();", True)when i run my site in client (my computer) its workbut when i copy my site to server not work or function call3(); not callinghow can i solve my problem thanks for alltareq  Hi,tareqmr I am afraid we cannot find out the exact root cause without further information captured when the problem occurs. To troubleshoot this issue, we really need more source code to reproduce the problem...

Working
I have two servers running NW65sp4A (different trees). I initially installed BM3.8 patched to sp4 with VPN services ( Firewall services to follow after I know I have VPN working). My problem is that it appears to be working but its not working. I can open my Windows Explorer (from the SLAVE side network) and reach the MASTER, authenticate and open files. The MASTER NRM VPN monitor shows 1 (one) Active Connections 0 (zero) Packets Received and lots of Packets Sent. The VPN Member List Status shows both servers as �Being Configured�. The Audit Log has two recurring RED entrie...

Cancelling client-side LinkButton OnClick event doesn't work in IE (but works in Firefox)
Hi, I have a number of LinkButtons in use on a site that might need to have their click events cancelled for some reason (client-side). I'm finding that the event isn't getting cancelled in IE7, but it does in Firefox.To see the problem in action:1) Visit http://www.yougodo.com/Home.aspx2) Type "ios" into the "Location:" search box3) CLICK the "Search for activities" button (do not press [enter] as this runs different client side code that works as it's not under the LinkButtons control)The client-side code should prevent the button from causing...

Client-side validation works, but server-side does not.
Hey all,I have got this text box control on my webform, which has two validators.. 1. RegularExpressionValidator and 2. CustomValidator.Now, RegularExpressionValidator control works if I enable client-script. But somehow it does not work for server-side validation. Any idea why this is happening? This happens to another textbox control on other web form as well which has similar coding. So, to enable the validation at present I can only do client-side validation I guess.  1 <TD> 2 <anthem:TextBox id="txtDatePlannedSurgery" CssClass="aspText" Runat="server" AutoCal...

Working or not on client-side
Hi, Do you know this kind of menu tabs:I need to build a web application to register some customers like that Outlook screen shot. I found out a interesting article which uses a client-side script.Question is: is it recommended for that case? Thanks for any helpBest regards,Ivan Andrade Any time you are trying to create a menu, or tab type control, you will want to use client-side script to interact with it. You don't want to have to make a round trip to the server every time your control does anything.smtraberVictory is mine!!...

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

Help Me C# is working But VB.net Not working
Edited by SomeNewKid. Please post code between <code> and </code> tags. Pls, Help me, It is simple chat programe. My <IFRAME> src is calling the bellow event in C# it is working perfectly. private void Page_Load(object sender, System.EventArgs e) { string sDealer=""; string sWrite=""; if ( Session["Channel"] != null ) sDealer = Session["Channel"].ToString(); Response.Write( "<meta http-equiv=\"Refresh\"content=\"4\">" ); sWrite=MyModule.MyChat.GetAl...

how two developer can work on a same project (one on client side and other on admin side)
how to two developer work on a same project (one on client side and other on admin side).I don't wan't to use team server.We have to work on vs 2003.Kamran ShahidSr. Software Engineer(MCP,MCAD.net,MCSD.net,MCTS,MCPD.net[web])Netprosys Inc.www.netprosys.comRemember to click "Mark as Answer" on the post that helps U...

Client side Validations are not working
Hi all, I have a Registration Page which is used for registering new users. on the Client click of a button "Submit" i have written a javascript code "return Checknull()". CheckNull is a function in javascript externally written in file called MandatoryFields.js. When I run the application. I am getting an exception in the code behind where i have written the code for saving the fields, whenever i just click on the button without entering the details for registering. what could be the Problem. I have given the script tag also... Please help me.  Code or it did...

Does not work as Safari works
Name: Norihide Kimura Email: nkimuraatwtadotattdotnedotjp Product: Firefox Release Candidate Summary: Does not work as Safari works Comments: Please refer to the URL http://web.mac.com/nori44/. There is PHOTOS(PARTY) which is clicable name on the topline of the page. When you click of it, ther should be appeared the photographs and you will be able to enjoy slidshows on Mac Safari or Firefox Windows version. But it doesn't work on Firefox Mac version. Browser Details: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ja-JP-mac; rv:1.9) Gecko/2008051202 Firefox/3.0 From...

Work offline does not work
Name: Saad Shamsaei Email: saaddotshamsaeiatgmaildotcom Product: Firefox Summary: Work offline does not work Comments: Hello. i use ff 3.1 beta 2. i usually use work offline. ff3.1b2 was ok. but when i change option->offline storage cashe from 50 to 200 mb my ff got slow and haevy. i delete my offline data. and then browsed the web. but after that my work offline doesnt work! Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a...

PXE no work to do... was working
My imaging setup was working friday, and now all of a sudden all I get is "no work to do" I have done a DSREPAIR and still nothing happens... Any ideas? sending PROXY_CMD_PXE_FILE packet proxyGetPXEFilename returned workToDo = 1 proxyGetPXEFilename returned SUCCESS PXE Filename = /cmds/z_auto.cmd pxeProxyInit Success EXIT ZENGetPXEFilename returning (workToDo) 0 EXIT ZENGetPXEFilename returning (filename) /cmds/z_auto.cmd -- joshund On Mon, 09 Oct 2006 15:19:30 GMT, joshund wrote: > Any ideas? any change? could you post the imgserv log when yo...

Working with Office on client side
 I want to create a program which allows user to create form letter templates with bookmarks, store them and generate them whenever they want using ASP.NET.As server doesn't have MS office installed on it. It has become difficult for me to design something like this. Does anybody have idea how can i implement this from client side using ASP.NET? Hi rsurya  I have read the thread carefully; however, I am not sure I have understood the facing needs correctly. Based on my understanding, you would like to make the Microsoft Office working Integrating with ASP.NET right? If...

Client-Side Validation not working!
I'm really puzzled about this problem.  I'm working on a development server that houses several different sites.  One site utilizes the data tutorials found on this site and client-side validation works like a charm!  However, when I create a dummy site with one page, one form, one form field and one validator - I cant (for the life of me) get client-side validation to work. My simple page just has this code between the body tags: <form id="form1" runat="server"> <div> Name: <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <asp:R...

Web resources about - unescaping working or not working - asp.net.client-side

» Advanced SEO, Apache Bug, and Google - John Andrews - johnon.com
Continuing on the concept of “ advanced SEO “, I am today marveling at the collision of Apache web server and SEO. It is finally happening, and ...

Regex for Mac OS X - Regular Expressions Testing Tool for Mac OS X
Regular expression testing tool that is easy to use. Runs on Mac OS X.

[...] Related Security Issue in URL Protocol Handling on Windows [Mozilla Security Blog]. [...]
On July 10th, I posted about a security issue in URL protocol handling on Windows. In the previous example, Internet Explorer was the entry point ...

Chunk Templates for Java - Welcome
Chunk Home Full Docs Filter Docs GitHub Project Page SourceForge Project Page Chunk Templates for Java The clean, intuitive way to generate HTML. ...

IKVM.NET Weblog
While scanning the Java 8 version of the JVM spec for changes, I noticed this new text: Names of methods, fields, local variables, and formal ...

RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax (RFC2396)
RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax

draft-ietf-appsawg-http-forwarded-10 - Forwarded HTTP Extension
Network Working Group A. PeterssonInternet-Draft M. NilssonIntended status: Standards Track Opera SoftwareExpires: April 12, 2013 October 9, ...

Custom Query – WordPress iOS App
Search: Login Preferences Help/Guide About Trac Wiki Timeline Roadmap Browse Source View Tickets Search Context Navigation Available Reports ...

draft-ietf-websec-strict-transport-sec-14 - HTTP Strict Transport Security (HSTS)
WEBSEC Working Group J. HodgesInternet-Draft PayPalIntended status: Standards Track C. JacksonExpires: April 2, 2013 Carnegie Mellon University ...

RFC 7469 - Public Key Pinning Extension for HTTP
Internet Engineering Task Force (IETF) C. EvansRequest for Comments: 7469 C. PalmerCategory: Standards Track R. SleeviISSN: 2070-1721 Google, ...

Resources last updated: 1/13/2016 9:11:40 PM