|
I am going to implement this is javascript. We have data in csv format which will be read by the JS function and the start, stop and interval will be sent to third party library to create chart.
The algorithm I am looking for can be pseudo code. It's not specific to JS, but would be a big help to know if some one would have implemented this using JS.
|
|
|
|
|
Post it in the Algorithms section and explain the problem better too. I have no idea why your data results in the values you are expecting.
|
|
|
|
|
|
export html page with icons (font awesome) as image using javascript.
i have a map on that i render icons (font awesome), first i process map(SVG) but icons not render , by using html2canvas
|
|
|
|
|
|
"{
"odata.metadata": "https://XYZ",
"value": [],
"DateTime": "2015-08-31T14:44:04Z"
}"
Datetime i found in httpresponce.body but its not retreiving
How i can get DateTime value using javascript
Gopal Kanjolia
Cyber Infrastructure Pvt. Ltd.
|
|
|
|
|
pls i need help with my ticket reservation page.
am designing an online ticket reservation system using php.
i have done some little work. below are my codes.
<form action="boarding_point.php" method="POST">
<?php
$N = $colums+1;
for($i=1; $i < $N; $i++)
{
?>
<script type="text/javascript">
var seatno = "<?php echo $row[$i]?>";</script>
<?php
echo '<input type="submit" style="border:none; width:50px; height:50px; padding:2px; margin:2px; background:url(img/available_seat_img.gif) no-repeat scroll 0 0 transparent; hover:{background:yellow}; " value="'.$i.'" name="'.$i.'" onmouseover="tooltip.show(seatno);" onmouseout="tooltip.hide();"/>';
}
modified 22-Aug-15 15:05pm.
|
|
|
|
|
Better way to Detecting if a browser is in full screen mode by javascript .
|
|
|
|
|
|
He wants to detect, not use browser in fullscreen mode.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Yes - and the API says that document.fullscreenElement (or the prefixed version) should tell you which element is full screen, or if none are.
Or maybe what he was really asking about was a maximized browser window, which doesn't really mean anything from the browser's point of view.
|
|
|
|
|
Actually, the question of OP was of type "Not a question". He had thought of a feature but did not know whether to use it or not. Websites should consider working with the viewport, rather than taking control of the browser itself.
What he was thinking about was to get the state whether browser itself (not some element) is in full screen mode (maximized in application words) or not. HTML documents have control only to the viewport, or the DOM. He wanted to control the browser itself. Which is not possible until now, your API library was good and helpful in most cases. But the question itself was of no good reason.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
You cannot. Browser doesn't allow a website to manipulate or detect the states using JavaScript.
Only thing that you can do is to determine the size of window. For example,
var width = $(window).width();
var height = $(window).height();
But that doesn't work when the screen sizes are different, does it? So there is no chance that you can create such a functionality.
Maybe some day later.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hello
I have a page that displays search results. I'm looking for a way to have those search results printed. However, there are some items (ads, menus, etc) that should not be printed.
What I have so far is the results are sent to a new tab (using javascript) with the search results. All of the items that shouldn't be visible have been removed. However, only the text shows up. All the CSS styles and images aren't showing up.
Since the results are already being displayed, I'm trying to avoid having the server execute the search again.
Another thing to keep in mind, this is an SPA app (i.e. the URL never changes throughout the site).
My guess is since the html is getting sent to a new tab, the root URL is not set. So when it comes to a relative path for the images, css and script files, it doesn't know how to build the full path.
Does anyone know of a way to get this method to work? I know I can get this to work by having the server execute the search again, but I'm trying to see if there's a client side solution.
Thanks!
|
|
|
|
|
Look at CSS media queries. You should be able to serve the ads, etc, in something like
<div class = "noprint"> ... </div> and have
@media print {
.noprint {
display : none
}
} or something similar in your CSS, so when the browser renders for printing, it will hide the ads, etc. You might need some fancy footwork elsewhere in your CSS to make things look right both on screen and paper.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Hi all could anyone help me out I'm stuck on a question :
Write a function called validate that takes a single sting argument. The function should return true if and only if the string contains at least one dot (".") and exactly one "@" symbol.
E.g. validate ("j.nicholson@southampton.ac.uk")===true
Please could someone help i just can't get my head around it, thanks!
|
|
|
|
|
|
You are looking for a simple email validator e.g.
function validateEmail(email) {
var regEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (regEx.test(email)) {
return true;
} else {
return false;
}
}
|
|
|
|
|
function validate(str){
if(str.indexOf('.') != -1 && str.indexOf('@')== str.lastIndexOf('@')){
return true;
}else{
return false;
}
}
|
|
|
|
|
or
function validate(str)
{
return str.split('.').length > 1 && str.split('@').length == 2;
};
or
function validate(str)
{
return /\./.test(str) && /^[^@]*@[^@]*$/.test(str);
};
|
|
|
|
|
Difference between compile and link function in angularjs? 
|
|
|
|
|
|
Compiler is an angular service which traverses the DOM looking for attributes. The compilation process happens into two phases.
Compile: traverse the DOM and collect all of the directives. The result is a linking function.
Link: combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. Making the scope model a single source of truth.
Some directives such ng-repeat clone DOM elements once for each item in collection. Having a compile and link phase improves performance since the cloned template only needs to be compiled once, and then linked once for each clone instance.
|
|
|
|
|
i have a problem when i post large json data through ajax post method i am getting an error request entity is too large i include
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security> and also include WCF service web config but no improvement at all. i changed the configuration Editor setting IIS then also no improvement.can any one help me in this regard.
|
|
|
|
|
As you talking about WCF...
Look for maxReceivedMessageSize in your binding settings...Also check readerQuotas...
If it is not WCF and/or about SSL connection check uploadReadAheadSize...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|