if (pathname == "/" || pathname == "/default.asp")
in js using jquery library.
I want this to catch "Default.asp" as well as "DeFaULT.asp" and "default.asp"
halp.
I have a JSON feed (which I don't directly control, I have to ask the server admins to update it), that is returning NULL, or otherwise not working when I try to access it from another server. The actual feed works fine, but I can't get it to work like a normal API.
Why can I use Flickr, WhitePages, Twitter, etc's JSON APIs, but for:
http://portlandoregon.gov/shared/cfm/json.cfm
It returns NULL in the browser when using JS. If I call it on the same server, it's fine though.
If this is a server issue, what do I ask the admins to change, and if this is a local (browser) based issue, what am I doing wrong for this one feed that works for every other JSON API?
Friends, I am willing to follow the rules of the W3C where it is recommended that javascript and CSS files should be in individual files and not within the page.
Good, following this rule, and not wanting to overload the master page, I would like to embed the dependencies dynamically. So how could I insert the libraries dynamically? I think the bigger problem is the Ajax requests.
Example:
<script type="text/javascript" src="http://sstatic.net/so/js/master.js?v=6523"></script>
I tried using the JavascriptResult, but he writes the content on the page, and do not run as "Stream."
Any help is welcome. Thanks
Is there a set of best-practices or advice to avoid pop up windows being blocked by the different browsers pop-up blockers?
By pop-up I mean windows created by either window.open or window.showModalDialog methods.
Thanks a lot
I have a simple HTML (as HTA) application that shows strange behavior on Windows XP x64 machine. I getting periodically (not every time) error message "Access is denied." when i start the application. The same application on Windows XP 32bit runs just fine...
Does somebody has any idea or explanation?
Error message:
Line: 18
Char: 6
Error: Access is denied.
Code: 0
URL: file:///D:/test_j.hta
Here is the code of my "test_j.hta":
<html>
<head>
<title>Test J</title>
<HTA:APPLICATION
ID="objTestJ"
APPLICATIONNAME="TestJ"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>
<script language="JScript">
function main()
{
//window.alert("test");
window.resizeTo(500, 300);
}
function OnExit()
{
window.close();
}
</script>
</head>
<body onload="main()">
<input type="button" value="Exit" name="Exit" onClick="OnExit()" title="Exit">
</body>
</html>
i have the following script
<input style="color: #ccc" type="text" value="something" name="country"
onFocus="if (this.value == 'something') {
this.value='';this.style.color='black';}"
onblur="if (this.value != 'something') {
this.value='something'}" />
<input type="submit" value="save" />
it works fine, but when i click on submit button, it also deletes the value "something"
so, what can i do, if i want, that when i click on submit button, value doesn't delete?
thanks
In an Adobe Air AJAX application with multiple windows running on a system with multiple (three or more) monitors, can you maximize the windows in each monitor? I've seen posts by others trying to do this, but I've not seen anyone saying how it worked out.
I basically need to build a 'status monitor' system (similar to, say, an airport departures monitor) in which there are public-facing displays that need to look and feel like single-purpose, embedded applications -- no window chrome and no visible desktop. I don't think this should be any different from any other windows application, but I don't know about Air. I have a dual-monitor Mac setup right now, but I can't easily test Windows and I likely will never be able to test three monitors at once.
This application will be run as an AJAX Air application written in Aptana (or DW if it makes a difference).
How do I get the value from a key pair value into the rel property of an anchor tag?
When I split the code to put the value in the correct place it doesn't work, the end of the a tag would appear on screen instead value wouldn't be applied. When I look at the resulting code in console in Firebug the rel and href swapped order so the rel is first.
The 'key' should be and is in the correct location but the 'value' needs to be applied to the rel attribute.
What am I doing wrong?
$(function() {
var obj = {"firstThing":"4","secondThing":"6","aThirdThing":"2","anotherThing":"3","followedByAnother":"4"};
$.each(obj, function(key,value) {
$('#newmine').append("<li class='tagBlocks'>","<a href='#' rel=''>",value," ",key);
});
});
Hello! First and foremost thank you for checking out my problem, and for any help you may give!
Okay, so like the title says I'm in need of calling a php function from my index page, which adds a new record in my database as a vote, using JQuery Ajax. This function will return one integer, which will then be printed inside the form button in which it was called from.
Anyone have an idea on how I would accomplish this? Any guidance is appreciated!
Hello all,
I'm trying to get the text contents of a .div('.child#') child of my event.target('h6.class'), and replace my other headers('h1.replacHeader#') using this script below...
$('h6.class').click(function(event) {
var $target = $(event.target);
$('.replaceHeader1').replaceWith("<h1 class='replaceHeader1'>" + $target.children(".child1").text() + "</h1>");
$('.replaceHeader2').replaceWith("<h1 class='replaceHeader2'>" + $target.children(".child2").text() + "</h1>");
});
});
I've noticed that .text() apparently doesn't apply to an event.target... So how could I go about achieving this?
Here's my issue : using an autocomplete jQuery plugin, I'd like to avoid multiple ajax requests when user strikes his keynoard by surrounding the
$('#query1').autocomplete({
serviceUrl:'/actions/autocomplete?population=salon',
minChars:3,
maxHeight:300,
width:200,
clearCache:true,
onSelect: function(suggestions,data){ $(".btn1").attr("href", "${pageContext.request.contextPath}/actions/espaceClients?participantId=" + data) }
});
with something like
var search = false;
$('#query1, #query2, #query3').keyup(function(){
if (!search){
search = true;
}
if (search) {
search = false;
autocompleteThem();
}
});
A you can see, above code is stupid, but it kinda shows what i'm trying to do.
In simple words, if user dosen't type anything else in a certain period of time, then you can call autocomplete.
I hope i'm being clear, as my brains are a mess...
I was asked to implement a menu bar that is neither horizontal nor vertical. Here are two example buttons:
This is something new to me, so to learn how to make this work I'm looking for a site (or better yet, a tutorial) that uses a similar menu bar. Any ideas?
I'm using an auto-complete widget from YUI to implement live search as in the examples. However, it works fine when search text is typed in, but fails to work when the text is pasted into the field. Which would be the proper way to initiate an autocompletion on paste? Haven't found anything for that in the documentation...
EDIT: Pasting is not Ctrl-V, it's usually "Paste" from the context-menu. YUI does react to a keypress, but doesn't if anything is pasted by the mouse.
Hello,
In a custom ASP.NET AJAX control, i have this to do some repositioning.
var dims = Sys.UI.DomElement.getBounds(control);
this.get_element().style.position = "absolute";
//Sys.UI.DomElement.setLocation(this.get_element(), dims.x, (dims.y + dims.height));
this.get_element().style.left = dims.x;
this.get_element().style.top = (dims.y + dims.height);
getBounds simply returns the x/y and width/height. I use this to set the left/top, but in IE, it's doubling; say the coordinates are 500, 20; when it sets this on the element, its actually setting to 1000, 40. Any ideas why? In firefox, this works correctly.
this.get_element() returns the correct element and all, but it's not setting correctly, even though event logging says it's the correct coordinates. When using setLocation too, it doesn't work in either...
What else in my code may be affecting it? JQuery isn't an option here too.
Thanks.
Hi,
I have a swf file with a semi-transparent + tint effect and a HTMl element
<span id='mybutton'>My Button</span>
I want to place the swf over the span, so that i can see div/span/a the content through swf.
How can i achieve this?
I try all methods but in my google map on the marker doesn't work events, I try enable events and write (clickable: true), but it did not help, in test server working good, but on phpfox marker not clickable, help me please correct it
go to it http://iguansystems.com/phpfoxdev/index.php?do=/pages/24/quickstart/step2/ link
login - [email protected], and pass- tryuser
in center frontend right at "Primary Venue" have "Can't find venue? Add New" click on "Add New" and window with a map open
I have a web page containing something like this:
<div onclick="location.href = 'AnotherPage';">
This page also uses asynchronous XMLHttpRequests for some ajax updating.
I have found that while an asynchronous XMLHttpRequest is in progress, clicking on this div does not load the new page. If I cancel my request first then it works fine. This seems wrong, but I cannot find any documentation that describes what should happen.
So the question is: what should happen to asynchronous XMLHttpRequests in progress when a new page is loaded using location.href?
hi,
I'm attempting to add two charts to a gwt page using the visualization api, but for some strange and inexplicable reason, eclipse claims that the following two imports are colliding - which makes no sense to me.
In the methods where i am calling them, I have even tried using the fully qualified names, but that doesnt seem to help either. Any idea what may be going on ?
import com.google.gwt.visualization.client.visualizations.Table.Options;
import com.google.gwt.visualization.client.visualizations.LineChart.Options;
I am working with jQuery Pagination, and a popup form. On saving the data in the form, how would I go about forcing the Pagination plugin to reload the data it would load for whatever page I am on, without reloading the entire webpage?
Ex:
Item 1
Item 2
Item 3
Add Item-Item 23-Save-Reload List
Item 1
Item 2
Item 3
Item 23
http://d-scribe.de/webtools/jquery-pagination/lib/jquery_pagination/README
Is there a way to use getElementsByName without starting from the DOM root.
For example I have a div element, and want to start searching from that element.
If not, then do I have to write my own function that recursively iterates through the child nodes, or is there a different way to do it.
A while ago I came across a jQuery plugin that produced the alert/message boxes like those seen on Twitter (when saving settings) and StackOverflow. Can somebody point me to them online? I'm having trouble getting relevant search results...
Thanks
I have a gridview and for client side sorting i am using the Jquery tablesorter plugin. Now i want the header and footer of the grid to be fixed and the rows to be scrolled.
Can anybody help me out?
Thanks in advance...
$("li").hoverIntent({
sensitivity: 3,
interval: 200,
over: addOver,
timeout: 500,
out: removeOver
});
function addOver(){ $(this).addClass('over').children('a:first').addClass('active');}
function removeOver(){ $(this).removeClass('over').children('a:first').removeClass('active');}
alert ('version 2 menu');
});
On mouseout I want to remove class of " li a" if it already dont have class.
I want to remove the class of the children.