I want to know what is necessary to create a PHP script that can interact with a website like a normal browser. The website would be rich in Ajax, so the PHP script needs to know how to handle Javascript functions and maintain an continuous connection with the website.
...
How to calculate shopping days till christmas counter in jQuery. need to add to website.
need quick and dirty. no partiaulcar date it needs to correspond to
needs to ignore weekends of course - or maybe not since its for a website. hmm
cant believe there isnt one on here already.
happy holidays everyone!
...
I'm playing with Stripes and I wonder if it is possible to send Javascript generated data to ActionBean. To be more specific, when I click with my mouse on certain element on page, I want to send ID of that element back to ActionBean after clicking on stripes:link. Providing I already have that ID saved in a JS variable id, how do I do t...
Function.prototype.bind = function(){
var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift();
return function(){
return fn.apply(object,
**args.concat(Array.prototype.slice.call(arguments))**);
};
};
This function is in Prototype. Does it equal to:
Function.prototype.bind = function()...
I guess this question isn't only specific to YUI, but that's the JS library I'm using and a specific answer would be helpful.
Basically when loading a page, I want a script to run a few XHRs using Y.io, and if they all return the data successfully then I want the script to move on to the next step, which will manipulate the data receive...
I'm a Django newbie, and learning quickly. But I just can't figure out how to get this simple Google Maps user interface to pass the resulting lat/lon into my database. Can anyone help?
...
Just using php, is it possible to
create a button via html that reacts to the user's input, for example, if the user clicks the button 4 times, something is suppose to happen, or do I need javascript.
Likewise if the user clicks the button twice or three times something different is suppose to happen, is this possible, if so, what do I...
When we change the name="quantity" and the $product['price'] value will changing too. Here will have dynamic quantity and price. How to do that using jquery/javascript.
<?php
$select = "SELECT * FROM `products` ORDER BY `id` DESC LIMIT 10";
$query = mysql_query($select) or die(mysql_error());
?>
<ul>
<?php while($product = mysql_...
I am trying to send a Dictonary key (which is a string) to a Javascript function.
<%
foreach (var field in Model.Fields)
{ %>
<tr><td>
<a href="#" onclick="javascript:EditField(<%= field.Key %>)">
<%= Html.Encode(field.Value.Name) %></a>
</td><tr>
<% } %>
But, on the Javascript function, I get it as an ...
I want to write a web application that allows users to enter any HTML that can occur inside a <div> element. This HTML will then end up being displayed to other users, so I want to make sure that the site doesn't open people up to XSS attacks.
Is there a nice library in Python that will clean out all the event handler attributes, <scri...
Hello,
What is better from performance wise document.getElementById('elementId') or $('#elementId') ?
How can I calculate the speed by myself?
Thank you and Kind Regards.
...
We have a website that needs to perform certain actions when a pop-up is being closed.
Note: Not a session end but just a popup being closed.
The solution we found so far, is catching the onunload of the page and then popup a page to perform the actions. When the new popup ends -> it hides itself and everybody's happy.
The problem hap...
isnt javascript enabled in all webbrowsers by default?
if yes, does this mean that i can use ajax/javascript in my webpages without bearing in mind that maybe some browsers wont be able to use my website?
i dont want to create another version of the page to display non javascript content.
what do you think?
EDIT: it doesnt seem that ...
In the new sifr 3, the author has implemented the ability to combine the css files into 1 file. There are 4 .js files total and I was wondering if there were any ideas how to combine these files for a faster loading time on the client side and also I was wondering if there was any way to just include the sIFR css styles in an already exi...
this is a little bit tricky.
usually when someone clicks on a link that requires him to register, this person will be redirected to the registration page and then back to the last visited page. this is possible cause the link sent a GET key through the url to the registration.php which uses the key to go back to last visited page.
but ...
Hello,
In my code i need to poll a url after every 5 seconds using ajax . The URL returns a json response. Below is the code that i wrote inside $(document).ready to do this. But,the setTimeout() function does not work. The startPoll() function is called immediately after the response is received.I want to halt for 5 seconds after respo...
How do I set the top, left, width and height of a <div>? I already made sure it floats by inserting the following CSS code:
div.grid_tooltip {
position: absolute;
left: 0px;
top: 0px;
}
...
hi,
i wrote a little jQuery button plugin - it contains a method for applying the onclick-function - here's the code
(function ($) {
$.fn.tButton = function ()
{
this.setFN = function(fn)
{
alert("function set.");
}
};
})(jQuery);
i'm using this code to initialize it (on a div):
var button = $("#myButton")....
Hello,
I may have URLs like:
http://193.198.112.125/foo/bar/
http://www.site.com/foo/bar/
http://193.198.112.125:4000/foo/bar/
and what I would like to do is to remove part before /foo/bar/, with regex which will work if I have IP/something, IP:PORT/something or DOMAIN/something
Tnx!
...
I want to know how can I use $(document).ready or something like that in FBJS for Facebook applications. I tried $(document).ready but it ain't working. Also I couldn't find any associated document...
...