are there any callbacks for me to hook into in order to send the "focus ();" back to my input box when someone selects or clicks and autocomplete item?
But /*THIS*/ and /*THAT*/ never happen. Is there a way of doing a callback, so that when the background image has changed, do the below functions. Then end with changing it to nothing again?
I have a validation function and the this is the last thing it does.
[code = var mytext=document.getElementById("sizip") if(check5(mytext,"Zip Code must be 5 digits.")==false) {mytext.focus();return false;} function check5(mytext,alerttxt){
[Code]....
It will validate ok, if I do not have 5 digits, I get an error box.
But then if I click the accept button again, it puts focus back on my zip code with no error.
I have an Iframe in my webpage wher I have the focus. I now want to give the focus back to the parent document, so i've used top.focus() in my code. Works fine in almost every browser but not inIE7.
I want users to work from a main application. Certain things will need to be done but the users wont want to see the main screen go away while doing these certain things. So my idea is to just open a new window with the content they need, they'll make their changes, the new window will close but then I want the main page to reload.What I've done now is at the end of the script that will be run prior to the new window closing is added this (its a php app):
There are 3 graphics (top left of page) which open a linked page in a pop up window; each popup comes into focus the first time it's opened - clicking on the same graphics again doesn't bring the already opened popups back into focus.I had originally sized each popup as 320x430px in the body at each of the 3 references to the linked pages, but discovered that (in FF portable 3.65.13) the popups all opened full-size windows. In an attempt to resolve this I removed the size info from each of these 3 page references (lines 84, 89, 94) and moved it to the head (line 67) which seems to have resolved the size issue, but works only when I specify the popup to be any size except the original size of 320x430 (e.g. 320x431; I have now settled for 321x431)
This is a really basic question: what does blur mean, or what does it do when used in links as described below? I've tested it on Firefox 3.6 and Opera 11 and it behaves as I hope except for one thing. During testing if I use both keyboard and mouse to navigate within the same session, the browser history for the 'other' method is wiped out; it won't go backwards beyond the most recently used method. Is this not a surprise when you know what blur really means? I want the following (assuming Javascript is enabled):
a) Keyboard users to see a focus outline on navigation links. b) Keyboard users to see the outline still there if they use the browser Back button, and continue tabbing from that link onwards. c) Mouse users to NOT see an outline if they use the browser Back button.
and the logo was gone. Not exactly sure at what point it disappeared yesterday as I didn't notice it missing until this morning. The navigation is about the only point of difference so I think this is the issue but have no idea why.
I ammodifying an gallery script calledslideSwitch. I want to set the interval value by a variable. For example, If I click button 1 the interval value is 5000 and If I click button 2 - the interval value is 2000 etc. Do I need to pass the value somehow? I might be totally off track here.
I have a list that is constantly being updated via ajax, but I want the updating to stop when the cursor is over the list, making it easier for the user to select an item in the list.I have this:
<script type="text/javascript"> var initList = setInterval(function(){ $.post('system/list.php', function(list){
[code]....
The first interval lets the list update when the page loads, instead of having to wait for the user to mouseout on the list to start the updating.The above does not work for me, the list updatescontinuallyregardless of mouseout.
My issue is this... I have a set interval that runs a php script and then .load()'s it into a div. Now... I have another jquery script that submits a form when a checkbox is checked...
After the timer goes off and fetches the data and brings it back, the script that submits the form no longer works .
Code:
var refreshId = setInterval(function() { $('#loader').load('php/table.php').fadeIn("slow"); }, 10000);
I am trying to recreate this functionality on my website where you can drag a background image around and when you get ot the edges of the image it bounces back to the edge of that corrosponding side. have a look at the site in question - [url]
So far i have recreated the top left and right edges using
The default behaviour of focus() method is displaying the cursor at start of the char(In FF focusOffset is 0(zero) and anchorOffset is 0(zero)). I need to display the focus at end of char after calling focus() method.
I am on WinXP. The following page works perfectly in IE6. For Netscape 7.0, I have to move off of the image and then back on to get the fade to take effect, and with Mozilla (latest version) a series of close mouseovers will cause the screen to go wacko.
Does anyone have input on how to get Netscape/Mozilla to work with a fade like this?
I am looking for a function that will add spaces in a string in a certain manner:
tmpStr: 123456789123 (always 12 digits) the desired outcome is: 123 456 78 91 23
Do anyone of you have a neat fuction for that? I found one question in this forum [URL]... but since I do have a different interval for my spaces I have not been able to make it work.
In my js application, consecutive ajax calls are made while running in a for loop. I am using prototype.js for AJAX calls. now if I don't call any function on onComplete event then everything is ok. but if I do so, then the function I have set in an onComplete event is invoked once or twice. rest of the time it doesn't work. the code is like the follwing:
/** * Moves selected options from source to destination select list. * @param source select list, destination select list * @return none */ function moveMultipleOption(sourceListId, destListId)// single or multiple based on selection {
var sourceListBox = document.getElementById(sourceListId); var destListBox = document.getElementById(destListId);
for(i = sourceListBox.options.length-1; i>=0; i--) { //for() loop is used for finding how many options are selected. if(sourceListBox.options[i].selected) {
} /** * Calls to server through Ajax * @param option value, option text, source table name and destination table name. * @return none */ function AjaxRequest(i,textValue,sourceTableName,destTableName) { var url = '/run.php/SelectList' var pars = 'cmd=singleTransfer' + '&itemValue=' + i + '&textValue=' + textValue + '&sourceTableName=' + sourceTableName + '&destTableName=' + destTableName;
var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, onComplete: showResponse } ); }
function showResponse(originalRequest) { // CODE IN THIS FUNCTION DOES NOT ALWAYS EXECUTE. }
Now i have solved the problem for the time being by making a single call to ajax for the whole loop. Now my question is : what is causing this problem? Can I give time delays between two consecutive requests?
I'm trying to create an object that will update itself at a set interval, but I'm having a scope issue when using the "setInterval" or "setTimeout" function.
[Code]...
But I get the same result. Ultimately, I'd rather have the setTimeout (or setInterval) to be within the object, so that each instance of the object will fire the update on itself. I had a similar issue in this thread but I can't seem to figure out how to adapt it for this instance.
I have a script that runs when the page is loaded, but I'd like it stop running after a specific time interval.
I think I need to use this:
var t=setTimeout("javascript statement",milliseconds);
I understand the milliseconds, that's the time delay. What I don't get is what do I put inside the "javascript statement" to kill that specific script?[code]...
So I am working on this cool video player; URL...And I was wondering if anyone has ever paused a vimeo video with javascript or jQuery. The problem at the moment is that if a video is playing and then another video is clicked, even though the first video slides up, it doesn't stop playing.[code]
I'm trying to use the jQuery cycle plugin to cycle round different quotes. I would like to have the quotes displayed for different amount of time depending on the length of the quote. To achieve this I get the content mangagement system to output the amount of seconds as a class name such as dur13 would be for 13 seconds.
This is my non-working attempt:
$('.featureFade').cycle({cycleTimeout: 10, after: onCycleAfter}); function onCycleAfter() { $('.featureFade').cycle('pause'); var duration = $(this).attr('class').substring($(this).attr('class').indexOf('dur')+3)