Possible Duplicate:
Data transfer from JavaScript to PHP.
How can i get the browser's height and width to php? Like a data transfer from javascript to php? With using innerHeight and InnerWidth, i think.
(I just need to show user small picture if he has small screensize and big if big and without a data about screensize i can...
In my web projects (Django framework) I typically have a few internally developed javascript files that are shared among them. These web projects are stored in seperate mercurial source code repositories. Here's the relevant directory structure:
+ static
--+ css
--+ images
--+ js
-----+ thirdparty
-----+ mycompany
--------+ shared_lib...
I'm trying to set up swipe events for a site I'm working on. Basically, when someone swipes the content container, child div elements of that will change content depending on the page one is on. The actual div "contentwrapper" that I am attaching the swipe listeners to does not change.
To do some animations, I have a previous and next ...
Hi
I am trying to figure out all the ways javascript can be written. I am making a white list of acceptable tags however the attributes are getting me.
In my rich html editor I allow stuff like links.
<a href="">Hi </a>
Now I am using html agility pack to get rid of attributes I won't support and html tags for that matter.
However ...
I get an asyc response from the server that contains an HTML that I would like to display:
$( document ).ready( function ()
{
var options =
{
success: showResponse,
error: errorHandler,
type: 'post'
};
// bind to the form's submit event
$('#captureForm').submit(funct...
Looking back at an internal system I just built, the common server / page model with minor use of Ajax for some UI components. I'm not sure if I'm satisfy with the end result because it seems like we spent too much time on the frontend. Not a big fan of going through all the trouble for styling and making sure the CSS works right.
So ...
I am trying to have a confirm box come up when the viewer tries to close the window, that allows the user to stay on the current page (by click Cancel), or continue closing the window (by click OK).
My code is as follows...
<script>
function confirm_exit(){
var message = window.confirm("My message.");
if (messa...
Hi,
From this questions : http://stackoverflow.com/questions/3073176/javascript-regex-only-letters-allowed
How can I make that expression test for people's name? Currently it doesn't allow spaces between names at all. I need to be able to match something like John Doe
Cheers
...
I have two links that should open up thickbox's in iframes but only one works (the one with the id of product_photo_zoom_url2). I have the following jquery code that works when this code (in first code box) s removed from the markup. This code loads a picture zoom function. See complete markup below. All that happens when the first zoom ...
i have some javascript code that is supposed to run on document.ready but i keep getting an error in firebug saying the onLoad() method can't be found.
here is the code (which clearly shows that method there):
<script type="text/javascript">
var tl;
function onLoad1() {
debugger;
var eventSource = new Timelin...
I've created a <canvas>, in the variable canvas, but I can't seem to draw to it. I can see the blank canvas on the page, but it's blank.
alert(ctx);
ctx.fillStyle = "rgb(50,50,50)";
ctx.fillRect(10,10, 55,50);
alert("done");
The first alert says [object CanvasRenderingContext2D], and I do see the "done" alert, but the canvas is still ...
Hi Folks
I have a search input box that appears upon rollover of a button. Rather than having its own close button I would like to be able to click anywhere on the page to re-hide the Search.
If I attach a click handler to the document this works fine but the problem being is that the search itself is part oofthe document. So if you c...
Hi,
I am embedding some javascript in a Java application using Rhino. I am following the example on the Rhino website, executing a script by calling the Context's evaluateString method and passing the actual script in as a String.
I have a whole bunch of existing javascript code that I would like to make use of. I don't want to concaten...
Is there a way to escape a loop like the one below without closing the browser by terminating it process?
WARNING: Don't run the code below. Running this code will throw your browser in an infinite loop of alerts.
<html><body onload="while(true)alert('Hello')"></body></html>
...
I'm trying to make a box rotate through javascript/css3 rotate every time I click on it. It works, but only the first time I click on it. Each time after, I get the alert which means it's not a javascript error - but no animation.
Here is my simple page -
<script>
function rotate( box )
{
alert('start');
box.style.webkitTra...
Hey guys!
I'm a basic web developer. I know PHP, a little bit of Python and Ruby. JavaScript as well [some stuff]. I'm not a hardcore developer. I know what it takes do develop most of web cases.
Now, I have this desire to go deeper and start developing games. I know it sounds a huge leap, but that is why I'm asking here. I already hav...
I'm building a website with ASP.NET MVC where one feature displays some points on a Google map, using the Google Maps Javascript API. As I have a lot of points, I don't want to fetch them all; rather, I want to get only the ones that are in the current view area that the user is looking at on the map (the bounding box).
To do that, I wi...
hi everybody!
Today i'm very stack with a Work and jQ. I was get a morning for it but i can't resolve it :(.
My Work here:
<div class="container">
<p class="test">a</p>
<div>
<p class="test">a</p>
</div>
</div>
In normal, i can using jQ with each function for select all <p class="test">a</p> EX:
$(".test").each(...
I have a script that will be loaded on a bunch of sites I don't control.
My script needs to open up an iframe. The script and the iframe will be hosted on the same domain (which I control), but the parent pages won't be under my control.
When the work in the iframe is done, I need to somehow tell my script in the parent page taht th...
I'd like to parse the following string which is a time (HH:MM:SS): 00:00:00
Does anyone know how I can get the Hour, Minute, or Seconds values?
Thank you!
...