Skip to main content

Posts

Showing posts from January 19, 2012

What event Asus Transformer calls in Android, then docking or undocking the tablet?

I have problems with my app on Asus Transformer TF101, with keyboard. If i dock it to keyboard (or undock it) during displaying a activity, the activity is recreated. That means: onDestroy is called. onCreate is called. Is it possible to catch the event that user is undocking or docking? I would like to show a warning message, save the data and finish the activity.. Problem background: In my case, it changes the data in edittext fields, then user undocks or docks. I have created a tablelayout with edittexts fields, like editable datagrid. On Asus it messes up, then undocking, the system recreates the activity and all data in datagrid is rewritten automagically. All rows become like the last row. I assume that system does the redraw by ID's, but i have inflated the rows into datagrid, so the edit fields in rows have same ID's.

Android tether, enable USB and LAN connection

I tether my 3G connection from my Android to my work PC but when I connect it, I lose connection to all my work things like database, mail, communicator, etc. I saw this question but I can't figure out how to route it, my route print is like this: The IP that gives me the Android app is 10.0.0.1 (Tether application by ClockWorkMod) Thanks for your help.

Android app widget with dynamic text rows

How to implement such an app widget? User can select how many data rows to show through the widget configuration. The problem is that on different devices TextViews have different sizes and the widget itself has different sizes too. Even when device orientation changes the widget change its size too. So I don't know how to determine how many text rows fit the widget in current conditions and how to put a text in a bottom of the widget.

Android auto installation

We want to install our application on to (thousands of)phones and these phones will be later delivered to clients. Do we have to do this manually? Is there a faster way to do this? For example, in Windows Mobile, if you put your installation files in a certain folder on SD card and when you insert that SD card to the phone the app is installed automatically to the device. Any similar mechanism on Android? Thanks in advance.

Create a Mobile Agent using Jade for Android

I first heard of JADE around 4 months back. Recently, I stumbled upon a link that confirmed the release of JADE for Android . I have gone through the various JADE tutorials for creating agents. However, I don't know how to go about creating a mobile agent for the Android platform. Can anyone who has worked with JADE in Android, tell me how should I create a simple mobile agent for the Android platform? Any tutorials , links would be appreciated. Thanks in advance

Android phonegap app : unable to retrieve an image taken by the camera using my own code (not phonegap"s)

Note- even though im using phonegap, the question is not about some issue in that. Hi, im developing a android app. my app is using phonegap 1.3. mi problem... Im using phonegap apis to take a picture and display it in my app. But whats happening is due to some reason the os kills my app after the camera is launched, so that after the photo is clicked, my app is relaunched and it doesnt get the info abt the taken picture. As a workaround to this problem ( the problem ), i designed a phonegap plugin which on app start checks if the app had crashed while taking a picture (some flags in code), and if it is restarting after crash, it retrieves the Pic.jpg taken by the camera and tries to displays it. The problem is that its not able to get the right image, or even a proper .jpg file for that matter. mi code... Phonegap makes an intent to start the camera and passes the uri for the Pic.jpg that it creates into that intent which it passes to startActivityForResult. In

ThreadPoolExecutor for running AbortableHttpRequest - how to call abort?

I'm running a networking service in android where I direct all my http requests to run and get callbacks from the service when the requests are complete. I run the requests in a ThreadPoolExecutor to limit the number of concurrent requests. As the requests run within the pool, they eventually create an HttpGet or HttpPost, both of which indirectly implement AbortableHttpRequest , which allows one to cancel the connection (say, if it's blocking for a long time). If a user cancels a request, I'd like to somehow drill into the thread queue and call the abort routine for that request. If, for example, a web site is not responding and the user chooses to do something else, right now my only option is to wait for the standard 5 minute http timeout to occur for that hung request before that thread is freed up. If I could access the thread that has my request and call abort, that would free things up right away. From what I can understand, it appears once my request has gon

Android BroadCastReceiver refresh all activities

I have an issue using BroadCastreceiver to refresh activities in my application. I'm using a service which is doing some calculations and in onDestroy() method I'm doing this : @Override public void onDestroy(){ super.onDestroy(); Intent intent = new Intent("finish"); this.sendBroadcast(intent); } and in my activities I'm doing this : receiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("finish")) { getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); TabGroupActivity parentActivity = (TabGroupActivity)getParent(); Intent previewMessage = new Intent(Tutorial.this, Tutorial.class); parentActivity.startChildActivity("Tutorial", previewMessage); progressBar.setVisibility(View.GONE); sync.setImageResource(R.drawable.syn

