javascript

TinyMCE: Looking for line count solution.

I am looking for a plugin or code with a functionality like the "line count" or "line number" in common editors. The line number usually is shown on the left border of the editors content. Anyone got an idea how to do it with TinyMCE? Example: line number | content line number one number two 3. one line skipped (three is empty) 5. co...

How to display tree on web site?

I'm looking for jQuery plugin or something that helps to display: 1 / \ 2 3 / \ 4 5 / \ 6 7 / \ 8 9 Any tips? P.s. W/o silverlight/flash magic. No problems with CSS3/Html5. ...

Count number of empty input boxes in table row

How do you calculate the number of input boxes with no value in a table row using jquery? example: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input type="text" value="10%" /></td> <td><input type="text" value="" /></td> <td><input type="text" /></td> </tr> <table> I'm looking for a...

Fetch and load a whole page with AJAX

I realize that it's generally not a good idea to do this but the reason why I want to is because it's a really heavy page and I want to show the user progress of the download and when it's done load the page. I can either do this with some kind of spinner but is it possible for me to show the actual progress? Can I see how much and what ...

how to download and configure phpimage for TinyMCE

Actually I am looking for the best HTML editor for my CMS. With support for PHP and jQuery. I found TinyMCE but it doesn't have image upload functionality. Then I found phpimage, but every time I go to http://sourceforge.net/tracker/?func=detail&amp;aid=2844769&amp;group_id=103281&amp;atid=738747 and click on "files", I get the normal T...

onMouseOver, hyperlink and rel...help me :(

Hi, Currently, I have a carrousel on javascript which works when we click on hyperlink, like this : <div id="direction1"> <p> <a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" /> </a> </p> </div> I would like execute this evenmen...

jquery ajax calls with scope safety

My gut tells me that if i am on a laggy server and the user fires two events fast enough on the success function c will be the value of the most recent event causing func1 to use the wrong value. <--- This is a guess, i haven't proved it. Its a feeling. How do i ensure that i use the right value when calling func1? I prefer not to send ...

How to read and parse (local) XML-file in Prototype JS?

I have to create a module in a specific project, which already uses PrototypeJS. What I have: - An XML File with information What I want: - A simple div, which displays the (with XPath filterd) Content of the XML-File. I am complete new to PrototypeJS and dont know where to begin, so I appreciate your help. Blessing chris ...

GEvent.addListener(...) return?

Hello, my Question is as follows: What does GEvent.addListener(map, "click" function(){...}) return into the callback function? I don't find any information in the GMaps reference at all, can you show me some? The only thing I found out was that there are two parameters, "overlay" and "latLng" that are passed. The name of these paramete...

Javascript keep running even when you refresh the page

Hi all, Have anyone of you experienced that a javascript in a page keep running even after you refresh the page? As far as I know, javascript is single threaded, and it shouldn't keep running if I refresh the page. For you info, I was implementing comet for a website. The previous request for lpoll keeping posting to server even after ...

window.close() generates problem

this code generates problem [encountered problem of window] and close all the safari windows, but this code is working fine with Internet Explorer. What will I do ? have any alternative method for closing current opened window in every browser. <input type='button' value='close' onclick='window.close()'> ...

How to execute in JavaScript function in ASP.NET using C#

i have a textarea which i want to disable when I check a checkbox. I made a working demo in plain HTML and JavaScript , but When I am migrating to Asp.net, neither the function is being executed nor I can keep the OnSelect event in my check box. <asp:CheckBox ID="ChkOthers" runat="server" Text="Others(Please Explain)" Width="205px" Auto...

How do to check to see if the user has a Google account.

Is there any safe way to detect, on a web page, client side (JS), whether user has an Google/Yahoo/Live/? account? I know about some suspicious ways to do this by styling visited links and then sneaking on computed style attribute, but it's more of a hack, Mozilla and maybe other are planning to crack down on this, as it might be abuse...

Jquery Automatic Image Slider w/ CSS & jQuery

This is Automatic Image Slider w/ CSS & jQuery by Soh Tanaka I am trying to customize it to show .desc when the mouse hover overs the slider but it does not seem to work any help? //Set Default State of each portfolio piece $(".paging").show(); $(".paging a:first").addClass("active"); //Get size of images, how many there are, then dete...

How to give focus to an iFrame in firefox just page is loaded?

How to give focus to an iFrame in firefox just page is loaded? FYI: I tried focus() javascript & jQuery functions to do this, works properly for XP, but doesn't work for Windows 7? Also, how does foucs() functionality differs from platform to another one? ...

close other HTML window by javascript function

hello i need a popup window to appear to the user but without parent widow ! but this is impossible so i think that I may have to make the popup close the parent after it appears, but how ? i tried this in the popup: <BODY align="center" valign="center" onload="javascript:window.opener='x';window.close();"> but it closed the pop...

How to access key itself using javascript

I have a JSON like: var xx = {'name':'alx','age':12}; Now I can read the value of name which is 'alx' as xx[0].name, but how should I retrieve value of 'name' itself? By that, I mean how can I fetch the key at run time? ...

Which method should be used ideally - document.getElementById or document.forms[]?

Hi Guys, I would like to know which of the following method is better? document.getElementById or documennt.forms[]? Which is the one that cshould be used regularly. The focus is on performance. Regards, Naveen ...

Create an object with javascript reflection?

I am doing something wrong. At the end of this o is empty. I want to pass in a string such as a=3&zz=5 and do o.a and o.zz to retrieve 3 and 5. How do i generate this object? function MakeIntoFields_sz(sz) { var kvLs = sz.split('&'); var o = new Array(); for (var kv in kvLs) { var kvA = kvLs[kv].split('='); v...

Json Convert To and From Query String with jquery?

I have a string like a=6&id=99 (i might store it in html as 'a=6&id=99' however thats not what js will see). I would like to convert that string into an object so i can do func(o.a); or o.id=44; How do i do that? Part 2: How do i convert that object back to a query string? it would probably be trivial code that i can write. ...