javascript

How to enable a linkbutton server control using javascript?

I have a linkbutton server control in my page whose Enabled attribute is initially set to "false". When a text box's text changes I would like to enable the linkbutton. I tried the following but it does not work. Could you let me know if i am missing something. function TextBox_TextChanged() { var control = $get("<%= linkButtonSave....

relpace textarea in jquery

Hey I'm trying to Replace a %%%VERSION%%% text, the text is coming from an tinyMCE editor. looks like this. $("#description textarea").val($("#description textarea").val().replace(/%%%VERSION%%%/g, STAT_VERSION_INFO)); The value of the textearea is: <textarea rows="20" cols="117" name="description" id="description">Some code vers...

Sending data to a script in a container page from a script running in an embedded page

Hi Guys, I have run into an interesting problem and am not sure if it can be resolved. I have a JS script (say script1) running in an SVG document with lots of rectangles which has collected user-entered information like which rectangle was clicked / data corresponding to the rectangle etc. This SVG document is embedded inside an HTML...

Keep a permanent connection to the server while navigating a website

Hi, We are a young start-up launching a unique chat product next week. Our chat is currently based on Jabber (using Openfire as our Jabber server) via BOSH (using Punjab), with jQuery for our client side scripts. Right now our most critical issue with the current setup is with the site navigation, when navigating between pages in our we...

Is it possible to create a html file using JQuery?

Is it possible to create a html file and save it to a directory using JQuery? ...

jQuery getJSON never enters its callback function

I've been sitting with this for hours now, and I cant understand why. q is working. The URL does give me a proper JSON-response. It shows up as objects and arrays and whatnot under the JSON tab under the Net-tab in Firebug and all is fine. I've also tried with other URLs that i know work. Same thing happens. I have another function els...

Which is better to initialize HTML control values: Javascript or inline server tags?

Which is better/more maintainable, using Javascript to initialize the values of the different HTML controls or writing inline <% %> tags? The current page I am writing has many HTML controls and I'm afreaid that putting inline ASP would make it too unmaintainable. ...

setting action of form with javascript wont work...

Hi. Im trying to set the action of a form with javascript! How come it wont work on this code: (what happens is that the page gets submitted to itself, as in 'action="#"' function validateForm() { var nr_of_pics=document.getElementById("annonsera_nr_pics").value; var name = document.getElementById("annonsera_name"); var...

JQuery or Any other Java Script Lib. for Developing Web application

Recently i completed on mid level web application where i have used telerik controls, all the developers in project used native javascript functions as well as telerik functions to work with javascript. We faced so many cross browser issues in this approach, we have solved all the issues but i am just wondering that what should be the...

Detect 64-bit or 32-bit Windows from User Agent or Javascript?

I want to offer the right version of a download. The versions I have are: 32-bit Windows 64-bit Windows Linux Detecting Linux using the User Agent field is easy; but is it possible to reliably figure out if Windows is 32-bit or 64-bit? Users might be using weird browsers - IE and Firefox are common, and we probably have an Opera us...

jQuery chart controls for ASP.NET

Hi, I would like to know some good jQuery chart controls which can be integrated with my ASP.NET application. ...

using jquery/ajax to send/update div when link is clicked

I have 2 layers that i need to update individually if a user clicks on either of them. <div id=wrapper> <div id=upvote> //This div can be filled by upvote.php?id=X <? echo getUpVote(); ?> <a href=#><img src=upv.png></a> </div> <div id=downvote> //This div can be filled by downvote.php?id=X ...

js-html - typed textbox value not set in attribute?

Fellows, I wrote some code to save the current state of a web page. When there's a textbox where I change the value by input, the change isn't registered in the html code. Even when I call: object.value = 'x'; is doesn't change the value. When I use: object.setAttribute('value','x'); Then the change is registered in the html code. ...

Can I prevent onbeforeload from being called when clicking on an anchor tag?

In head: <head> <script type="text/javascript"> $(document).ready(function() { $("#anchor_id").click(clickHandler); window.onbeforeunload = confirmExit; }); function clickHandler() { /* hide/show some hidden div's */ $("body").append("<p>Hi there</p>"); ...

What does Brendan Eich mean when he speaks about adding sugar and macros to JavaScript?

I'm currently reading Coders at Work, and I'm at the chapter interviewing Brendan Eich. It's a little dense compared to the preceding chapters, to say the least. Around page 144, he talks about adding sugar and macros to JavaScript. What do these terms mean? Why is there backlash against adding them? ...

Best way to launch a WPF ".application" Application

What is the best way (in JavaScript) to launch a ".application" Application through javascript? ...

validating input type="password" created in php?

I have a page with PHP and HTML. The PHP section contains an input-type="password" I want to put the value of the password fields inside a hidden-input on the HTML side of the page (in a form)... <?php INPUT PASSWORD ?> <HTML> <form with password inputs> </HTML> How can I do this? I cant put the password inside the form directly bec...

Where to put javascript code with "Server-side ASP.Net AJAX" ?

If I want to use ASP.Net without the Microsoft AJAX Control Toolkit or JQuery on the client-side, there are 2 possibilities according to their website (http://www.asp.net/ajax/) : Server-Side ASP.Net AJAX Programming Client-Side ASP.NET AJAX Programming Client-Side programming obviously is just the javascript-side of the coin which m...

strange behaviour with json object coming from ajax call in safari/webkit

I'm using jquery to make an AJAX POST call to a web service, and getting a JSON object back, which gives me back some html code that i want to append to a div, it works fine in firefox but the problem is that safari doesn't do the appending, here is the example: $.ajax({ type: "POST", url: "ConnMgr.asmx/Request", data: JSON.strin...

Increment a number in a string in with regex

I get the name of an input element, which is a string with a number (url1). I want to increment the number by 1 (url2) in the easiest and quickest way possible. My way would be to get \d / restofstring, ++ the match, then put together number with restofstring. Is there a better way? Update: My final (dummy)code became: var liNew = do...