|
You haven't specified what the problem is. Are you getting an error? Are you getting unexpected results? Can you provide more details to give us a clue as to why you have posted your question.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
SolidSnake7 wrote: (what is wrong?) Only you can tell us. We cannot run your code so you need to do very basic debugging and find out what IS happening. Then you can explain to us so we can help you.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have created HTML tables as below by hard coded the values:
Name weekhandledticket monthlyhandledticket dailyhandledticket credits
xyz 1 2 1 1
My requirement is I want to achieve this dashboard directly on browser without hard coding the values.it should directly taken from external file like javascript .is it possible to attain this requirement using JavaScript itself? Please give me some idea to drive this requirement?
TO BE MORE PRECISE "TO create a dashboard using HTML table and display the data on runtime with help of javascript ?"
|
|
|
|
|
Erm, yes, that's entirely possible and even normal.
It sounds like you need to learn some JS and I would suggest by starting with jQuery. Have a look at jQuery Learning Center[^] to get started.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
You can learn how to use javaScript (and the DOM access it gives you) here: JavaScript Tutorial[^]
But the best way to generate pages is server-side, for which PHP is a great language: PHP 5 Tutorial[^]
You can make changes to an existing page with either javaScript (via DOM) or php (via AJAX), depending upon where the 'new' data is stored.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Its really easy, You need to study more jquery, Tables , Ajax .
1. put an ajax call and get your data in jquery.
2. Bind your data to the html table format.
Here you done
|
|
|
|
|
1. Try to learn Jquery , HTML Tables and Ajax
2. Put and ajax call and bind the response in html tables to show
|
|
|
|
|
I have two separate HTML files (index.html and home.html) and a javascript (bodyswapscript.js) file. I'm trying to figure out how to swap in (only the body) of home.html into the body of the index.html by using java script. Basically swapping 'body' elements between HTML files.
I have posted my html code and java script below. The html is quick and dirty, so I'm only interested in swapping out the body information of index.html with home.html. I also would like to keep the unordered/list items as my header and be able to use the browser back button to go back to previous pages.
1.) index.html
<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 14 February 2006), see www.w3.org">
<meta charset="utf-8">
<title> My Profile</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<header>
<hgroup>
<center><h1>Index</h1>
<h4>index page</h4></center>
</hgroup>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="bodyswapscript.js"></script>
<nav>
<div id="wrapper">
<div id="header">
<ul>
<li><a id="homeContainer" href="home.html">Home</a></li>
<!--
</ul>
</div>
</div>
</nav>
</header>
<body>
<article>
<div id='swapcontent'>
index page
</div>
</article>
</body>
<footer>
<p>© copy right, all rights reserved.</p>
</footer>
2.) home.html
<header>
<hgroup>
<center><h1>home.html</h1>
<h4>text</h4></center>
</hgroup>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
</header>
<body>
<article>
<div id='swapcontent'>
This is my home page
</div>
</article>
</body>
3.) bodyswapscript.js
$(document).ready(function() {
$('li>a[id$="Container"]').click(function(event) {
event.preventDefault();
var href = $(this).attr('href');
alert("Loading " + href);
$('body').load(href + " #body", function() {
$("#body *:first").unwrap()
});
return false;
});
});
4.) css
* {
font-family: Lucida Sans, Arial, Helvetica, sans-serif;
}
body {
width: 720px;
margin: 0px auto;
}
header h1 {
font-size: 36px;
margin: 0px;
}
header h2 {
font-size: 18px;
margin: 0px;
color: #888;
font-style: italic;
}
nav ul {
list-style: none;
padding: 0px;
display: block;
clear: right;
background-color: #2B60DE;
padding-left: 4px;
height: 24px;
}
nav ul li {
display: inline;
padding: 0px 20px 5px 10px;
height: 24px;
border-right: 1px solid #ccc;
}
nav ul li a {
color: #EFD3D3;
text-decoration: none;
font-size: 13px;
font-weight: bold;
}
nav ul li a:hover {
color: #fff;
}
article > header time {
font-size: 14px;
display: block;
width: 26px;
padding: 2px;
text-align: center;
background-color: #993333;
color: #fff;
font-weight: bold;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
float: left;
margin-bottom: 10px;
}
article > header time span {
font-size: 10px;
font-weight: normal;
text-transform: uppercase;
}
article > header h1 {
font-size: 20px;
float: left;
margin-left: 14px;
text-shadow: 2px 2px 5px #333;
}
article > header h1 a {
color: #993333;
}
article > section header h1 {
font-size: 16px;
}
article p {
clear: both;
}
footer p {
text-align: center;
font-size: 12px;
color: #888;
margin-top: 24px;
}
modified 30-Aug-16 14:55pm.
|
|
|
|
|
Have a look at the documentation[^], particularly the section titled Loading Page Fragments[^]:
If one or more space characters are included in the string, the portion of the string following the first space is assumed to be a jQuery selector that determines the content to be loaded.
$(document).ready(function(){
$( 'li>a[id$="Container"]' ).click(function(event)
{
event.preventDefault();
var href = $(this).attr('href');
alert("Loading " + href);
$('#swapcontent').load(href + ' #swapcontent');
return false;
});
});
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I would generally advise against reloading the entire body content with an HTML fragment. It's generally considered bad practice as you'll generally have common elements between pages, regardless of the view.
It would be closer to industry standard if you defined a view DIV within the body element.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Sir, please send coings in javascript or angularjs for colllecting images and text from pdf image of catalogue picture....
|
|
|
|
|
|
or please forward any link ... i will check
|
|
|
|
|
So, I've been working on this code for the past day and it's drving me nuts. The problem is I'm trying to reverse the input of a string so when a user enters FIRSTNAME LASTNAME, the document it is exported to will display LASTNAME, FIRSTNAME.
I feel like I'm very close with the code I have but I need some understanding as well.
Here is my code:
%{var date = '${Case Name}'.split(' '); var date = date[0]; var dateParts = date.split(' '); dateParts[1] + ',' + dateParts[0]}
This code that I currently have returns undefined,FIRSTNAME.
Anyone have any ideas or guidance on how to pull the LASTNAME and add a space after the comma?
Any help is greatly appreciated!
|
|
|
|
|
Try walking through your code in your head:
- Take the name,
'FIRST LAST' , and split it on every space ⇒ ['FIRST', 'LAST'] - Take the first element from the result, and store it ⇒
'FIRST' ; - Split the stored element on every space (NB: There aren't any!) ⇒
['FIRST'] - Combine the second element of the one-element array with the first element ⇒
'undefined,FIRST'
Now it should be obvious that you need to remove steps 2 and 3:
%{var parts = '${Case Name}'.split(' '); parts[1] + ', ' + parts[0]}
However, you'll still get undefined if the entered name doesn't contain a space. If that could be the case, then you'll need the ternary operator:
%{var parts = '${Case Name}'.split(' '); parts.length == 2 ? parts[1] + ', ' + parts[0] : parts[0]}
Adding a space after the comma is as simple as ... adding a space after the comma!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
THANK YOU SO MUCH!!!!! I appreciate your feedback! 
|
|
|
|
|
Hy guys. I am creating WebAPI MVC website. I use angular http post to get some data from DB and it works all the time but when I publish my web to IIS http post stops working. I tried to get some error info so this is what was written in htmled form:
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/controller/function/
Physical Path C:\inetpub\wwwroot\controller\function\
Logon Method Anonymous
Logon User Anonymous
and says that "The directory or file specified does not exist on the Web server." I dont know if am I wright but seems like IIS thinks that url I use in post method is real path, not api. How to make it think it is api?
By the way to be sure angular works I tried the simple model bind. So there was no error.
|
|
|
|
|
|
Hy, I deploy to IIS 7.5 and I tried your suggested hotfix, but it throws error saying "the update is not applicable to your computer"
|
|
|
|
|
Did you try the other workarounds from the blog post?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yes, I tried. All three. Http post still doesnt work.
|
|
|
|
|
Do you have the http response? (ie using Fiddler)?
|
|
|
|
|
Hi! Did you faced any challenge in javascript? 
|
|
|
|
|
Please ask a clear question , What do you want to know ?
|
|
|
|
|