javascript

passing arguments to javascript through cscript on the command line

I have a small command line javascript routine that I usually run from the command line using cscript in windows. I'd like to be able to pass in arguments hopefully along the lines of... %:>cscript doSomethingToFile.js FileInQuestion.txt Any insight on how to do this? Thanks much. ...

How do I parse xml with jQuery?

What is the jQuery alternative to the following JavaScript code? var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml"); I believe a jQuery alternative would be more cross-browser compatible? ...

Is it possible to change iframe src using javascript exists in page inside that iframe?

I want to change the iframe source when something change in this iframe content, the iframe is in a different domian than the parent page. is this can be done or not? I just need to add a hash to this iframe src, so that i can access this hash value from the parent page and do some stuff based on this value. What i did: In the iframe p...

Why won't Javascript assembled Iframe load in IE6 over HTTPS although it will over HTTP?

The issue: The iframe won't load inside the <div id="shipnum"></div> tags on the review and submit page here (relevant HTML and javascript is also below): https://checkout.netsuite.com/s.nl/c.659197/sc.4/category.confirm/.f Login:[email protected] pass:test03 To produce problem: - Where it says "Your Third Party Shipper Numbers (To ente...

Apple 360 example

Maybe all of you saw Apple’s HTML5 showcase. The thing is, they didn’t put anything downloadable online, am I right? Has anyone found a 360 example like theirs that we can download and use as is, instead of going through the Safari reference book? Thanks. ...

Insert <div> outside every three <li>

Hello. I have something like this: function cat_filter() { $.ajax({ type: "POST", url: 'json/cat_filter.aspx', data: "catId=" + "&styleId=" + "&colourId=" + "&sizeId=" + "&minPrice=" + "&maxPrice=", dataType: "json", beforeSend: function () { //load loading cursor }, succe...

Ajax response takes time and status is 503

guys, i have a html page where onclick of a button a ajax request is sent to server , the request calls a jsp page which runs an oracle procedure.The procedure runs the logic and places it in a temp table . once procedure is completed , the values are returned to the client by selecting values from tmp table. as the response is too la...

Modify url in browser using javascript?

Hi, Is it possible to change the url in the user's browser without actually loading a page, using javascript? I don't think it is (could lead to unwanted behavior), I'm in a situation where this would be convenient though: I have a web app which displays reports generated by users. Layout roughly looks like: --------------------------...

Get URL parameter function that gets value of url part or returns true if it's there but with no value?

I'm using the following function to get a URL parameter. function gup(name, url) { name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]'); var results = new RegExp('[\\?&]'+name+'=?([^&#]*)').exec(url || window.location.href); return results == null ? null : results[1]; } It works only if the parameter has a value, for exam...

HTML5 / JS storage event handler

Hi all, I'm using safari webkit's engine together with HTML5 and JS to create an offline application now I'm using the sessionStorage array to store status of my application(simulation). the storage data works fine with the inspector the functions work fine it's the event handler that isn't responding the test preformd by Anurag at ht...

Drupal Form can't access javascript function (errors "not a function")

using drupal with lightbox2 to open a form. this form is from a custom module. the module has a setting: 'onsubmit' => 'return form_submission(this);' and that appears to be working correctly. I've included the functions.js in the theme.info file and it's showing up, i can open that file and see the function. for some reason, i keep g...

ASP.NET javascript embed in template column

Hi, I am developing a web page in which a rad grid displays the list of exams. I included a template column which shows count down timer when the exam is going to expire. Code is as given below: <telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="false"> <MasterTableView> <Columns> <telerik:GridTemp...

Retrieving the URL in Django template language

In a Django template, how could I refer to the URL. I want to use it in static pages, to avoid having live links to the current page. Is there a way to do this with the Django template language or do I have to use JavaScript to do it? I would like to do something like {% if current_url == "/about/" %} About {% else %} <a href='/abou...

JS regex isn't matching, even thought it works with a regex tester

I'm writing a piece of client-side javascript code that takes a function and finds the derivative of it, however, the regex that's supposed to match with the power rule fails to work in the context of the javascript program, even though it sucessfully matches when it's used with an independent regex tester. The code is extremely bare-bo...

Expanding a row in a div-based table

I have a stack of <div> elements that show a name. I'd like to include a + link off to the side of each <div> that, when clicked, expands the <div> and adds more detailed information (from a RoR controller). After poking around on the net, I found link_to_remote and related RoR stuff, but I can't seem to get the right combination to wor...

Can you use Javascript to detect a file download window created server side?

I have a jQuery plugin I use to dynamically create and render a form on a default.aspx asp.net page, then submit it. The page it gets submitted to is a pdf.aspx page. The page builds a PDF then uses Response.Write to write the file (application/pdf) to the browser. I use the same method to render XLSX files to the browser as well. It...

Javascript style assignment only works in Opera (but not in Firefox or IE8)

The following javascript code works perfectly in Opera(v10.5x), but fails miserably in Firefox(v3.6) and IE8. function HighlightBox(elementid,highlight) { var hstyle="none"; if (highlight) { switch (elementid) { case 'emailbox': case 'lastnamebox': ...

jQuery UI - Accordion Display issues

My accordion is working properly, but I'm having a JS issue that are prohibiting it from displaying correctly. http://jsfiddle.net/frEWQ/4/ The JS is not applying .ui-corners-all to the H3 after the "kwick" div below it has finished collapsing, giving an odd cut-off border after the animation Any suggestions? Thanks // fi...

Possible to make jqGrid stretch to 100%?

Is it possible to make it so that a jqGrid will have a width set to 100%? I understand that column widths must be an absolute pixel size, but I've yet to find anything for setting the width of the actual grid to a relative size. For instance, I want to set the width to 100%. Instead of 100% it seems to use an odd size of 450px. There is ...

Unable to decode hex values in javascript tooltip

Hi all, I have quite the process that we go through in order to display some e-mail communications in our application. Trying to keep it as general as possible... -We make a request to a service via XML -Get the XML reply string, send the string to a method to encode any invalid characters as follows: public static String convertUT...