Custom Font, No Support for setFakeBold/TextSkewX

We use a TextView with a custom font. There are a lot of Spans with normal ASCII letters mixed with our custom symbols. Some text are bold or italic. text##aaa (# - our special symbol from Unicode Private Area. Fallback is correct.) Everything works fine. We just override the font in UpdateDrawState. private void ApplyTypeFace(TextPaint ds) { ds.UnderlineText = false; ds.FakeBoldText = m_bBold; if (m_bItalic) ds.TextSkewX = -0.25f; else ds.TextSkewX = 0; if (m_bFrColorSet) ds.Color = m_frColor; if (m_bBgColorSet) ds.BgColor = m_bgColor; ds.SetTypeface(m_fnt); } Today a customer with Bejing WowPad with Android 2.1 reported an issue. setFakeBoldText(true) misses the ASCII (fallback from default font). No ASCII characters are shown . setTextSkewX(-0.25) is ignored. Can I check the support of these features?

How can I make a RadioButton with overlapping text?

I'm adding programmatically multiple answers to a questions as RadioButtons in a RadioGroup (see code and image below). I almost achieved it but instead of having a radio button with a text on its side (see image below), I would like to have only the text and the background. Can I get rid of the radio button? Or can I set my current background as the radio button (with checked/unchecked states), and add a text overlapping it? RadioGroup answer_container = (RadioGroup) findViewById(R.id.answer_container); while (c.isAfterLast() == false) { RadioButton answer = new RadioButton(PCItem.this); answer.setText(c.getString(c.getColumnIndex(DBAdapter.KEY_ANS_TEXT))); answer.setBackgroundResource(R.drawable.btn_ans); answer.setPadding((int)(30 * density), 0, 0, 0); answer.setGravity(Gravity.CENTER_VERTICAL); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams((int)(775 * density), (int)(81 * density)); params.setMargins(0, (int)(20*density), 0

Video Playing in Android tablet

I want to play a large video using http on an android tablet. I don't want to save that viedo on device. That is, if the large video data received by the web service is in little chunks, I don't want to save that binary data and later play the video. I want play the video as it downloads. Is this possible?

Why do some AlertDialogs disappear upon device rotation?

When I change device orientation, if AlertDialog was shown, it disappears. This is true for all but one dialogs in my app, and I can't figure out neither what's so special about the one that doesn't disappear nor how to counteract this behaviour. Any possibility to preserve dialogs upon orientation change (except for manual management)?

Is there any alternative for GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT)?

I get a fill rate of about 30fps in my application. I know that GLES20.glClear() is used to clear the screen for every draw. If i comment it i get a fps of about 60fps. But the output is not as expected. I have a content to be redrawn for the whole screen in every frame. Is there any alternative where i can redraw the whole screen with out using the GLES20.glClear(). Please let me know if there is any way to play around with GLES20.glClear() to improve the performance?

REST webservice with Android client vs RPC

We are still trying to decide between implementing a REST webservice vs going with RPC. Googles eclipse plugin makes it very easy to create an RPC service which is what the main attraction is for the RPC way. However, a REST service would seem to be easier to modify, IMHO, and would also allow for a future iOS client to connect with little or no rework. One concern I would have and maybe this is a problem with RPC also or indeed any Client-Server model is how do you modify your existing service and allow old clients to still work while allowing new clients to use the new functionality. What I mean is can you point me towards any thing we should look out for when modifying a web service so as not to break existing clients or force them to upgrade. Any links you have that would cover this would be appreciated

Android - Get preference from activity to broadcast receiver

I'm developing an Android app but I have a problem. When I try to get a saved preference from my Activity and use it in a BroadcastReceiver , it tells me that string I'm looking for doesn't exist. This is how I save the preference in the Activity: private void SavePreferences(String key, String value) { SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString(key, value); editor.commit(); } And this is how I try to get the preference in BroadcastReceiver : String pref = PreferenceManager.getDefaultSharedPreferences(context) .getString("MEM1", "Does not exist"); Where MEM1 is the string I saved before. My problem is that when I read pref , I'm getting the default value of Does not exist , instead of my preference value ( MEM1 ). Can someone point me to where I'm going wrong?

popen on android NDK

