javascript

Jquery href with hash

Hi, i am using tis code for tab navigation. function hashIt(toHash) { toHash == "" ? window.location.hash = window.location.hash.replace( /#.*/, "") : window.location.hash = toHash; return false; } and also i am using jquery popup on page onload. a hyperlink in the popup is not working, if i remove the hashIt funct...

Executing Page Page Load from Popup

Hi, is it possible to trigger Parent's page load event from a popup.When i use javascript function window.parent.document.form.submit,this creates a postback.I want a function which creates "reload" for page because some of my functions work in the "if not postback" statement. ...

Self host WCF (Windows Communication Foundation) Ajax services

I am having trouble to understand how to expose the WCF services through Javascript. Here are what I found after days of research: Exposing WCF services through Javascript but not self host: http://msdn.microsoft.com/en-us/library/bb472488.aspx In this example, it requires the creation of a .svc file <%@ServiceHost language="c#" Debug=...

Pushing notifications to a JavaScript?

I'm just wondering if there is a way to have a server push information to a JavaScript function. Essentially I have a Dashboard-type page that has a javaScript function to get updates from the server and update the dashboard. I would like my server to be able to "ping" the JS. I don't even know how that could be possible (I'm guessing ...

Showing a progress bar when downloading a file from the server

Hi, I need to show a progress bar to the user who requests a file to download. I am using J2EE application to generate the file. User will submit the form data to get the file. The server takes all the submitted data manipulates, generates and sends a PDF file back to Client. So I want to show a progress bar to the user till the file ...

how to read the javascript source code in an html page

Is there a way that a javascript function can read the javascript source code of other functions in an html page, so that the function can do some checking job on the javascript source code of these other functions? Maybe a walkabout is how to get the source code of all javascript functions in an HTML page. ...

Generating unobtrusive JS

I have read quite a bit about unobtrusive JS and how to generate it and all that jazz... My problem is this: I have a website that heavily relies on mod_rewrite, so essentially all the pages requests are sent to index.php that generates the main structure of the page and then includes the appropriate page. Now, there are different secti...

jquery carousel auto scroll with text and image

I'm using the jquery carousel and I have the image auto rotating here ( http://jsbin.com/unoce/2), so the issue I'm having is the content on the left is not AUTO rotating "with" the image and the arrow selection is not either. It only works when I click the content on the left and then the image on the right along with the arrow move app...

What does this suspicious phishing code do?

A few of my non-IT coworkers opened a .html attachment in an email message that looks extremely suspicious. It resulted in a blank screen when it appears that some javascript code was run. <script type='text/javascript'>function uK(){};var kV='';uK.prototype = {f : function() {d=4906;var w=function(){};var u=new Date();var hK=function(...

Comment Starting with /*!

My editor (geany) changes the comment colour when the comments starts with /*! Whats the difference between /* ... */ and /*! ... */ ...

how do i get the previous 3 months using the current month in javascript?

im creating an rss reader that lists the news feeds from the last 3 months. how do i get the feeds of the last 3 months relative to the current date? right now i have a list of all the feeds. ...

Editing Div Text At Click Position

I have a DIV which contains some text. When a user clicks on some content in the DIV, I want to enable him to edit the content at that position. <div id='Note'> Lorem ipsum dolor sit amet, consectetur adipisicing elit, <br /> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br /> Ut enim ad minim veniam, quis nostrud...

IE7 Internet Explorer cannot open the internet site, operation aborted

Hi, when i test this page http://www.catalogues4u.com.au/ViewCategory.aspx?catID=119 im getting the above error. to replicate this issue visit the above page in ie7 and you will get the prompt. i did some search but couldnt find a way to resolve this issue. any help is apprecated. THanks, Aneef ...

html <input type="file"... check filesize with flash

may i know how to use javascript onChange on <input type="file"... so that when user selected files, onchange will call flash to return files size and decide what to do next 2nd. how to use javascript to exclude this check,if browser doesnt have flash feature ...

Kill a node in dojo.dnd.source ?

Related to my SO issue at http://stackoverflow.com/questions/3010996/dojo-extending-dojo-dnd-source-move-not-happening-ideas/3012518#3012518 I am now almost done. I have a dnd.Source derived class - we can consider it a dnd.Source for now, that has within it a node that has a specific class. function declare_mockupSmartDndUl(){ ...

How to upload string as file with jQuery or other js framework.

using javascript. I have a file in string (getted with ajax request). How to upload it as file to server by another ajax request ? ...

Cannot connect using WebSockets, not changing readyState

Ive tried several approaches and even copy/pasted from http://code.google.com/p/phpwebsocket/ Im using Google Chrome 5.0.375.70 beta and the error is always the same: Error: INVALID_STATE_ERR: DOM Exception 11 when debugging I see the readyState is always 0 (connecting), no other error is shown. Any ideas? ...

Get the window height

This is frustrating me. It should be something really simple but I can't get it to work IE. I want to get the height of the current window. Not the scroll height, not the document height, the actual window height. I've tried window.innerHeight which returns undefined and document.documentElement.clientHeight which gives the scroll height...

Replace several tags from a text js

Hi! I have this pice of text I would like to change: [¿Cómo se procede cuando la mujer o pareja de un < b>fallecido< /b> pide la congelación del semen] So I would like to remove ], [ and < b>< /b> Is there any way to change it everything in the same time?? I tried: function replaceThings(){ jQuery(".summary").each(funct...

How correctly assign value to field

Hello, I am trying to assign value for one edit field(not asp.net control) in asp.net application using JavaScript code. It seems that < character in value string gives problems for ASP.NET. If I remove < and > characters from value everything works fine. Where is the problem? How to pass <> characters to the field? I don't want to use...