javascript

TinyMce imagemanager won't generate image path when used with an iframe

I have successfully setup tinymce to work on a page within an iframe. Everything works perfectly. However, when you use imagemanager to pick an image to be inserted or replaced in the editor it will not copy the path(and filename) of the image to the "Image URL" input in the "Insert/edit image" box. The box will either remain empty or k...

asp.net mvc dialog box mechanics at the end of the request

<form action="/Home/JSONRequest" method="post" enctype="multipart/form-data" onsubmit="return submitForm(this)"> <input type="file" name="file" id="file" /> <input type="submit" name="submit" value="Submit" /> </form> <script type="text/javascript"> function submitForm(frm) { var tdata = $(frm).serialize(); $.aj...

Javascript array index is a var

Hi, I'm working on a website with Jquery tabs dynamically generated. Each tab has an ID. For the purpose of my script I need to know how many times the user has clicked in a tab. To record the number of clicks I was thinking of doing an array like this: var i = new Array(my_tab_id); (...) i[my_tab_id] = 0; Where my_tab_id dynamica...

How to include javascript/css once with Struts 1.x

If this is the wrong approach, please suggest something better, but my current efforts have been trying to find something that exists for a single page load, such that I can cache which javascript/css files have been included so as to only include them once. I thought in a TagSupport subclass I could use (HttpServletRequest)pageContex...

what does setState: function(){ mean

what does it mean when you set a function like this setState: function(){ } ...

Documentation about difference between javacript src and javascript library in grails

I know that if you write in a view: <g:javascript src="myscript.js" /> <g:javascript src="myscript.js" /> <g:javascript src="myscript.js" /> <!-- other try --> <g:javascript library="myscript" /> <g:javascript library="myscript" /> <g:javascript library="myscript" /> It will out output: <script type="text/javascript" src="/vip/js/my...

Search the document for an element with a style name?

Hi, Is there a way to search the DOM for an element with a particular stylename class? Something like: var node = document.findByClassName("foo"); if so, will this be extremely slow if my page has like 2000 elements in it or so? Thanks ...

How to make a user access security certificate.

I have a web application that I would like to allow persistent access to that is not dependent on the browser cookie system. Is there something that will allow me to, upon the first user authentication, send the browser a certificate which the app can check for periodically or upon future returns to the site? Maybe some take on an SSL? ...

jQuery: part of a function not executing

Hi. I have a tabbed setup on the page and I want to automatically make corresponding menu tab highlighted as well as corresponding content div show depending on # hash. Example: http://design.vitalbmx.com/user_menu/member_profile_so.html -- no hash, opens 1st tab http://design.vitalbmx.com/user_menu/member_profile_so.html#setup -- #s...

Why do I never see the prototype property in JavaScript code I edit?

Why do I never see the prototype property in JavaScript code I edit, from books and documentation I've read, it seems to be a cornerstone of the language. ...

help me understand a variable setting

var fmt = document.documentElement.clientWidth; var cls = (fmt<=240)?'pda_ver':(fmt>240&&fmt<=320)?'pda_hor':(fmt>320&&fmt<=640)?'screen_ultralow':(fmt>640&&fmt<=800)?'screen_low':(fmt>800&&fmt<=1024)?'screen_med':(fmt>1024&&fmt<=1280)?'screen_high':'screen_wide'; can someone tell me what this does (just the part where the vari...

It ok for AJAX to take place over non-SSL?

Say I have an https page can I make ajax calls to non SSL without getting warnings in browsers? I want to do it for non sensitive data so its faster ...

need small javascript for greasemonkey

HI, i need a greasemonkey code for a web page. The page has hidden input type and value. I need a gm script which can alert the value of the hidden input object as soon as the page loads. The input tag is present in a form with: form id="bloog" method="post" action= "/newpage.php" name="bloog"> The hidden content is present as: <in...

Can anybody tell me exactly what the Object doesn't support this property or method means in IE for JS?

Hey guys, while surfing through the web and through stackoverflow.com i found many posts in forums, etc. where this message occures in IE but not in the other browsers. the thing is, the resolutions vary widely and it's not clear for me what's the best way to avoid this problem. So my question is, if anybody knows exactly, specificly w...

Mustache.js render technique

Hello everyone, i am trying to use mustache.js to render some JSON in the browser. What i want to do is: <li> <span class="label">Location: </span> {{#locations}} {{.}}<span class="social-small-size "></span> {{/locations}} </li> The locations is a js array [["Pendéli, Attiki, Greece", "facebook"], ["Greece", "linkedin...

get values from table as key value pairs with jquery

I have a table: <table class="datatable" id="hosprates"> <caption> hospitalization rates test</caption> <thead> <tr> <th scope="col">Funding Source</th> <th scope="col">Alameda County</th> <th scope="col">California</th> </tr> </thead> <t...

Ajax Request using Rails and jQuery Problem

Hi, I have a favourite and un-favourite functionality in my application and I am using jQuery. This functionality works partially. The page gets loaded, and when I click the 'favourite' button(it is inside add_favourite_div element), it sends a XHR request and the post is set as favourite. Then a new div called "remove_favourite_div" rep...

How can i scroll to an anchor?

First of all, I have bound a datapager control to a listview. I would like to scroll to the first item of the listview control on the DataPager click. I guess by using javascript, but it seems that the datapager does not allow that... So what option do i have? How can i scroll, onto a specific anchor, when clicking on the DataPager? ...

get back to previous page...

hi, just i want to make back button in my site. once i click the button it need to take the url in to previous page. how can i make this using jquery? ...

I want to query whitepages.com 4,000 times, how to save the results?

I have an old customer list of 4,000 businesses. I want to determine if the phone numbers associated with each listing are still working (and therefore the business is probably still open). I can put each number in whitepages.com and check them one by one... but want to automate the results. I have looked at their API and can't digest i...