javascript

TinyMCE + Safari 3 - Table insertion does not work

Has anyone else had this issue and found a working solution? I've enabled the Safari compatibility plugin, but it still behaves incorrectly for me. ...

Process XML returned via Ajax with E4X?

I am loading some XML via Ajax. here is a snippet of the script: ajaxRequest.onreadystatechange = function() { if(ajaxRequest.readyState == 4) { document.getElementById('loading').innerHTML = 'done'; google_xml = ajaxRequest.responseXML; document.getElementById('xml').innerHTML = 'XML: '+google_xml.toXML...

Can YUI compressor minify ASP.NET inline script?

How can you compress inline script and style tags? YSlow says In addition to minifying external scripts and styles, inlined script and style blocks can and should also be minified. ...

Mozilla Jetpack: multiline notifications?

I just started playing around with Mozilla Jetpack, and I love it so far. I wrote a little code that displays an icon in the statusbar that, when clicked, brings up a notification: var myTitle = 'Hello World!'; var line1 = 'I am the very model of a modern Major-General,'; var line2 = 'I\'ve information vegetable, animal, and mineral,';...

ajax request browser limit

A more generic questions to start. Is there a limit to the response size of an ajax request, if it is a JSON request? I am passing large amounts of data through a JSON request and running into a 'script stack quota is exhausted' message in FF3. Now in FF2 the quota was 4mb but in FF3 it is 640kb. I am wondering if this is JSON specific ...

ajax hidding div problem in IE

I have a javascript page which checks an email and username, this works fine in every browser but Internet Explorer. The div box where errors are shown should be hidden unless an error is given e.g. username taken or invalid email. If the email gets an error this is shown in the div tag, but doesnt work for username (in all browsers) b...

mysql data into Dojo datagrid table

Greetings all. I have a php script calling MYSQL and displaying data in a table. It is rather ugly and I would rather have it displayed in a Dojo style table/datagrid. Can anyone point me in the right direction? thanks! ...

How to Add options to <SELECT>, in IE Windows Mobile 5

Trying to programmatically add options to a SELECT drop down in IE Windows Mobile. Because this is IE Windows Mobile 5, most solutions involving getElementID do not function, so I have had to resort to more plain vanilla HTML /Java script, the example below works fine in IE 6 and FF , but fails with "Object doesn't support this property...

Expression parsing: how to tokenize

I'm looking to tokenize Java/Javascript-like expressions in javascript code. My input will be a string containing the expression, and the output needs to be an array of tokens. What's the best practice for doing something like this? Do I need to iterate the string or is there a regular expression that will do this for me? I need this t...

On form submit background function php running

Hi: I am looking for a way to start a function on form submit that would not leave the browser window waiting for the result. Example: User fills in the form and press submit, the data from the form via javascript goes to the database and a function in php that will take several seconds will start but I dont want the user to be left wa...

Is it possible to use VBScript or JScript to instantiate SharePoint objects?

I want to be able to run VBScript or JScript on a server using cscript.exe to manipulate SharePoint through the object model. For example, to update the log file location: Microsoft.SharePoint.Administration.SPDiagnosticsService serv = new Microsoft.SharePoint.Administration.SPDiagnosticsService(); serv.LogLocation = @"E:\"; serv.Updat...

How do I store javascript functions in a queue for them to be executed eventually

Hi, I have created a Queue class in javascript and I would like to store functions as data in a queue. That way I can build up requests (function calls) and respond to them when I need to (actually executing the function). Is there any way to store a function as data, somewhat similar to .setTimeout("doSomething()", 1000); except it...

Why won't an HTML form load into a Javascript-created iframe?

So, in pure HTML, I can create a form that loads its results into an iframe (instead of moving the user to the result url). <html> <head> <title>Google Preview</title> <style>iframe { width: 800px; height: 600px }</style> </head> <body> <form method='get' action='http://www.google.com/search' target='results'> <l...

Javascript text to link replacing

I need to replace text into link in Link must be look like " href="/search?q=$oldtext" title="$oldtext" ". $oldtext is text to replace. I'm tried to use loop to find text with regexp "/^\x23\w/",and replacing with variable that contain generated link. And it result to nothing. I've edit regexp to "/\x23/" and get replacing for "#" (\x...

RegEx-how to parse html page for pattern (in JavaScript)

I need to parse the html page for a patern. I am assuming that the matches are loaded into an array. And then I need to output the contents of the array. <script language="JavaScript" type="text/javascript"> var adBookmarkletData=[ '<html><head><title>MYSA Yahoo! APT Debugger</title></head><body><center><div style=\"background:#ccc;colo...

How can I convert this working JAVASCRIPT code to JQUERY

<script language="javascript" type="text/javascript"> function hasPasswordChanged(value) { if(value == '1') { var container = document.getElementById("sNav"); if(document.getElementsByTagName) { var hyperLinkList = container.getElementsByTagName("a"); ...

Javascript transcript system

Can someone recommend a opensource tool that can create transcripts of videos? Even a good Javascript framework on which I can quickly build this system will be helpful. It ideally needs to have three input fields for (text of subtitle, start and end). You can see one in action here http://yt-subs.appspot.com/help?first=1 (The Synchroniz...

Which is best to use: typeof or instanceof?

In my particular case: callback instanceof Function or typeof callback == "function" does it even matter, what's the difference? ...

Insert one HTML file in another dynamically?

There are 2 html files, file-1.htm and file-2.htm. There is another html file, test.htm, with a drop-down having 2 values, "Load Sample-1" and "Load Sample-2". This is what I am trying: When "Load Sample-1" is selected from the drop-down, file-1.htm should be loaded as a nested html in test.htm. Right now I am able to achieve this thro...

How to control which JavaScript gets run after UpdatePanel partial postback endRequest?

I know I can hook into the client side events to run JavaScript after every partial postback; however, I want to do something like this: protected void FooClicked(object sender, EventArgs e) { ClientScript.RegisterStartupScript(GetType(), "msg", "showMsg('Foo clicked');",true); } I know I could totally hack it with hid...