How to align a pop up division to center of monitor/screen using javascript?
I tried using screen.width and screen.height to get center. But the division gets aligned to center of scrolling page vertically
Thanks in advance for any help and suggestions
...
Hi all
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions.
This I would like to automate. For instance if I have the function f
Array.prototype.f = fun...
I'm making something where a textarea gets more and more text appended. In firefox, the textarea scroll back up to the top each time.
I currently have something like textarea.scrollTop=1000000; to scroll it back down each time it changes, but it still goes up to the top for a very short time.
Is there any way to stop it doing so?
...
I have two images. I want to display one image if its day and another if it night. This should be done using javascript. For example display one image from 8:00 to 00:00 and another from 00:00 to 8:00. Is that possible using javascript?
...
I need the way to intercept all ajax requests maded from page. So i need some wrapper to add my data to all users requests.
...
I have a scenario, in which a .net application is hosted from SAP portal.
SAP portal domain: portalURL.al.xx.company.com
App server domain: AppURL.ss.xx.company.com
As you can notice the portal and the app server domains are not same 1 level up.(i.e. at 1 level up, portal domain will be al.xx.company.com & app server will be ss.xx.co...
I am refactoring some code. I have a PHP page that contains a MySQL query and stores the result in a PHP variable $my_result. This result is then echoed to a Flash SWF during embedding with SWFObject.
I now want to call this PHP page that makes the query from a javascript function like so - one change I have made to the PHP is that ins...
I am in need a link that will flash every 500 milleseconds, for a duration of 5 seconds...
I remember long ago having a link like this, but deleted it because one could only click it when it was visible. Is there a workaround for that?
...
Hi.
I'm using the Google Maps API v3 directions service to calculate a route between two points. There are a lot of markers on my map and I want the polyline of the route to overlap the markers, so that the route is always visble. How can I do that?
I tried to use PolylineOptions.zIndex, but this z-index value is calculated with regards...
I have a bunch of text on my document. You can select word/words from it and highlight the text. After you highlight it, an ajax request is sent and the selected word/words are sent to backend (PHP) and processed to be saved into the database. The page is refreshed and the selected text is permanently higlighted.
Now the bad part, if yo...
I have two questiosn.
1)
I have a list box which gets populated depending on what I select in my 1st drop down.
The data is retrieved using jQuery.get.
The code for generating the list looks like this:
(...)
foreach (DataRow row in dt.Rows)
{
strList.Append("<option value='" + row["id"] + "'>" + row["enhetsnavn"] + "</option>");
}...
How can i combine the CodeMirror editor [1] with the TextAreaResizer jQuery plugin ?
[1] http://marijn.haverbeke.nl/codemirror/
...
Hi,
I am using JqGrid with javascript.
I would set the height of each table row but I have not understand how to do.
This is my code:
function jobList(){
var json=doShowAll();
alert("jobList() ==> php/get_job_status.php?value="+json);
jQuery("#jobList").jqGrid({
url:'php/get_job_status.php?value='+json,
datatype: "xml",
col...
Hi All,
Consider the following snippet of code:
function parseXml(xml)
{
xmlObject= xml;
alert(xmlObject.xml);
}
function close(errroMsg)
{
//Displayed Error Message
}
$(document).ready(function()
{
$.ajax(
{
type: "POST",
url: "ServiceProvider.aspx",
...
i have next problem
$("#btnsave").click(function(){
$.post('svld.php',{'fnd':$('#fnd').attr("value")},function(data){
alert(data);
},'json');
}
slvd.php
header('Content-type: application/json');
var_dump(json_encode($_POST));
in request i see next
fnd http://ya.ru
and have great response
string(24) "{"fnd...
What is the best way to add JavaScript to my Rails3 views?
I would like to be able to do some processing in a controller, then craft some JavaScript based on the result and put the resulting JavaScript in a view.
For example, I would like to get a series of lat/lng points from a database and create markers on a Google Map. The map i...
Hi
I'm using the cycle plugin on some divs, like this:
<div class="sections">
<div class="Section"> <img /> text </div>
<div class="Section"> <img /> text </div>
<div class="Section"> <img /> text </div>
</div>
all the .section divs have variable height, based on their contents.
How can I make cycle not to resize the container ...
Hi,
I am using mozilla firefox and am trying to figure out a way to access the content of other tabs in the same window with the help of javascript and DOM (am open to other techniques if exist). Would someone help me?
E.g. I want to run a javascript in tab1 which can find the title of some other tab. Basically I need this so that I can...
How can I get the video's image to using with sendEvent(); in JW Player? For example i'm using
var playerx = document.getElementById(player);
playerx.sendEvent("LOAD","http://www.domain.com/videos/"+x);
playerx.sendEvent("PLAY","true");
for click event for starting the videos while clicking a video's thumb in a page. I want x's thumb ...
I have a script that makes me able to drag some content in a div.
But because you can drag around, no matter where you place the cursor in the div, I am not able to input some text in a text field.
Is it possible to allow that?
I can eaily click links in the div container. But not input text in a html input field.
This is the javas...