|
It requires a lot of code and will be different for everyone's situation. Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Ford Motor Company is accused of stealing Versata's Automotive Configuration Management (ACM) software. Versata is currently investigating this matter and is seeking information from individuals that formerly worked at Ford Motor Company on either the ACM program or on the replacement program called Product Definition Offering (PDO). If you previously worked on either one of these programs we would like to hear from you on a confidential basis at confidentialfordinfo@gmail.com.
We very much appreciate your response and are eager to hear from you.
|
|
|
|
|
I am sorry for the very basic question, but I don't have a reference book. Can you have more than one "Else if " statement in case you needed to make more than 2 comparisons to the same item?
|
|
|
|
|
Yes, you can.
You may also want to look at the switch statement[^] as well.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Member 11847850 wrote: I don't have a reference book You don't need one, nearly all documentation[^] is online.
|
|
|
|
|
Could anyone let me know why my ajax program will not work? The code is below:
<!DOCTYPE html>
<html>
<head>
<script language = "javascript">
var XMLHttpRequestObject = false;
if(window.XMLHttpRequest)
{
XMLHttpRequestObject - new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHttp");
}
function getData(dataSource, divID)
{
if(XMLHttpRequestObject)
{
var obj = document.getElementById(divID)
XMLHttpRequestObject.open("GET", dataSource);
XMLHttpRequestObject.onreadystatechange = function()
{
if(XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200)
{
obj.innerHTML = XMLHttpRequestObject.responseText;
}
else
{
obj.innerHTML = Waitning for response...
}
}
XMLHttpRequestObject.send(null);
}
}
</script>
</head>
<body>
<div id="text">
<p>Response will appear here.</p>
</div>
<form>
<input type = "button" value = "Submit" onclick="getData('HelloWorld.php','divID')">
</form>
</body>
</html>
Thanks,
Truck35
|
|
|
|
|
Add a 'divID' in the body, e.g.
<div id="divID"></div>
|
|
|
|
|
I added the "divID" to the id attribute of the div tag and my program still will not work. If anyone has any ideas why, please let me know.
The modified code is below:
<!DOCTYPE html>
<html>
<head>
<script language = "javascript">
var XMLHttpRequestObject = false;
if(window.XMLHttpRequest)
{
XMLHttpRequestObject - new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHttp");
}
function getData(dataSource, divID)
{
if(XMLHttpRequestObject)
{
var obj = document.getElementById(divID)
XMLHttpRequestObject.open("GET", dataSource);
XMLHttpRequestObject.onreadystatechange = function()
{
if(XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200)
{
obj.innerHTML = XMLHttpRequestObject.responseText;
}
else
{
obj.innerHTML = Waitning for response...
}
}
XMLHttpRequestObject.send(null);
}
}
</script>
</head>
<body>
<div id="divID">
<p>Response will appear here.</p>
</div>
<form>
<input type = "button" value = "Submit" onclick="getData('HelloWorld.php','divID')">
</form>
</body>
</html>
Thanks,
Truck53
|
|
|
|
|
change
obj.innerHTML = Waitning for response...
to
obj.innerHTML = "Waitning for response...";
use the dev tools of your browser, or a tool like Fiddler, to examine the network traffic. So if the request is being made and if so what its return status is. Maybe it's 404? or 500? We can't access your system so don't know.
|
|
|
|
|
Hello i am having an mp3 file i want to convert that audio file in byte array and send it to the server please let me know how i can do it
|
|
|
|
|
Is there a way to shorten or combine if() statements?
Currently I have if age<21 there is an alert, then else if age>21 there is an alert, another else if age==21 alert, and an else alert.
Is there a way to combine age<21, age>21, age==21 into one statement with their individual alerts?
Thanks, I am taking my first Javascript class right now.
|
|
|
|
|
use case/switch statement
switch (true) {
case (age == 21):
alert(" equal");
break;
case (age> 21):
alert(" older");
break;
case (age < 21):
alert("younger");
break;}
|
|
|
|
|
<script>
function myfun() {
var age = 21;
(age < 21) ? alert('less than 21') : (age > 21) ? alert('greater than 21') : (age == 21) ? alert('equl 21') : alert('else part');
}
</script>
It's give you result 100% with single line.
|
|
|
|
|
The third expression "age == 21" is redundant. If it is not less than and not greater than then there is only one other value it can have.
|
|
|
|
|
Godhaniketan wrote: Hello Richard MacCutchan,
I think you have not tested well in my case it's worked fine. i think you should have to check again.
if any doubt then reply me.
just change value of age like 19,21,22 and 'blah..' it gives you all kind of alert..please try it out. Well I guess you do not understand that simple statement only requires two if parts.
If age is less than 21 : Alert1
If age is greater than 21 : Alert2
Else: age must be equal to 21, so the test for equality is not needed.
modified 21-Jul-15 9:22am.
|
|
|
|
|
Godhaniketan wrote: Hello Richard MacCutchan,
have you read question of "Member 11849688" he written clearly that "else if age==21 alert" that means he/she wants alert on equality condition also.
please read out the question properly.
he/she want 4 alert <, >, ==, else part. Yes, and that is what my logic provided. If you really cannot understand simple boolean expressions then ...
modified 21-Jul-15 9:23am.
|
|
|
|
|
Yes i understand your logic..
i will remove redundancy.
thanks
|
|
|
|
|
And in future, please do not remove messages as you have done here. We all get things wrong from time to time (me more often), so just be adult enough to accept correction.
|
|
|
|
|
How do I send a user to another webpage by opening it up in a new tab?
Here's what I know so far:
location.href="addurlhere"
I am at the very beginnings of learning, but I do not want people leaving my page completely to check out another, does that make sense?
Thank you!
|
|
|
|
|
<script type="text/javascript">
function OpenInNewTab() {
window.open('http://localhost:2319/test.aspx', '_blank');
};
</script>
<div onclick="OpenInNewTab();">test</div>
|
|
|
|
|
I have a code for which the is on right of page. it is fixed there by css as follows:
#feedback
{
position: absolute;
width: 230px;
float: right;
height: 60px;
right: 310px;
top: 190px;
}
but when the window size is resized the cs property 'right' should also reduce as this div is not visible if window is minimized than 100%
Initially
`$( window ).width() = 1899px;`
'right' property for feedback div should be 310px
For every reduce of 10px in window width, right css of feedback div should reduce by 4.5px
egg.
Width = 1899px Right property = 310px
Width = 1889px Right property = 305.5px
Width = 1879px Right property = 301px
.
.
.
.
util
Width = 1234px Right property = 0px
I'm not able to make this logic work. Can anyone please help
|
|
|
|
|
Please Provide me Book or Link which Covers Following Topics:
1. HTML/HTML5
a. HTML Page design using DIV based layout (no tables)
b. META Tags
c. Viewport
d. HTML5 Page design using <header>, , , and
2. CSS
a. Styling of elements using CSS
b. CSS properties – float, align, background, margin, padding, position, width, height
c. Pseudo classes
d. How to override CSS properties
e. Inline, embedded and external CSS
3. JavaScript
a. DOM Manipulation
i. Change content of the DIV based on some event
ii. Populate data inside a DIV using AJAX
iii. Show/Hide Elements
b. Event handlers
c. Timer functions – setTimeOut, setTimeInterval
d. AJAX and JSON
e. Cookies management
f. Debugging using Browser Console
g. JavaScript/CSS minification
Please suggest me link for the topics which are in bold letters.(Link/Book should cover Bold Marked Topics Mandatory.) Please reply asap.
|
|
|
|
|
|
www.w3schools.com/js/default.asp
|
|
|
|
|
I'm having a feedback box, which has to be at the right corner of the page and should scroll up and down with the scroll bar. But how to stop its flickering in IE and chrome CSS for that div is:
#showSurvey
{
position: relative;
width: 230px;
top: 190px;
float: right;
height: 60px;
}
and javascript to keep it at top is
var wintop = $(window).scrollTop(); if(wintop >= 190) {$('#showSurvey').css('top', (wintop + 10));} else{
$('#showSurvey').css('top', '190px');
}
Using this the div flicker a lot and it looks ugly can anyone please help
|
|
|
|