javascript

What methods can I use to reproduce a sporadic IE "A script on this page is causing Internet Explorer to run slowly" notification?

I'm trying to replicate a bug which the client has reported, it's the "this script is running slow" notification which appears in IE due to it's extremely slow JS/DOM parsing. This doesn't occur on my virtualbox IE6 ( client has IE6 ) nor does it work on a test machine I have ( some mac mini ). I can guarantee that there's a lot of JS ...

How can multiple clients be notified of a single users actions? Web based channels...

Lets say we have a web based application where users login to their own channel. And our server manages and maintains a list of users, and their current ip addresses. When someone logs in, is it possible for each client to receive a notification of this users login? Equally if someone logs out, a similar notification would be generated....

Using Javascript to show contents that are present in DB.

Hi. I'm having the following problem, and would love some pointers in the right direction. To put things simple: I information from a table, with PHP, that I put inside a <select> tag. Whenever I click one of the options (lines) present it should load/show certain information on a cell that is right next to it. If I click another one o...

How to build an iframe page that searches and displays multiple sites?

I'm trying to build a page similar to www.bing-vs-google.com, but instead of bing and google, I want to populate it with several of my company's internally-used sites. This would function as a "universal search" for our employees to search across a variety of sites (all of which pass search queries via URL). Has anyone seen or done thi...

ASP.NET Forms Authentication prevents loading javascript on Login.aspx

Hi, All ;) I am experiencing problems with Forms Authentication. When I try to load my Login.aspx page neither javascript nor stylesheets do not load. Here is part of my web.config file <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="30" name=".ASPXAUTH" p...

Alternatives to execCommand

Hi all, I'm looking to create a WYSIWYG editor, using jQuery as a framework from which I can use different methods to ease production. I do actually have a working editor at the moment, and it's working well. I use an iFrame, and set it's designMode to on and go from there. However there are a few things which are nagging me. Take as...

How do I programmatically show and hide a DIV by clicking on a link?

1) How to programatically (without writing the onclick="javascript:.." attribute) attach JavaScript (jQuery) function to the link below? 2) The simplest way to toggle hide/unhide after clicking on the Statement link? First click should display the DIV (unhide), the second click should hide it and so forth. <a>Statement</a> <div id="tax...

Javascript code to change class value of an element that is dynamically generated

I'm having trouble getting a page element to update the class name using the following code. The pick variable contains data that I've verified. When I try to combine the two it doesn't update. However, when I type just straight text the className gets updated. Is there anyway to get the className to based on dynamic values? I've ev...

How to convert a javascript string to a javascript function, preserving the correct "this"?

A browser element has an onpopupshowing attribute, which is a string consisting of several javascript statements. I want to "override" that bit of javascript. Were this a function, I'd just assign it to a variable, assign my "overriding" function to the element attribute, and (if need be) call the original function from my overriding o...

Need help with switch statement please

Ok here's the deal, I'm trying to have a switch statement redirect to another page depending on what option is selected in a select box. Below is a sample i'm working with and trying to figure out, any help at all would be greatly apreciated. <html> <body> <form name="form1"> <select name="select1"> <option value="p1">p1</option> <...

An equivalent of javascript unload for PHP

Hello, For javascript there is an unload function, when a page closes, do something. Is there the same for php? Thanks Jean ...

Need the clientId of a textbox inside a content control using javascript

I have a masterpage that contains all the javascript and inside the content control, there is a link that calls a javascript function and I want to pass the id once it's rendered differently by the server. <asp:TextBox ID="txtstart" runat="server" Width="20%"></asp:TextBox> <a title="Pick Date from Calendar" onclick="calendarPicker('<% ...

Reading and checking user's entry from a text field in an html form.

What I want to do is to have a form field that allows a person to try to guess from a picture what type of bird it is, and if they get it right, it tells them they got it right and gives them the code to be able to get a discount. Here is the code I'm using within the head tags: formCheck() { var birdName = document.forms[0].birdNa...

A good library or some good tutorial for making secure chat web application using PHP,JAVASCRIPT

hello i want to make a secure web based chat application(just for the learning purpose) so suggest me a good library or tutorial page for that. i want to include these feature in my chat application: 1.one to one chat 2.one to may chat(group chat) 3.online friends should be displayed. 4.store chat history. i am using: PHP,JAVASCRI...

How to Suppress the JavaScript error tht pops up while printing the WebBrowser content??

Hi All, In my windows application I'm loading more than 100 urls in my web browser control one by one in a for loop and need to print them programatically after each URL gets loaded . But, I keep getting the Javascript error for so many URLs. I'm not sure why this error keep coming. Can anyone help me on how to suppress the javascript e...

View all open events on html node - Javascript

I still consider myself a novice with javascript...so be gentle :) Is there a way to view all open events listeners on a page and perhaps to see any inifinte loops that may be running? What is happening, is a page I'm trying to debug works fine. Nodes get added to the page dynamically via a drag and drop method. All works well, but a...

How can I capture an HTML document fragment as an alpha-transparent PNG?

I'm looking for a way of capturing a section of a web page as a transparent-backgrounded PNG. This would mean that the transparent background property would be truly transparent. A root level element, instead of displaying white, would create a png with a transparent background. However, I suspect the behavior I'm looking for just isn't...

Popup needs to refer back to textbox within a content control

I have a link that is located inside a content control. This link calls a javascript function that opens a popup window containing a calendar and passes it the transformed id from the server of a textbox control using clientid. I need to be able to click on a date and have the popup close and insert the date into the textbox of the id I ...

Offline HTML5 .html pages - need to include file into another file

We have an offline set of HTML pages we're working with using HTML5 document type. We want to include our sub-navigation via a <script src="____"> but for some reason it's not including. Is there some other method of including the file without needing server-side assistance somewhere? Because of how we're delivering these files to the c...

Should I always use dynamic script tag injection technique for including javascript files, similar to Facebook?

Instead of just including <script src="..."> tag on a page as usual, facebook recommends loading its SDK library in the following way: <div id="fb-root"></div> <script> (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; doc...