javascript

Problem getting Javascript to work with SWF file using ExternalInterface

Hi guys, I have a SWF file emedded withing a HTML page. Trying to do a simple operation - go to and play certain frame in SWF using javascript. I'm using ExternalInterface to do this but for the life of me can't get the two to communicate. I add all the code but when clicking on the link which calls javascript, it says my flash object ...

use jquery in a javascript function?

NEWBIE ALERT! (C# guy trying to learn jQuery for a new MVC app). I modified some code I found on the web (Stephen Walther- http://bit.ly/bWxU3E) and modified it to use jQuery instead of the MSAjax library. It is a cascading dropdown list and some dummy data. Works great. Next, I try to put the function bindDropDownList() into a separate...

How to keep whole page scroll position after asynchronous postback

Hello everybody. i am using asp.net 4.0 iis 7.5 microsoft visual studio 2010 what i want is keep whole page (browser) scroll position (not a div or panel) when asynchronous postback happened (update panel) how can i do this actually i had a function which can keep div scroll bar position after postback like this <script type="...

What's the name of that lightbox script that has this Apple look & feel?

I believed jQuery had it, but now I see the lightbox of jQuery isn't the actual cool one. I'm talking about this light box in particular: http://tapbots.com/software/convertbot/ (click on the play video button, and the lightbox appears). They seem to use exactly the one I'm searching, but have modified some of the graphics. The origina...

WYSIWYG development bug with formatBlock in Mozilla

Hello, I'am currently developing a WYSIWYG editor for my CMS and got serious bugs here. After switching from IFRAME to DIV contenteditable the behavior changed dramatically. Using execCommand('formatBlock') to create headlines causes unwanted BR tags to the source code, but only in Mozilla. I thought the reason could be < br _moz_dirty...

Javascript - follow link, copy URL and change original?

Hi all, I don't know if this is even possible in Javascript as am pretty new to it, but hopefully someone will be able to help! I want some Javascript (ideally jQuery) that will follow all the links with a certain word in on a page and then on the next page, there will be a link to an image. I want to copy that link and then go back a...

IE's execCommand not working when inserting image

I am using nicedit WYWIWYG editor and all is well in the land of the good web browser but once again MS has cause me frustration through its IE incarnation! For some reason this command document.execCommand(cmd,false,args); is returning false unlike all other browsers, therefore not executing properly These are my params: cmd "...

How to combine show and list functions in CouchDB?

I am trying to study CouchDB. Is there a way to use list functions in a show function, or vice versa? For example, can I call some list function to render a document in its show function? Or call show(id) to render a list if ids in a list function? ...

how to get dynamically created textarea's value in POST array ?

Hi All, I am creating few textareas on-the-fly by replacing the content and adding that content in textarea. Please review the code below: <script type="text/javascript" language="javascript"> $(document).ready(function(){ $("#content").find(".editable").each(function(count){ var content = $(this).html(); ...

rails nested form, create and then update new associated models without page reload

Relevant info I have a User model with plenties of attributes and several has_many associations. I have a BIG form to edite existing user info, including nested fields. I have divided the form into several forms in different divs and show only one form at a time. (i.e. tabs in UI) User can save info by clicking Save button, which subm...

Passing Class<?> parameter using Rhino

Hello, I am trying to call a constructor for a custom collection object. This custom object takes in a parameter of type Class. In java, this is done like this: ICollection col = new PersistentCollection(ContentX.class); This is my first dive into rhino, and I haven't been able to figure out quite how to pass this parameter. I figur...

How to bring the close(x) button of jQuery Tools Overlay to the left?

I'd like to use this jQuery plugin: jQuery Tools: Overlay effect It shows a light box in mac style with a black+white x-circle to close it. But it's on the upper right. Since my audience are Mac users, that would suck. How could I reposition that close-x icon to the left of the light box so that the usability doesn't get hurt? ...

keypressed() and onCLick() implementation problem in IE

I've the following input text box and a button. <div id="sender" onKeyUp="keypressed(event);"> Your message: <input type="text" name="msg" size="70" id="msg" /> <button onClick="doWork();">Send</button> </div> The keypressed(event) function actually detects if the key being pressed is "Enter" and calls the doWork() function....

My website keeps crashing IE, can't debug.

I have a website that suddenly started to crash internet explorer. The website loads and starts executing javascript but somewhere in there the machinery explodes. I don't even get a script error, it just crashes. I've tried to manually step through every single line of js with the built in debugger but then of course the problem doesn'...

Injecting CSS rules into the page in Android Browser

I'm writing a JavaScript to inject a new CSS rule into pages in Android browser in order to display some text in a custom CSS font (after some replacement). Here is how I tried to inject the CSS rule: var css = '@font-face {font-family:"font"; src:url(http://www.example.com/font.ttf);} si{font-family:"font"}'; if(document.getElementsBy...

jquery not working in IE

Hello, I have some very simple code: $(document).ready(function(){ $('#module_body_News').height(0); }); This works fine in Firefox but not in IE. Why? ...

What is the means of terms "Building Block" in javascript?

for example title of this article is "The JavaScript Building Blocks: Data Types, Literals, and Variables" http://www.informit.com/articles/article.aspx?p=169501 What is the means of terms "Building Blocks" in JavaScript? Is it related to box on web-page, CSS box model? ...

PHP-page and HTML-form submits look so messy, how to avoid submits to SELF?

I have a classifieds webbsite, and users have the option to change / remove their classifieds. I am working on a "edit.php" page where all this can be done. Basically it is setup like this when you click on "edit/remove classified": A new page appears, with a form, where user may chose from "REMOVE" and "CHANGE" through radios. The us...

show loading icon in div with jquery

I have a div tag like so <div id="mainHolder"> <span>asjlkdasjdka</span> <img src='image.jpg' /> <input type="button" id="myButton" value="Click me" onclick="callWcf();" /> </div> I am using jquery for my client side development and clicking the button in the div will do some server side processing. I have callWcf function makes th...

Javascript , jQuery - what have I done wrong?

$(document).ready(function () { $("href").attr('href', 'title'); }); $('a[href$=.jpg]').each(function () { var imageSrc = $(this).attr('href'); var img = $('<img />').attr('src', imageSrc).css('max-width', '300px').css('max-height', '200px').css('marginBottom', '10px').css('marginTop', '10px').attr('rel', 'lightbox'); $(...