is there any way to avoid firefox and ie to reload the page adding the hash-tag to the url.
due to that i refine results by time with adding &as_qdr=d to the end of url, i have a problem with theese hashtags.
It does not happen with Chrome, but Firefox reloads the page after query adding this nightmare hash d?=¿)a¿?)!!m!!"!"·n
I am t...
I am trying to make a bookmarklet that uses the user's current URL, kind of like the tinyURL bookmarklet that uses this javascript code
javascript:void(location.href='http://tinyurl.com/create.php?url='+location.href)
So I copied that same thing and made
javascript:void(location.href='http://mywebsite.com/create.php?url='+location.hr...
Hi I found how to get client ip by answer here:
http://stackoverflow.com/questions/102605/can-i-lookup-the-ip-address-of-a-hostname-from-javascript
But I don't understand how to use it.
This is what I have:
var user;
if ($('#user-id').length) {
user = $('#user-id').text();
} else {
http://jsonip.appspot.com/?callback=getip
...
I'm trying to load up XML/SWF Charts with Yii and having some troubles. As far as I can tell, the trouble seems to be the order that Yii is loading the script tags in the header.
This is what the resulting source looks like from the header generated by my working test.php script (minus Yii).
<HTML>
<script language="javascript">
/*<...
We would like to implement slightly different behavior in our web application for those who visit from a certain state (Florida) vs. those in the rest of country (and world).
It's not critical that it be 100% accurate but well into the 90s-- it's OK if a few Floridians see the other version, and others see the Florida version.
What is...
OK, so I'm working on this unique background project here, and I have a problem:
I'm trying to hide certain parts of my background on page load, which works great.
However, my other lines of code I provide below try to make some of them reappear when the link has a certain class, however, even though I know that the link has that class...
i am using titanium to build iphone apps
i am trying to build an app to send an sms through Online SMS Gateway. i want to let the user choose the numbers from contacts and insert the number in textarea or something like that. any idea how to do that ??? something like that
http://i.imgur.com/aWeK7.jpg
...
Hi! I have one page filled with images (image1, image2, image3). What I would like to happen is:
While a right-click is active on image1... image2 and image2 are disabled to receive any left-clicks or right-clicks until I end the right-click on image1. Does anyone know how to achieve this in javascript? Thank you!
...
I am wondering what if one script tag has both "src" and inline script. I tried below code.
<script src="http://yui.yahooapis.com/2.8.1/build/yahoo/yahoo-min.js" type="text/javascript" charset="utf-8">
alert('hello');
</script>
<script type="text/javascript" charset="utf-8">
alert(YAHOO);
</script>
It the "alert('hel...
Hi,
I am using YahooPipes code to parse a cross domain picasa feed in its minimal form. I would like to know how to read the media:group - media:thumbnail tag in the xml retrieved at Runtime.
for (var i=0; i<feed.value.items.length; i++){tmp+='<a href="'+feed.value.items[i].link+'">';tmp+=feed.value.items[i].title+'</a><br>';if (feed.v...
hi,
to call a function at the same time it's defined, i had been using:
var newfunc = function() {
alert('hi');
};
newfunc();
is the following the correct way of combining these 2:
var newfunc = function() {
alert('hi');
}();
...
Here is the scenario
In MVC, it is easy to return a Javascript to be executed on the client
public ActionResult DoSomething()
{
return JavaScript("alert('Hello world!');");
}
On the client, I have a Javascript that takes a JSon object as parameter
Something similar to this :
function open(options) {...}
I ...
I've been having the most AWFUL time integrating MailChimp into a site I'm designing!
The problem is that validation is not working for the embedded subscribe form. Instead of inlining error messages, the form is kicking the user over to the MailChimp signup page to correct errors or confirm list opt in.
I've done a heavy amount of cu...
I'm currently developing a Safari extension that uses an injected script to further inject some HTML into the current webpage, as well as injecting some other scripts to make it work. This is all working fine, but the issue is that the HTML that is injected gets affected by CSS stylesheets that the webpage has already imported. For examp...
Hi everybody,
as usual i come here after testing around for hours and not having any clue what i am doing wrong ;-) I am not an javascript expert so i suppose this will cause some rolling eyes ;-) Sorry about that. I am now at a point where i tried to code somehting in a more readable way. Seperating functions in classes etc... What i wa...
I'm not so good at javascript and it's replace, so I'm wondering if you can optimize this line (etc one .replace instead of two):
$itemClicked.replace(/ä|å/g, 'a').replace(/ö/g, 'o');
...
Possible Duplicates:
Changing a CSS rule-set from Javascript
How do you add CSS with Javascript?
.message{
display:inline;
}
How can I set all tags with the class message to display:inline? without using jQuery
...
Hi guys I have a function which accepts this as a parameter - 'this' referring to the dom element which upon clicked should run a function. The thing is that I want this function to be called after a small delay however passing the variable term this doesn't work as when the function is executed 'this' then doesn't refer to the object in...
I have a series of horizontal div boxes that I need to add the relevant href to link to the next one with anchorlinks. As they are produced dynamically I need to add the href with JavaScript.
The desired effect will be:
<div id="post1">
<a class="next-video" href="#post2">NextVideo</a>
</div>
<div id="post2">
<a class="next-video" hre...
Long story short: on Chrome and Safari only, values from a login form are sometimes pasted into the user's URL, even though the actual login is POSTed via AJAX.
http://my-site.example/?name=user&pw=xxx&challenge=b1be8ad7aac242...
It's been reported repeatedly and I've seen it happen myself, but have been unable to reproduce it...