javascript

ColorBox Grouping Photos

Im using color box, i have it working fine, except i don't understand how to add multiple images to the gallery when it is clicked. Here is the page i am working with: CLICK the FIRST FLOWER http://newsite.702wedding.com/las-vegas-wedding-flowers.aspx But i need 2 images to appear for each flower. Thanks for your help! ...

pass function in json and execute

Is there any way that I can pass a function as a json string (conversion with JSON.stringify), send it to another function, parse the json and then execute the function that was in the json? I am using jquery and javascript. ...

Javascript NiceEdit Configuration Question

Hi, I'm trying to use nicedit from http://nicedit.com Currently I'm using this to add nicedit to all text areas: bkLib.onDomLoaded(nicEditors.allTextAreas); How do I configure these wysiwygs? I found I can configure single boxes by: new nicEditor({fullPanel : true}).panelInstance('area2'); But how do I do this when using bkLib.on...

read Twitter cookies?

Is it possible to check (using PHP or Javascript) if a user is logged into his/her account? I need the name, email and photo. ...

Windows Gadgets - addTextObject doesn't work

This gadget: <!DOCTYPE html> <html> <head> <title>Test</title> <style type="text/css"> body { margin: 0; width: 200px; height: 200px; } </style> <script type="text/jscript" language="jscript"> document.onreadystatechange = function() { ...

regex not working

What is this regex supposed to do, because it keeps giving back null? var klass = this.rel.match(/facebox\[?\.(\w+)\]?/) I thought it was extracting extra words from the rel attribute? thanks, Richard ...

What's a good way to display a loading image until an ajax query completes?

Right now it contacts the server every time a user toggles "Comments (X)" I'd like to make it so as soon as a user clicks ".info .reply" (Comments (X)), an ajax loader appears just until the data is finished loading, then the loader disappears. // Replies - Toggle display of comments $('.info .reply').click( function() { $('.reply'...

Need to make POST when users clicks on a image

Hello guys, im very new at javascript so, this is the question. I need to make a POST action every time a user hit an specific image on the web page, every image send a POST var like "image1=1"... example: In this page, every time you hit the number to vote, it makes a post action, i need the same but with images and with an explanation...

python's hasattr in javascript?

in javascript: d={one: false, two: true} d.one d.two d.three I want to be able to differentiate between d.one and d.three. By default they both evaluate to false, but in my case they should not be treated the same. ...

DOM parsing in server-side

Is there any framework on which I can access the DOM when a user send the data back to the server? It would be useful for changing the page content using directly the DOM structure. It would sound as a server-side javascript on which i could write document.getElementById. ...

Dotnetnuke JQuery Javascript

<TD class="CATRow11" vAlign="middle" noWrap align="left" height="100%">$<span id="MRRP" class="CATRow12">100</span><br /><span id="dnn_ctr412_ProductPage_UnitCost"><span class="CATProductListItem"><span class="CATProductListItem">$2,313.29</span></span></span></TD> Hi What I need to do is with JQuery in DNN is change the 100 to a valu...

help with understanding the logic behind how javascript executes on new dom elements being created on the fly

I have a this set up <ul> <li>item 1</li> </ul> my js let me make them sortable and what not, one feature I have is that via ajax i can create a new list item on the fly. But whats interesting is that I have a hoverIntent letting me hover over the list item and a delete and edit icon appears letting me perform the intended actions. M...

AJAX returns whole web page

I am using Ajax to do a live search and all i want is the data t be displayed in a div called "results". However when im ding the search, it displays the search form again and then the results div. How do I go by solving this? Here is the ajax code: function finding(str) { if (str.length==0) { document.getElementBy...

How to track lines count when words are wrapped?

Have a text to output in div printed with not fixed-pitch font. This div height permit to print only 4 lines of text. Is it possible to track automatic browser word wrap, so I can find position in text, when it has reached 4 lines and to cut away next lines? Any suggestions using Javascript manipulating with DOM or maybe text line length...

What JavaScript topics can't those new to the language be without?

I recently got involved with the jQuery Project and the PromoteJS movement has inspired me to spend some time writing a free, comprehensive book on JavaScript fundamentals for beginners (I feel you need to understand what JS is about to make the most of libraries). What I would like to target are topics that both total beginners and th...

Very weird behaviour for jQuery getJson() not changing values in a loop

OK, this problem is very odd. I am receiving a list of items using getJSON(). For each of the returned items, I perform a lookup using getJSON() again. Upon return of the second lookup, I try to append a variable from the scope of the for-loop to the DOM but the output is the SAME. The weird thing is that when I issue an alert() of the v...

Encoding for Return value

I´ve got this javascript: <a href="javascript:addtext('q');">q</a> When it is clicked it writes text on a textarea. I went through the encoding and found can do things like this: This will add a " " (Space) <a href="javascript:addtext('%20');">Space</a> And this will add an "á" <a href="javascript:addtext('&aacute;');">á</a> N...

Replace only text on a webpage to create a link

Hello, I would like to modify text in a document that is in the form of a date and replace it with a link to add an event on that date to Google Calendar. I mostly have this working with one caveat, it tries to add the link inside of already existing links that have dates in them. document.body.innerHTML = document.body.innerHTML.repla...

tinymce: rich text mode, how does it work

I want to understand how tinymce functions. the rich text editor contains an html document within an iframe. how are the nested DOM elements inside editable, In other word how am I able to type inside a <div> or a <p> layer when there is no textarea or input field involved (at least I dont see any)? are the elements converted to input ...

jQuery append() issue in IE

Hi All, I have the following script which I am running. It loops through each table in the page and appends "Table n [Table Title]" below each table. This script works fine in Chrome, Mozilla but not IE 6 or 7. No errors are captured. Can anyone help with explaining if I have missed something here in my script or is this a bug in jQu...