javascript

how to make the parent window close automatically in IE without popups??

hi i have written code for opening the child window with disabled toolbar and menu bar in IE. i have written the code in parent.jsp. For IE version 8 the problem i face is it shows the pop-up saying "Do you want to close the window ? Yes or No ". I dont want to this pop-up to be shown in IE 8 the below code does not show the popup ...

Where can I find a proper JavaScript beautifier

I have used http://jsbeautifier.org/ successfully using Rhino and ant, but the problem is that it is not deterministic. If you run the beautifier twice on a file the result is different from each time, e.g. each pass inserts additional array intendation on some lines. I have spent a lot of time debugging the code in beautify.js and have...

Splitting in string in JavaScript

How to split a string in JavaScript with the "," as seperator? ...

How to find input text box is exist in iframe window ?

hi friends, How to find the input text box is exit or no in my iframe html window using javascript Now i using below code if(document.getElementById('iframe').contentWindow.document.getElementById("INPUTBOX").value) { alert("Exist") } else { alert("NOT Exist") } But it gives me error "Object required" ...

prototype - how to delay a call to hide() by 10 seconds

Hi, I have the following code: $('message').show(); $('message').hide(); How do I add a 10 second delay between the show and hide in prototype? Thanks ...

Timer in Web Application

I'm trying to create a web based test (as in exam) application with CakePHP. When a test is started the webserver stores the exact start time in session. When the test ended and the client submit the answers to the webserver, the webserver will recheck the submission time with the previous start time. If the total test time is within a ...

Download file and display contents with javascript

I have a simple webpage which has a link, on pressing it a file is downloaded(rest web service call). I need to read the file and display the contents using javascript. How do I do this? ...

How to get last key in array in javascript?

This is similar to this question,only PHP->javascript http://stackoverflow.com/questions/2197933/how-to-get-numeric-key-of-new-pushed-item-in-php ...

Trouble moving Inline Javascript to the very end of my html file.

Is it possible to move a remote inline javascript widget to the very end of my html, and then, once the DOM is ready, inject the widget inside a specific element. I see inline javascript as a candidate for poor performance. Thanks in advance. ...

message box in asp.net web application

how to display the 'successfully saved' message box in asp.net web application by using javascript. any idea ??? ...

Prevent browser from prompting for file download when opening CSS file in iFrame?

I have a web app which loads an arbitrary page or file into an iFrame. Under some browsers, when pointing the iFrame's src to a css file, instead of displaying the css text, a "download/open file" prompt appears. Is there any way to prevent this? I understand the valid security reasons for not downloading or opening a non-text file by ...

How to dynamically plot various graphs

Hi All, How to dynamically plot different graphs using javascript in html pages. At runtime the value will be got from some function. Also comparison of different parameters to be done. Please help me out. ...

check how many element between ID

Hi i have div , <div id=refer_friends><input type='text' name='refer1'> <input type='text' name='refer2'> <input type='text' name='refer3'></div> How to check, how many input element between DIV refer_friend , Using jquery ...

How do I make an addon run a function whenever a page is loaded.

I am developing a firefox addon and I want it to add an event listener on every form field. How would I implement this. ...

string concatenation inside jquery selectors

I am developing a application in C#, ASP.NET and I have a lot os divs in my page, each div is a container for a chat message and each div have a unique id: like this "<div id='" + myMsgs[j].id_chat_message + "' style='padding: 10px;'>" so, each div have the same id in page and in database. now a want to find some div, with jquery, bu...

Combine Google Maps API & Google Maps Data API

When i embed a map from my maps i use the link that googgle maps provides me This map i can manipulate with Google Maps Data API and Java <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?source=embed&amp;amp;hl=el&amp;amp;geocode=&amp;amp;ie=UTF8&amp;amp...

Struts2 strip Script Tag ?

Hello everybody, I have a big pb with struts 2, when i put embedded tag in my jsp, when i want to display it, they seem to have diseappered from the file. Is there any content filtering process in struts ? (to prevent XSS for example) Regards. ...

echo javascript with single quotes

hello i got this thing <? if (mysql_num_rows($say) == 1) { $a = "cicişsin!"; } elseif (mysql_num_rows($say) == 0) { $a = "<a href='javascript:LaunchPopup('a2.php','250','1');'>ciciş yap</a>"; } ?> but i cant echo second $a.. its exits at "javascript:LaunchPopup(" single quotes not shown what can i do? ...

ActiveXObject issue in javaScript

hi.. I wrote a javascript function in my html page to execute an .exe file. for this i used ActiveXObject. my function is: //~~~~~~~~~~~~~~~~~~~~~~~~~~~JavaScript~~~~~~~~~~~~~~~~ function openWin(url) { if (!document.all) { alert ("Available only with Internet Explorer."); return; } var ws = new ActiveXObject("...

jQuery Accordion - open specific section on pageload

Hi, I have a rather basic implementation of a jQuery Accordion on a page (using 1.3.2, jQuery UI Core 1.72 and jQuery UI Accordion 1.7.2), and I wish to open the 2nd section when the page loads. i've tried numerous methods but nothing seems to work... HEAD SCRIPT: <script type="text/javascript"> $(function() { $("#accordion").acc...