Looking to run through something very similar to (http://www.emcro.com/blog/2009/01/facebook-infinite-session-keys-no-more/) but using javascript instead. Any ideas on how to accomplish this?
Hi All
I have a modal popup as (lightbox etc.). If i want to add java applet into the modal popup via javascript i encounter a problem that is Java Applet don't display propperly sometimes dont' everytime. I tried to solve it setTimeout methot but it didn't solve :( Do you have a suggestion this issue? Thanks.
Clicking on the image should show div near it (.show() in jQuery).
But how can i attach div to that image? Is it done with pure css, or javascript?
I tried several "position:absolute", but can't attach it near image.
How it should be done?
Hi ,
i have few numbers like
0011,0101,0123,1234,5245,0052,3265,0047,0124
How replace prefix zero only,
like no number should start with zero ,
exactly like
0011 should be 11 ,
0101 should be 101 ,
0123 should be 123
How to do this ?
Is ther any javascript function there ,
Thanks
Hi,
I am trying to format this line of code in my popup window, but i am facing unterminated string literal error.
Can somebody please tell me how best I could format this.
window.setTimeout("winId.document.write('<script src="../js/tiny_mce/tiny_mce.js" type="text/javascript"></script>\n')", 10);
Also point out if this particular line of code would work fine in the popup?
How to check in C# if a javascript file is already loaded on to the page? Let's say I have a user control in a different namespace that I load on to a page. I would like to see if a script file doesn't exist before I register it with the scriptmanager.
Hi everyone!
Is it possible to call a ruby method inside javascript? One way of implementing it is via ajax calls, but is there a way I can embed that ruby function inside the js file and call it just like calling any other js function?
Whats the easiest way in javascript to replace ABC, DEF, GHI with XYZ in the following strings
http://z.site.com/z/ABC/z/z.html
http://z.site.com/z/DEF/z/z.html
http://z.site.com/z/GHI/z/z.html
HI ,
i am having a table like
<table id="toc" class="toc" border="1" summary="Contents">
</table>
i am trying to delete the entire table using javascript.how to do this??
CODES:
$().ready(function(){
function sample()
{
alert("This is sample function");
}
$("#button").click(function(){
t=setTimeout("sample()",2000);
});
});
HTML:
<input type="button" name="button" id="button" value="Call sample function with delay">
Once i click button sample function is not called with a delay of 2 seconds. I dont know whats wrong. Please notify me how to do this
Question: To call javascript function using setTimeout via jquery
I think I have not got the syntax correct for writing a javascript function and calling it to assign its return value to a variable.
My function is:
getObjName(objId){
var objName ="";
$.ajax( {
type : "GET",
url : "Object",
dataType: 'json',
data : "objId="+objId,
success : function(data) {
objName = data;
}
});
return objName;
}
I am trying to call it and assign it to a variable with:
var objName = getObjName(objId);
However Eclipse is telling me that "there is no such function getObjName() defined"
It seems that javascript only can ready inline css if i want to check if element is display:hidden getting it with:
el.style.display
But how to check if display:none is placed inside external CSS file?
Dear All,
I am experienced in the technical support like Linux, oracle, sunos etc and but if i say scripting i know little bit of bash. Now i promoted to manage technical engineers including some JavaScript developers, so i want to learn JavaScripting so that i can understand engineers. Hope you understand. Can you please advise me how can i start JavaScripting and point me to some simple docs and examples.
Hi,
May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10?
<script type="text/javascript">
var str="1, 100 or 1000?";
var patt1=/10?/g;
document.write(str.match(patt1));
</script>
is it possible to call a dynamic method in javascript. ie suppose i have in my page 2 methods as such:
function id1_add()
{
return 1;
}
function id2_add()
{
return 2;
}
i also have this function:
function add()
{
var s1='id1';
s1+'_add()'; //???
}
is it possible to call for example id1_add() in such:
s1+'_add()';
so the method call depends on a previous string?
Please help about controlling PDFs through JavaScript loaded inside Safari.
Safari uses a PDF plugin of its own something exclusive to Safari and not present in other webkit based browsers like Chrome.
Any of the or js commands that would work with the Adobe's plugin don't seem to work.
Any help / pointers would be appreciated.
Is there any javascript(/jquery) framework/plugin which generates Balloons? The one that can be used in Comics. The balloon dynamically expands and contracts based on the length of the quote.
I am taking a text file from user and then posting that file back to the browser using ajax storing the content in db and then showing the content back to user page using Jquery post response.
Now i want to something like this..
Read the text file from the user computer using javascript. Display the content and when he submits the page I will save the values.
I have a small JavaScript validation script that validates inputs based on Regex. I want to allow certain characters that are not exactly common (not sure if they're UTF8). For example I want to allow the following character ’, which looks like a single quote, but isn't.
I got the HTML code for this which is ’, but I'm not sure how to put this into the Regex.
I've tried just inputting [’]* but it doesn't validate.
I am creating quite a bit of XML with JavaScript which is then processed by variuos components. I would like to send this XML to some file and prompt the user to save it on their disk (all this happens in the browser at the client, no server interaction whatsoever). Is this at all possible? Google is not a lot of help here :(
How is it possible to make a input field editable in javascript. I mean onFocus putting it in insert mode so that values can be overwritten. Any suggestions ???
hey..
i'm working on my html and javascript project and i wanted to add music for the website..
i was wondering is there anyway i can put more than one song in the code to be played, if there is please write the code
and is there anyway that the song will continue when openning the next page??
please help
thanks alot
I'm planing to start learning JQuery (among other things), so I'm looking for a good Javascript editor that can preferably provide some of the following features:
Syntax coloring
Contextual help for standard JS functions, JQuery functions and possibly custom ones.
Some code completion.
(optional) JS debugging
Is there such and editor out here? or any that come close to this?
Hi everybody, I'm trying to develop a personal website and running into some issues. At the top of my page I had a horizontal table that contained 6 different images (buttons) that linked to different sections of the page.
I wanted to spice up the buttons with JavaScript and make the image of the button change onMouseOver and onMouseOut so I found a way to do so online with some JavaScript but the problem now is that the buttons no longer jump to the appropriate section of the page when using Google Chrome or Safari, but in IE 9 they still do work correctly...
Here is my old code that worked properly:
<html>
...
<body>
<center>
<table border="1" style="color:#D80000;text-align:center">
<tr>
<td>
<a href="#about"><img src="images/aboutMe.png" alt="About Me"></a>
</td>
<td>
<a href="#courses"><img src="images/courseList.png" alt="Courses"></a>
</td>
<td>
<a href="#work"><img src="images/workHistory.png" alt="Work History"></a>
</td>
<td>
<a href="#places"><img src="images/placesBeen.png" alt="Places I've Been"></a>
</td>
<td>
<a href="#games"><img src="images/gamesPlay.png" alt="Games I Play"></a>
</td>
<td>
<a href="#contact"><img src="images/contactMe.png" alt="Contact"></a>
</td>
</tr>
</table>
</center>
...
</body>
</html>
Here is my new code that is now broken:
<html>
<head>
...
<script type="text/javascript">
<!--
if (document.images)
{
<!-- Preload original Images -->
var about_init= new Image();
about_init.src="images/aboutMe.png";
var courses_init= new Image();
courses_init.src="images/courseList.png";
var work_init= new Image();
work_init.src="images/workHistory.png";
var places_init= new Image();
places_init.src="images/placesBeen.png";
var games_init= new Image();
games_init.src="images/gamesPlay.png";
var contact_init= new Image();
contact_init.src="images/contactMe.png";
<!--Preload images for mouseover -->
var about_new= new Image();
about_new.src="images/aboutAlt.png";
var courses_new= new Image();
courses_new.src="images/courseAlt.png";
var work_new= new Image();
work_new.src="images/workAlt.png";
var places_new= new Image();
places_new.src="images/placesAlt.png";
var games_new= new Image();
games_new.src="images/gamesAlt.png";
var contact_new= new Image();
contact_new.src="images/contactAlt.png";
}
function change_it(the_name)
{
if (document.images)
{
document.images[the_name].src= eval(the_name+"_new.src");
}
}
function change_back(the_name)
{
if (document.images)
{
document.images[the_name].src= eval(the_name+"_init.src");
}
}
//-->
</script>
</head>
<body>
...
<center>
<table border="1" style="color:#D80000;text-align:center">
<tr>
<td>
<a href="#about" onMouseOver="change_it('about')" onMouseOut="change_back('about')"><img src="images/aboutMe.png" name="about" id="about" border="0" alt="About Me"></a>
</td>
<td>
<a href="#courses" onMouseOver="change_it('courses')" onMouseOut="change_back('courses')"><img src="images/courseList.png" name="courses" id="courses" border="0" alt="Courses"></a>
</td>
<td>
<a href="#work" onMouseOver="change_it('work')" onMouseOut="change_back('work')"><img src="images/workHistory.png" name="work" id="work" border="0" alt="Work History"></a>
</td>
<td>
<a href="#places" onMouseOver="change_it('places')" onMouseOut="change_back('places')"><img src="images/placesBeen.png" name="places" id="places" border="0" alt="Places I've Been"></a>
</td>
<td>
<a href="#games" onMouseOver="change_it('games')" onMouseOut="change_back('games')"><img src="images/gamesPlay.png" name="games" id="games" border="0" alt="Games I Play"></a>
</td>
<td>
<a href="#contact" onMouseOver="change_it('contact')" onMouseOut="change_back('contact')"><img src="images/contactMe.png" name="contact" id="contact" border="0" alt="Contact"></a>
</td>
</tr>
</table>
</center>
...
</body>
</html>
The images properly switch when the mouse is moved over/off them, but the jump to the corresponding page sections seems to be broken, it seems like they're all jumping to the #about section now. Once again, the weirder thing is that this is only the case when I'm using Google Chrome on my laptop running Windows 7 or Safari using my iPhone 4 but when I use the new Internet Explorer 9 on my laptop running Windows 7 all the buttons still link correctly.
Any idea what's breaking the links?