javascript

Calling Javascript on web page from Java

Hi, My goal is to connect to an OWA page (Microsoft Office Outlook Web Access - basically an email client) and log-in, then read the new page loaded and find the inbox count. To login, I need to fill the username and the password fields and call a certain javascript function for which I know the name and header. How do I: Get the DO...

How to add Rhino Javascript 1.7 library to classpath in Weblogic 10

Weblogic packages rhino classes inside weblogic.jar. I need newer version of rhino js.jar. If I just distribute the newer rhino js jar like any other third party jar, it does not get loaded, because the older classes inside weblogic.jar are loaded first. How can I load classes from my custom js.jar in weblogic 10? ...

Simple dashboard application

Hi all, I am trying to have some fun with dashboard widgets, so I tried a simple application : there will be a button over the widget which when clicked will open StackOverflow website in safari To implement it, I tried this: Created a custom dashboard widget. Added a button to it from library. Associated gotoStackOverflow ...

Is there a limit to how much data I should cache in browser memory?

I need to load a couple thousand records of user data (user contacts in a contact-management system, to be precise) from a REST service and run a seach on them. Unfortunately, the REST service doesn't offer a search which meets my needs, so I'm reduced to just loading a bunch of data and searching through it myself. Loading the records i...

How would I stop a live jquery event handler from firing more than once?

Greetings. I'm trying to post-process content that is added to the DOM via the excellent SyntaxHighlighter project. When SH formats text, it generates a bunch of HTML and then writes that HTML into the DOM. It creates a div with class "syntaxhighlighter". I want to listen for the insertion of these new divs, and when they are inserted...

Modifying all links w/ Greasemonkey

Hello. I want to mod a page from a site that prefixes all its links with "http://linkblur.com/?" I tried this: links = getElementsByTagName('a'); for (l in links) { l.href = l.href.replace('http://linkblur.com/?',''); } But it doesn't work. What am I doing wrong? tks Steve ...

How to change an image when clicked using JavaScript?

Hello! I've created a sliding image viewer here. As you can see, there's 4 small clickable images to change/slide the image. I want the small image to change to this image when it's clicked, or when the appropriate main image is showing. That way the users can tell which main image is being shown. Can anyone maybe look at the source and...

Dynamically change style of panels through javascript

I am trying to display a new panel after the user clicks an add button, for some reason this is not working (it refreshes the page as well, even though my button has a return true) I have tried different ways, but nothing seems to work that well. <asp:Button ID="btnAdd" runat="server" Text="Add Property" CssClass="btn" OnClientClick="a...

Edit links in place

I use this javascript to edit text in place: http://josephscott.org/code/javascript/jquery-edit-in-place now I need to edit links as well. But when I click on link instead of just making it editable I'm redirected to the link address. How can I change it so that if double click a link just make it editable and don't redirect anywhere? C...

Does throwing exception in JS property assignment in Rhino makes sense?

I came across a design that overrides [Scriptable.put][1] in a subclass of ScriptableObject to do some conversion. If the conversion fails the code is throwing an exception. Which means that property assignments like following code can cause a runtime exception to be thrown aScriptable.dateOfArrival = aVar; By default rhino would...

Rails: best way to test an action called remotely?

I was trying out Rails again, this time the 3 version, but I got stuck while writing tests for an action that I only call remotely. A concrete example: Controller class PeopleController < ApplicationController def index @person = Person.new end def create @person = Person.new(params[:person]) @person.save end end ...

What would be better to use in this case? c# or php?

I am making a website where users can upload pictures and draw on them, add text etc. My team knows some php, but we know nothing about c#. Time is not too much of an issue. We all know java, what would the perks of each be? I have been hearing that c# will be much better for handling the canvas because there is a lot more libraries ...

Setting marker position inside textarea

I'm looking for a way to set the text marker to the beginning of a textarea when there's a value set or text between the textarea tags. I couldn't find anything on it when searching. So, does anyone know how to go about doing this? ...

How to trace Javascript events (Stack Trace ) ?

Hi, In any programming langauge , I can trace any function and know witch function is called by other . but in Javascript , I don't know how ? since the code is not written by me and Firebug does not give this feature - as I know . An example : I want to display the function names of each function that is called when clicking on XYZ E...

Facebook's JS SDK vs. just using jQuery's getJSON for API calls

Why would I want to use Facebook's JS SDK for making API calls....meaning use the FB.api() method when I can simply send the HttpRequest and get back the JSON very easily using the jQuery getJSON for any api calls. I think of the benefits of using the FB.api is that it already already grabs and knows about the user's token from the coo...

How to fully load ALL of facebook's JS features onto Connect website

Well, here I am trying to integrate a website with facebook connect and I'm trapped in some strange ring of hell. I have seen 2 ways of initializing the js on a fbc site, I've tried both repeatedly but they only do opposite halves of the whole job I need done. <script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt; .....

[jQuery & jQuery Tools] Loading content with ajax while scrolling

I'm using jQuery Tools Plugin as image slider (image here), but due to large amount of images I need to load them few at a time. Since it's javascript coded, I can't have the scroll position as far as I know. I want to load them as soon as the last image shows up or something like that. I have no idea where I put and event listener neith...

closing the Jquery Dialog On form Submission

$('#srch').click(function(e){ if ($("#form").validationEngine({returnIsValid:true})) { $("#loader").dialog('open'); $.ajax({ type: "GET", url: "/cdr/abc.php", cache: false, data: $("#srch").serialize(), timeout: 5000, error: function (XMLHttpReq...

How to print value of .hasClass via console?

Hi, using the Firebug console I'm trying to test whether this code is working: $(window).bind("load", function() { $('#tab1link').click(function() { $('#tab2').hide(); $('#tab2').removeClass('selected'); $('#tab1').show(); $('#tab1').addClass('selected'); }); $('#tab2link').click(function() {...

Javascript not writing to HTML definition list

Can anyone help me with why this JavaScript is not writing to the definition list in the body? When I debug, the object is there and the lines are all executed. Also, if I use document.write the information will overwrite the page. I'm just having trouble with adding this HTML to the predefined definition list. There are no errors in ...