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.
For example, here is a string representing an expression:
var str = 'total = sum(price * qty) * 1.09875';
I want to extract variables (i.e., 'total', 'price' and 'qty' but not 'sum' since 'sum' is a function name) from this expression. What is the regexp pattern in javascript? Variable name consists of letters, digits, or the underscore, beginning with letters or the underscore.
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"
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?
I am fiddling around with JBOSS's Web Services, and I have created the following:
http://127.0.0.1:8080/IM/TestService?wsdl
Now I need to access Web Methods from that Web Service from JavaScript.
Say I have a web method named foo in TestService, how do I make an ajax call to it?
I tried accessing the method via http://127.0.0.1:8080/IM/TestService/foo, but I'm getting an HTTP Status 404.
Hi Folks !
So I am having an issue on my entrepreneur business opportunity rating matrix :
I would like the radio buttons to stay on the same line.
The problem is that I don't know how I should process because if I give a fixed minimum width for the cell, i'm not sure it will display properly on other browsers, and if the cell is to big I loose the alignment of the radio buttons.
Do you guys have a CSS/Javascript (jQuery) trick that would fix this ?
Thank you
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?
I have a checkbox which in some cases may be disabled and checked using javascript, i.e:
var cbTest = document.getElementById("CheckBoxTest");
cbTest.disabled = true;
cbTest.checked = true;
However, when sending a postback, CheckBoxTest.Checked is false on the server side.
Is it possible to disable the checkbox and still have the server side recognize it as checked?
To create a digital signature with the client certificate in javascript, there was a function: crypto.signtext() that doesn't work anymore
What is the easiest way to do this now?
I'm trying to find something like this: http://coffeescripter.com/code/ad-gallery/ that is controlled by an xml file that can simply contain the image location, thumbnail location and the text for title/description. Has to be pure jquery or javascript though - no flash based stuff.
I've found loads of great components but can't find one that is controlled by XML. Anyone happen to have seen one around anywhere please?
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?
Hello, this is quite a simple question hopefully.
Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to scrap flash and use JavaScript and jQuery. Now, as long as the XML file is at a readable URL I should be able make an AJAX request for the file and use it. Is that correct?
Many thanks
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?
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??
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
I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled.
var ControlTypes = {
TextBox: function () {
console.log(this);
this.Name = "TextBox";
console.log(this);
}
}
ControlTypes.TextBox();
Firebug gives the following result:
Object {}
Object { Name="TextBox"}
The first object is ControlTypes and the second one is Textbox. Could anybody explain the behavior behind this?
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.
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>
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.
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 would like to extract some text between two points in a string, in Javascript
Say the string is
"start-extractThis-234"
The numbers at the end can be any number, but the hyphens are always present.
Ideally I think capturing between the two hypens should be ok.
I would like the result of the regex to be
extractThis
javascript:
location.href("somefile.php"); // successfully working with IE
location.href = "somefile.php";
Ques 1. first code is not work with Safari. Why?
Ques 2. What is the difference b/w these codes.
Thanks,
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
I want to create a PDF file based on users' query result (in html table).
What is the best javascript/lib I can use for IE?
I found jsPDF but it does not support IE.