javascript

Javascript Line 1 Syntax error in IE

Hello, Can someone figure out what this Line 1 Syntax error is? I am trying to debug in IE6 and IE7 and can't find the source of the issue. http://ci.elfster.net/apps/game/tree/design.aspx Thanks ...

Drag/drop problem (draggable in position:relative parent)

Here's the scenario, I'm using prototype and scriptaculous, but I believe jquery would have the same issue. I have a list draggable images in a relatively positioned div. The problem is I can't drag the images out of the parent div... well... you can, they're just not visible. If you remove the position:relative on the parent div, it wor...

Cufon Not Working

Can anyone tell me why Cufon isn't working on the following page: [URL removed] I've used Cufon numerous times in the past and now that I'm at a point where the project is ultra time sensitive I run into an issue. Web Inspector in Safari is telling me: "ReferenceError: Can't find variable: Cufon" All of the files are linked up correc...

How can I make my web page load faster?

Assuming an empty browser cache - How can I make a web page load faster by only applying HTML/CSS/JavaScript code changes? Meaning, don't recommend moving servers, using a CDN, etc. Just code changes to make it load faster. ...

PostBackUrl not available on Html Buttons

We're currently performing a cross-page postback using the PostBackUrl of an asp:Button: <asp:Button runat="server" PostBackUrl="processing.aspx" /> which generates this javascript onclick stuff: <input type="submit" name="ctl03" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('ctl03', ', false, ', '...

Images show and then disappear in Safari

So this is really weird. If you go to http://floridahome.palmbeachpost.com/ in Safari and do a search for listings, you'll see our image not found come up on results where the images really should come up. If you don't see what I'm talking about the on the first page, click through a couple pages. If you do the same search in Firefox...

<iframe> javascript access parent DOM across domains?

I control the content of an iframe which is embedded in a page from another domain. Is there any way for javascript in my iframe to make changes to the parent's DOM? For example, I would like to have my iframed script add a bunch of html elements to the parent DOM. This seems like a pretty tall order - thoughts? Edit: There exists a t...

How to open QTP from JavaScript without using ActiveXObject?

i need to invoke QTP from a javascript without using ActiveXObject. can anybody guide me how to proceed with this? Thanks, Ramya. ...

What does "javascript:void(0)" mean?

<a href="javascript:void(0)" id="loginlink">login</a> I've seen such hrefs many times, but I don't know what exactly that means. ...

Any way that I can replace the function variable with javascript?

Does anyone know how can I replace the passing variable in html with Javascript? Example: If I have a code as below: <table width="150" border="0" cellspacing="0" cellpadding="2" id="productBox"> <tr> <td valign="top" height="19" id="td4"><img onclick="addNewRowToTable('abc')" src="images/add0.gif" onmouseover="this.src=\'images/a...

How to access some data inside script tag in ASP.NET MVC?

Hi, I'm trying to initialize a jQuery call with some parameters, but I don't know how to access them. Now I have: // Controller code public ActionResult Offer() { ... ViewData["max"] = max; ViewData["min"] = min; ... return View(paginatedOffers); } // View Code script type="text/javascript"> $().ready( function() { //...

Suppressing "permission denied" errors in Javascript

Hi I have a JS function that polls for the current url in an iframe, the purpose being to ascertain whether or not the iframe is pointing to the same site as the main document. As such, the code is basically: function urlCheck() { var location = document.getElementById('frameid').contentWindow.location.href; if (location) { /...

z-index not working in IE

Hi friends, I have a button, while clicking the button i just produce a div containing some checkbox. If the user select the required checkbox, it will produce a iframe according to the value of the checkbox and the div will disappear. Its placed immediately below the button. Up to this its working fine. If the user again click the butt...

Parsing JSon array in JQuery

Hi, I'm trying to get the hand on JQuery and Json using an Asp.Net webservice. The Webservice returns this result: { MyResult: { Ticket: { "Author": "rd", "CssClass": "RED", "ExpirationDateTime": "2009-08-16T16:55:43.577+02:00", "id": "38", "Message": "We are going ...

What is the need for the javascript function getUTCFullYear()?

Is there any real case where getUTCFullYear() differs from getFullYear() in javascript? The same goes for: getUTCMonth() vs getMonth() getUTCDate() vs getDate() Am I missing something here? EDIT: See getUTCFullYear() documentation. Is there any real case where getUTCFullYear() differs from getFullYear() in javascript? ...

Encrypting JSON in Google Gears Workerpool

Hello, I need to encrypt JSON (stringified) data in a Google Gears Workerpool. So far, any implementation I tried either makes the Gears Workerpool bug out, or gives me unwanted encrypted strings. For example: DES encryption (can't post URL due to account restrictions) This works brilliantly for most applications, except after encrypti...

Greasemonkey script that refreshes page

So, at my school theyy have this service which tells you that "your request has been coached", so I have made a GM script to automatically refresh the page and continue on to the content you wanted. To avoid the hassle of pressing F5 I made this: function main(doc) { if (document.title == "REQUEST COACHED") { window.location.reload();} ...

Can't get Javascript function to work in a demo

function trim(str,options){ var string = str.replace(/^\s\s*/, ''), ws = /\s/, i = str.length, j = -1; if(options==="begin"){while(ws.test(string.charAt(++j)));return string.slice(j,i);} if(options==="end"){while(ws.test(string.charAt(--i)));return string.slice(j+1,i+1);} while(ws.test(string.charAt(--i)...

Comments being reported and deactivated automatically...

Hi there. We have here a strange issue. We have a comments form where users can submit their comment about news articles and after that submission every comment is accepted and listed in the same page. In every comment listed we have a link that allow to report that comment. When anyone click in that link it does the following: Step ...

Javascript code to parse CSV data

Hi there, Does someone have an idea on where I could find some javascript code to parse CSV data ? ...