Hi all
I am reading in a complex chunk of HTML and I'd love to be able to walk this sub-tree of HTML in the same way I can the DOM.
Is there a way in Prototype to take a raw chunk of HTML (say from an AJAX call) and 'wrap it' in some way so that it becomes a Prototype element and thus allow me to search it using .up() .down() etc?
...
Can somebody provide a working example of JavaScriptResult in asp.net mvc. I understand that it returns javascript which is then executed on the client side and also that the content type of the response is set to text/javascript. I need some working example to see this thing in action.
...
Hello Experts!
I'm trying to set up a Google Maps on device and on top of it show some simple buttons. But events that I attach to those buttons seems to interferee somehow with map drag functionaliy. Basically drag completly doesnt work and also gives me this button not workin. I really dont care about this drag (I dont need it) - but ...
Hello guys,
I used localization helper from Matt Hawley. It's really working great. I have a problem though in getting the values on javascripts/jquery.
I can't retrieve the resources text using this:
example: alert('<%=Html.Resource(\"Strings,SomeKey\")%>');
Any help is greatly appreciated.
Best
...
Hello,
I want my web site to open login form in a modal div window (like thickbox works). So I see 2 questions here:
Client validation - should I send from javascript plain login & password in POST request to the server? Is it safe to do so?
Using of IFrame. Login link will be on every page in top right corner, so I'm just thinking ab...
Mobile Safari on the iPhone allows you to specify different keyboard types for text input boxes as demonstrated in the Safari How-To's for iPhone, here. However, I'm wondering if it's possible to change keyboard type displayed when a Javascript prompt() dialog is displayed.
I know I can roll my own modal pop-up if I have to, but I'd ...
That code work:
startSlideshow(<?php echo json_encode(glob("photos-animaux/*.jpg"))?>);
that code dont :
$.post("",{'folder':'animaux'});
startSlideshow(<?php echo json_encode(glob("photos-".$_GET["folder"]."/*.jpg"))?>);
WHY ?, what i am doing wrong ?, help !
why the stupid php fonction just dont make the string right !! ahhhh!
...
I need to store values that would look like this:
"somekey": "value1", "value2"
So I want to create a function that will take in "somekey", and it will return "value1", "value2".
It doesn't have to be a function, it could easily be a collection that I initialize in my javascript file and then reference like:
var v1 = blah("somekey")....
Is it possible to detect binary data in JavaScript?
I'd like to be able to detect binary data and convert it to hex for easier readability/debugging.
After more investigation I've realized that detecting binary data is not the right question, because binary data can contain regular characters, and non-printable characters.
Outis's q...
My strings will hold the values:
"["
"[/blah]"
do I need to escape anything?
Is it just doubling the /?
...
Hello,
Form is 'get' to a API which operates off of querystring.
One of the parameters is a PackageID which indicates a vacation package. In order for the packageID to appear I also need to append '#packages' to the end of the get request.
Since not all form 'get' have a package I need this to be dynamic. I've tried adding a hidden fi...
I'm having an impossibly hard time finding out to get the actual DOMElement from a jquery selector. Sample Code:
<input type="checkbox" id="bob" />
var checkbox = $("#bob").click(function() { //some code } )
and in another piece of code I'm trying to determine the checked value of the checkbox.
if ( checkbox.eq(0).SomeMethodToG...
How easy/hard is it to order collections in javascript (alphabetical and numerically).
Say I have a collection like:
var map = {
user: { id: "23434", username: "mrblah" },
user: { id: "1010", username: "johnskeet" }
};
And I want to order the collection by id and username.
Update
correction thanks:
var map = [ { id: "2343...
I have a link:
<a id="theLink" href="h***://stackoverflow.com">Go to SO</a>
How can I use prototype to either strip <a>'s or just leave the innerHTML so that the elements becomes:
[h***://stackoverflow.com] (something that is no longer clickable)?
Or maybe convert the <a> to a <span>
...
For some reason when I set window.location.href = it opens another window.
window.location.href = 'https://MyDomain.com/Checkout/Purchase.asp';
It doesn't happen in my development environment, only production. The only only thing different that I can think of is that we are switching from http to https. If this were a straight link ()...
I have a two domains, example1.com and example2.com
From example1.com, I would like call a JSON API I have on example2.com. Knowing that this is not allowed, it occurred to me - this is exactly why JSON**P** was created.
Question is, how do I modify my JSON API to make it JSONP capable?
Basically, how do I create the callback api?
UP...
hi guys,
I am calling javascript calendar to textbox like this
<asp:TextBox ID="txtStartDate" runat="server" onfocus="showCalendarControl(this);" ></asp:TextBox>
Problem is in textbox date is coming as mm/dd/yyyy.I want to see in textbox as dd/mm/yyyy.Can anybody help?
folowing is js code
function positionInfo(object) {
var ...
I have read w3's page on this here, but it is still vague to me. Is the role attribute's purpose to clarify the code? Or will it be interpreted by some browsers or spiders?
Can it be used as a dom selector using some javascript libraries (I am thinking that since the id attribute has to be unique, this could be use to identify multiple...
In safari 4 windows, it does not seem possible to stop some key events from bubbling up to the browser in javascript.
This guy got pounced on for trying to stop F5 (a dubious design goal), but the technical problem remains... how do you stop certain key events from bubbling up in Safari 4? For example,
You can stop:
CTRL+T
CTRL+N
...
Does anyone know of a way to make a Google Maps marker "bounce" using JQuery Bounce package?
...