Hi All,
Quickish issue. I'm currently working with RoR with a great deal of Javascript for a project. I have a particular entity that has a "color" property. Of course I want to do this as "snazzily" (yup that's a word) as possible, however, I'm not sure how to go about it. I've seen a million and one different "Color Pickers" but n...
My goal is to serialize JavaScript native datatypes for storage into an SQLite database. I'm doing this within a Firefox extension, and so I have access to the Mozilla platform XPCOM api. Initially I was thinking that the easiest thing to do would be to just store JSON strings.
However, if there is a way to serialize native datatypes w...
Is it possible to put multiple IF statements in Javascript? If so, I'm having a fair amount of trouble with the statement below. I was wondering if you can put another IF statement in between if (data == 'valid') AND else? I want to add another if data =='concept') between the two.
if (data == 'valid') {
$("#file").slideUp(function ...
This is the file I'm using $.load() to load into DOM:
<script type="text/javascript">
$('.close').click(function() { alert(1) });
</script>
<div class="close">
click me
</div>
Say,it seems to me that the <script> part will automatically be delayed when it's loaded ,is that a feature of $.load()?
If so,how is that implemented...
I want to retrive login window user name and display in Browser. Can java script be used for the same?
...
Is there a better way to create objects in IScriptControl than this?
Result := SC.Eval('new Date()');
I need something like this:
function CreateJSObject(JSClassName: string; Params: PDispParams): OleVariant;
a naive implementation would be
var
S: string;
begin
S := '';
for I := P.cArgs - 1 downto 0 do
begin
...
Hi,
I' m trying to enable adding/deleting rows to/from table using folowing code:
Script:
$(document).ready(function() {
$('#btnAdd').live('click', function() {
var name = $('#txtName').val();
var name2 = $('#txtName2').val();
$("#tbNames tr:last").append("<tr><td>" + name + "</td><td>" + name2 + "</td><td><simg ssrc='del...
Given a large legacy project utilizing ASP.NET, javascript, css, etc, technologies, I was wondering if changing the DOCTYPE of the web pages, say, from HTML 4.0 Transitional to XHTML 1.0 Transitional (or the other way around) in any way could break the javascript functions of the web pages.
There are plenty of articles and discussions a...
I'm looking for a jQuery plugin that can get url parameters, and support this search string without outputting Javascript error: malformed URI sequence. If there isn't a jQuery plugin that supports this, I need to know how to modify it to support this.
?search=%E6%F8%E5
The value of the url parameter, when decoded, should be:
æøå
(th...
So I'm using JSLint to try and detect errors. I turn some options off I don't like, but I don't see any way to enable being able to use the window global variable. Well there is the Yahoo Widget option, but that's overkill.
What's the deal with using 'window', why would jslint say that is causing errors?
...
Hi Guys,
I have a script which creates a user-defined object like this:
obj = new Tree();
This object is always present and interacting with the user.
I want to create a button on the page which, if pressed, should retrieve this object, make some changes to the object and call some methods.
If this were a DOM object, I could have u...
Does anyone know how to set the working directory in JavaScript before?
Code I use for launching an application is this:
// Create an object script
oL = new ActiveXObject("WScript.Shell");
oFile = '"C:/Application.exe"';
oL.run(oFile);
...
can you use parameters some how to alter 'book' and 'person' in this statement :
book.borrower= person; eg JSObj.borrower = "SteveJobs";
I cannot seem to find a way,
Is there one?
...
Hi all
Will any one please explain me what is server side java script and client side java script
Because i recently heard about livewire javascript is server side and navigator javascript is client side.
kindly any one explain me the difference
Thanks in advance
Fero
...
Hi, i have a literal object like this
var O={
toString:function(){
// some code here
},
anotherMethod:function(){
// some code here
}
}
Im walk through object with for-in loop
for(var p in O){
// some stuff with p and O[p]
}
The problem is toString property will not catch in the loop on IE browser!
...
Hi,
I am trying to display image, which is dynamically generated on client side with Silverlight, in a new browser window.
This is my javascript function:
function PrintImage(img)
{
var newWin = window.open();
var locImg = new Image();
locImg = img;
newWin.document.write("<img src=" + ...
I'm rewriting a JavaScript project, and I want to be able to use object oriented methodologies to organize the mess that the current code is. The main concern is that this JavaScript is supposed to run as a widget inside 3rd party websites and I can't have it conflicting with other JavaScript libraries that other websites may use.
So I'...
I have a series of Delete icons displays as such:
echo '<img id="'.$items['id'].'" src="images/delete.png" />';
Where $items['id'] is a reference to the id of the DB item I would like that icon to delete.
How can I access this id in jquery when the item is clicked so I can then call a:
$.get('ajax/delete.php', { id: $('#id').val() }...
How do I read contents from a server side file using javascript?
...
We use MOSS 2007 (SharePoint) for our intranet. Recently we were tasked with supporting the branding for multiple companies on our farm. We quickly realized that the application pages (produced by a modified application.master) can't serve up multiple branded templates (other than themes).
I think the right fix is to keep the default ...