|
|
"{
"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.
|
|
|
|
|
Actually on a button click i am sending large json data to WCF Rest service method but it is not processing. it shows bad request from the browser itself and when i reduce the json size the data is posted to a WCF service.
|
|
|
|
|
There is a error code attached to the message?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I now consider that the way that 'undefined' is implemented in JavaScript represents a flaw in the language.
IMHO, everything (at least variables) in JavaScript are Objects, but I just realize that variables that are 'undefined', are not.
It is unfortunate that constant values are not objects. It would be a nice to have. For instance, it is possible to do:
var a=1; a.toString(); and not
1.toString(); .
With regards to undefined, it isn't possible to do neither
var a=undefined; a.toString(); nor
undefined.toString();
Hence it breaks several principles that Programming Languages should respect.
If 'undefined' were an object, it could act as a Null Object, and all variables would automatically have a
Null Object.
It would then suffice to do something like:
Object.prototype.isMyObject=false;
MyObject.prototype.isMyObject=true;
and then one could always write:
if(anyvar.isMyObject){ }
without falling in the undefined issue.
However, I do understand that today many developers may partly rely on 'undefined' resulting in an exception to detect flaws in their programs. Therefore a new option might be added to JavaScript, much like "strict" in order to indicate that 'undefined' should act as a Null Object. But that might not even be necessary, as the exception could simply be thrown only when trying to get a missing member of the object, as in:
undefined.missingVariable or
undefined.missingFunction() .
So in conclusion: having undefined variables behave as Objects would make the JavaScript language "more complete", and having constants (like the number 1) behave as Objects would take it even one step further.
If those impacting the definition of the language could consider that, I would be quite happy about it.
--
Mario DW
modified 1-Aug-15 8:23am.
|
|
|
|
|
First of all - numbers and strings are not object in JavaScript, but just like undefined are 'primitive types'...The difference is that for string and number there is a wrapping object but not for undefined...You are welcome to create one (and resolve your problem undefined not being an object)!!!
As for the 1.toString() part...It is not hing more than a parsing problem...In JavaScript there is only number, no int or float or other sub-types...
So 1.t is a syntax problem only - try 1.0.toString() and see how it works (so constant values are objects, when it suits the parser/compiler)...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|