Is popen not supported by android NDK? I read this page and wondering if this is true The same is possible with POSIX popen() but it is not currently supported by bionic, so you can't use that in Android JNI. Instead you can probably use the system() and pipe the output to a file and then read that file afterwards. Looks like the Java approach will be cleaner if you will be doing the rendering in Java. But I also read someone suggesting to use popen. I also tried it myself but sometime my app crashes and I dont know why. Is popen safe to use in android ndk?

image won"t show in tableView

I'm creating a tableView in appcelerator (Android) and I want to add an image to it. This is just a test because I also had some problems with it in my project and I wanted to try it out first somewhere else so I wouldn't ruin my whole project. I first added the standard png's to see if he would show those, and he did. But when I add a png that I've created, he refuses to show it in the tableView. Does someone know why he refuses to show the image? (I created that png in photoshop by changing one of the standard png's and adding my image to it.) var win = Titanium.UI.createWindow({ title:'tableViewRow', backgroundColor:'#fff' }); var regData = [ {leftImage:'KS_nav_ui.png', title:'gft', left:20, color:'black'}, {rightImage:'KS_nav_views.png', title:'grofvuil', left:20, color:'black'}, {leftImage:'glas.png', title:'glas', left:20, color:'black'} ]; var tbl = Titanium.UI

How to hide the Div at the Click of the Button in MVC

My application is in MVC3.I want a particular Div in my View to Hide at the click of the button. Below is my Code that i tried. $(document).ready(function () { $("#btnCompare").click(function () { if(MyCondition) { for(MyLoop) { } } } }); My this code is not working.As well as i want to Div to Hide after the Click is called. Please suggest

Uncaught type error : Cannot read value "name" of undefined

Actually I am having a global JSON, when I am trying to parse its value in loop, it is showing me error "uncaught type error : Cannot read value 'name' of undefined". I have tried a lot but I am still not able to figure out any solution for it. $(document).ready(function(){ var productJSON = [ {id:"1001",name:"Hopper1",image:"images/290161k.jpg"}, {id:"1002",name:"Hopper2",image:"images/290161k.jpg"}, {id:"1003",name:"Hopper3",image:"images/290161k.jpg"}, {id:"1004",name:"Hopper4",image:"images/290161k.jpg"}, {id:"1005",name:"Hopper5",image:"images/290161k.jpg"}, {id:"1006",name:"Hopper6",image:"images/290161k.jpg"}, {id:"1007",name:"H

jQuery doesn"t .load() until .ajax() within callback of .load() is complete?

My problem is that the <div> with the jQuery progress bar ( dnc_scrubber.html ) isn't loaded until all of the other requests are complete. Is there anyway around this? I want to change the content of #tabs-1 to the progress bar, and animate it while dnc_scrubber.php is doing its work. The lines.php and progress.php files are used to calculate the percentage of work done by dnc_scrubber.php - which updates the session as it goes along. lines.php and files.php return the session variable. $('#tabs-1').load('dnc_scrubber.html', function() { var querystring = 'col=' + col + '&' + makeQS(files); var lines = 0; $('#progressbar').progressbar(); $.ajax({ url: 'dnc_scrubber.php', type: 'POST', async: true, data: querystring, complete: function() { for (i = 0; i < files.length; i++) { $('#complete').append('<a h

How to check for multiple radio button selections?

I have a question form that I want to validate using jquery. My form looks like this: <form id="question_answer_form" action="submit_answers.php" method="post"> <table class="zebra-striped"> <tr> <td >Question 1</td> <td> <input type="radio" name="question_answer1" value="1"> Yes <input type="radio" name="question_answer1" value="0"> No </td> </tr> <tr> <td >Question 2</td> <td> <input type="radio" name="question_answer2" value="1"> Yes <input type="radio" name="question_answer2" value=&q

current location needs page refresh in Jquery mobile

i have created an application in jquery and google maps javascript v3 , in which i am displaying a user's current location after a button click. Now the problem is some times i got pretty fine current location and sometimes at the same place its showing my current location miles away but again when i refresh the page i again got the pretty fine current location. does anyone know how to get rid off pressing refresh button again so a user doesn't has to press the refresh on their mobile browser ?? Note: I am testing this application in android phone which has a default browser. Page #1 has a button and Page #2 has a map but the Page #1 and Page #2 are combined in a single jQuery HTML page.

need help in getting and putting data from RadioGroup

rGroup = (RadioGroup)findViewById(R.id.radioGroup); rGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void onCheckedChanged(RadioGroup group, int checkedId) { Toast.makeText(cont, checkedId, Toast.LENGTH_SHORT).show(); } }); in these code above, i'm trying to get what the user clicks on the radio group, i shouldn't use onClicklistener right?

Custom "animate&rdquo; jQuery function. How to reset step"s "now&rdquo; variable?

I need to animate the background-position property of an element with jQuery. By following this tutorial, that uses default jQuery animate function, I had no luck. http://snook.ca/archives/javascript/jquery-bg-image-animations My function was like: $('#content').css( {backgroundPosition: "0 0"} ) .animate( {backgroundPosition:"(0 -900px)"}, {duration:500} ); I had no luck with it, so I tried to code my own function, that changes the vertical background position of an element. It looks like: $.fn.moveBackgroundY = function( pixels, duration, easing ) { return this.animate( { pixels: pixels }, { step: function(now,fx) { console.log("Background Y position - " + now); $(this).css({ backgroundPosition: '0px ' + now + 'px',

How to get the elements bound to a model in Knockoutjs

I want to add a product, find the node an let it flash products = observableArray([]); new_product = new Product(); products.push(new_product); $("tr", new_product.elements).flash(); I tried using afterAdd but it flashed each time I added something. I need to flash only with one of my adding function. The other functions which add should not flash the element. NOTE: flash is a custom JQuery function

The json encode did not return response after calling the function of fb post to wall

I have a link which posted data to another page vote.php through jquery. When I click on that link, it return the state according to the condition. If that user posted the vote before then it displayed the "already voted" other wise "Your vote posted". All was working fine. I am using the facebook post to wall sdk. Now when I call the fb_publish_on_wall function from the vote.php, the message successfully posted to my fb wall but it did not return the state of the vote like "Your vote posted". What is the problem. When I comment out that line where I am calling the fb_publish_on_wall function then It works fine. I think the jquery did not get response from vote.php after calling the fb_publish_on_wall function. How will I fix this? UPDATED: Here is the fb_publish_on_wall function function fb_publish_on_wall($message,$link,$picture,$name,$description,$user_facebook2) { $message = str_replace(array('<br />', '<

Reload page out of iframe

I'm using Fancybox and Zend. Hope the following is clear. On www.example.com/template/edit/id/3 I have jQuery UI Tabs. They are reachable directly via anchors. E.g. www.example.com/template/edit/id/3#tabs-2 On #tabs-2 I have some elements, doesn't matter what it is exactly. You can create or edit them. This elements got a own controller, so for editing them you call /elements/edit/id/44. Currently, I'm doing that in a Layer with Fancybox. I'm using the Iframe functionality of Fancybox for that. So, if you are on /template/edit and you click on the edit button of an element, a layer opens which includes an iframe which loads /elements/edit. So, if you change the element now and click on save, i want the layer to automatically close and reload. Fancybox provides an option to specify what it should do when it gets closed. At the moment i got it like that: 'onClosed' : function() {window.location.reload();} This actually reloads the top windo

Setting the id of a link based on it"s href

$('.portfolioThumbs ul li a').mouseover( function(){ var buttLink = $(this).attr('href') var buttLinkArray = buttLink.split( '/' ); // Split the URL after each / and Create an array of each var pFN = buttLinkArray[2]; // We want the Portfolio Folder Name var url = window.location.pathname; $('.galleryNav ul li a').removeClass('hovered'); $('.galleryNav ul li a' + '#' + pFN).addClass('hovered'); window.location.pathname = url + '#' + pFN; } ); This code allows me to set an ID on each button based on its href when the user "mouseover's" it. Does anyone know how this can be done automatically when the page loads, so that each button in the list gets and ID based on it's href, without any user interaction. Thanks, Dan

Why do I keep getting "undefined" for each item in this JSON array?

The following is returning 'undefined' as the value for each item. Can someone show me why? Jquery $("button").click(function () { var estimateID = this.id; var baseURL = "/Dashboard/EstimateDetails/"; var url = baseURL + estimateID; $.getJSON(url, function (data) { for (var i = 0; i <= data.details.length; i++) { $('#Details').html("<p>item1=" + data.details.Dma + " item2=" + data.details.Callsign + " item3=" + data.details.Description + "</p>"); } }); JSON { "details": [{ "Dma": "Albany-Schenectady-Troy", "CallSign": "WRGB", "Description": "WRGB (CBS) Schenectady" }, { "Dma": "Albany-Schenectady-Troy", "CallSign": "WTEN", "Description": "WTEN (ABC) Albany "

JSF2.0 - InputTextArea inside Dialog cannot be retrieved via Jquery during the dialog"s onShow event

I have the following dialog inside my .xhtml page. <p:dialog widgetVar="exampleDialog" onShow="fillTextArea()" > <p:tabView id="tabView"> <p:tab id="exampleTab" title="Example"> <p:inputTextarea id="someInputTextArea" autoResize="false" value="" /> </p:tab> </p:tabView> </p:dialog> The dialog is shown when a button is clicked. The fillTextArea javascript function is defined inside script tags at the head of the document. function fillTextArea() { console.log(jQuery("textarea[id='someInputTextArea']")); // logs empty array [] console.log($("[id='someInputTextArea']")); // logs empty array [] jQuery("textarea[id='someInputTextArea']").val('xxx'); // does nothing } What's the problem? Why can't I retrieve the input text area? In

How to Freeze Pane/Fix Website Header and Horizontal Nav Bar

I currently have a banner/header as well as a horizontal navigation menu below this header that I would like to freeze pane/fix, so that any content below this header/nav just scrolls beneath it, always. FYI, need it to work in IE8. I have setup the following skeleton structure of this as follows: <div id="banner-nav"> <div id="banner"> <div id="nav"> </div> </div> </div> <div id="content"> </div> Would appreciate your help on this. If it cannot be done on the above fashion, any other alternatives that would accomplish my requirement, would be great. Thanks.

How to use the javascript call method in jQuery?

Is it possible to use the call method of javascript (as described in the [mdn documentation]) in order to pass the argument this ? Having for example this code: console.log(this); $('#image_id').load(function () { console.log(this); }); I want that the second this (the one included in the load function ) refers to the same as the first one. I've tried with console.log(this); $('#image_id').load.call(this, function () { console.log(this); }); But it doesn't work. Thank you all in advance for any suggestion.

Jquery html tag replace

Is there a way to replace, with Jquery, this: <ul class="sub-menu"> <li><a href="#">Link</a></li> </ul> to this: <div class="under"> <p><a href="#">Link</a></p> </ul> Parent element is: <ul id="menu">

Multiple object selection with jQuery

I have a pretty basic jQuery question and forgive me if it has already been answered. Basically I attempt to have a link slide down a div. This is fairly simple however I require multiple links sliding down their respective divs. I understand I can just name the links and divs unique classes and solve the problem that way, however this naturally also requires a duplication of the jQuery code for each link-div and i have a lot. I therefore need a general script. A simplified version of my situation is as follows: HTML: <div> <a id=link1>toggle text 1</a> <div class=link1>TEXT 1</div> <a id=link2>toggle text 2</a> <div class=link2>TEXT 2</div> </div> My attempt at a jQuery general script for this: $(document).ready(function() { $('[id^=link]').bind('click', function() { var $div = $(this).attr('id'); if($('[class=' + div + ']').is(':visible

adding a mailto attr in jquery

content = ""; $.each(data.response, function(i, y){ $("div#userBox_"+id+" div#"+tab+"File").html(content); $("div#userBox_"+id+" div#"+tab+"File tr.") content="<table class='crmTable'><tr><th colspan='3'>"+y.email.email+"</th></tr>"; This .js code gives out this view I would like to add a .attr(mailto) somehow to this...but I have no Idea how to do this.

Solved - Edit jQuery Mobile nested-list - Event

I'm trying to add a clicked elements into a jquery mobile nested list. I'm having no problem adding the item but I'm having problem changing the text and url on the item (link). I can see the correct list about 0,5 seconds before it refreshes and everything is the same. What event can I use to edit a list-item after being listed? I've tried to run the code from firebug console and everything works , see code below: var test = $('.ui-page-active .ui-listview > li > div > div a').first().text(); var data = $('body').data('mobilMenu'); var url = $(data).find('a').filter(function() { return $(this).text() === test; }).attr('href'); $('.ui-page-active .ui-listview > li > div > div a').first().text(test +" - hovedside"); $('.ui-page-active .ui-listview > li > div > div a').first().attr("href", url); This solves the problem $( "[

jQ autocomplete issue in androdi app

I struggle with the autopcomplete Plugin for jQuery. <input type="text" id="name" /> <input type="password" id=""pass" /> //... $('#name').autocomplete({source: userName}); It works all fine but when I've selected a user name I get a text focus an both the name and the password input field. As soon as I type in a char it appears in both but just in the next moment the courser jumps in the name field and continues writing in there. I tried to disable and/or unfocus the password field using jQuery's focus/focusout events as well as autcomplete's autocompleteclose events but none of these worked. My target is a phinegap honegap 1.2.0. app, jQuery 1.18.16 and jqm 1.0 for 2.0+ android. Edit I forget the most important observation. This behaviour only occurs when I select a suggestion which is displayed over the password field. So my assumption is the click/tap event will be fired for both events. autoc

cross origin domain

I am trying to access a PHP file which is located in my domain but I want to do that using AJAX with jQuer. I am using a localhost and from there I am trying to call the PHP file here is the code I am using : <script> $(function() { $("#callAjax").click(function() { var theName = $.trim($("#theName").val()); if(theName.length > 0) { $.ajax({ type: "POST", url: "http://studiofutbol.com.ec/upload_file.php", data: ({name: theName}), cache: false, dataType: "text", success: onSuccess }); } }); $("#resultLog").ajaxError(function(event, request, settings, exception) { $("#resultLog").html("Error Calling: " + settings.url + "<br />HTPP Code: " + request.status

Saving Div Content As Image On Server

I have been learning a bit of jQuery and .Net in VB. I have created a product customize tool of sorts that basically layers up divs and add's text, images etc on top of a tshirt. I'm stuck on an important stage! I need to be able to convert the content of the div that wraps all these divs of text and images to one flat image taking into account any CSS that has been applied to it also. I have heard of things that I could use to screen capture the content of a browser on the server which could be possible for low res thumbs etc, but it sounds a little troublesome! and it would really be nice to create an image of high res. I have also heard to converting the html to html5 canvas then writing that out... but looks too complicated for me to fathom and browser support is an issue. Is this possible in .NET? Perhaps something with javascript could be done? Any help or guidance in the correct direction would be appreciated! EDIT: I'm thinking perhaps I could do

jQuery watermark plugin disappearing

I am in search for a good jQuery watermark plugin that work with ASP.NET and found here and downloaded it and included in the head portion <script src="js/jquery.watermark.min.js" type="text/javascript"></script> I have login and signup on same page and referencing them as: <script type="text/javascript"> $(function () { $("#<%= (Login1.FindControl("UserName")).ClientID %>").watermark("Enter your Username"); $("#<%= (Login1.FindControl("Password")).ClientID %>").watermark("Enter your Password"); $("#<%= (CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UserName")).ClientID %>").watermark("Enter your Username"); $("#<%= (CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("Password")).ClientID %>").watermark(

hovering of tds

I have a table in my application. I need to start hovering effect on a td when that cell is clicked and then stop hovering till the next click. Also mouseover to the next row of td that (hovering a range of tds). I am new to jquery. Please help. jQuery('td').hover(function(){ jQuery(this).css("background","#000"); }, function(){ jQuery(this).css("background","green"); });

Sum from TR with jQuery

I have for example: <table> <tr class="main"><td>test | sum:<span class="sum_main"> </span></td></tr> <tr class="sub"><td>test | sum <span class="sum_sub">2</span></td></tr> <tr class="sub"><td>test | sum <span class="sum_sub">5</span></td></tr> <tr class="sub"><td>test | sum <span class="sum_sub">6</span></td></tr> <tr class="main"><td>test | sum:<span class="sum_main"> </span></td></tr> <tr class="sub"><td>test | sum <span class="sum_sub">2</span></td></tr> <tr class="sub"><td>test | sum <span class="sum_sub">5</span></td></tr> <tr class="mai

Making iframe fadein

I would like to make my iframe fadein as soon as the visitor has loaded the website: I have tried : <script type="text/javascript"> $(document).ready(function () { $('#doneimg').fadeIn("normal"); }); </script> <span style="display: none;" id="doneimg"> <iframe src="http://om-p.com" width="90%" height="400" name="SELFHTML_in_a_box"> <p>Ihr Browser kann leider keine eingebetteten Frames anzeigen: Sie k&ouml;nnen die eingebettete Seite &uuml;ber den folgenden Verweis aufrufen: <a href="../../../index.htm">SELFHTML</a></p> </iframe> </span> but it does not work! thanks for you help here is an example: http://jsfiddle.net/zfFXr/ I have acces to the page which I am fading in!