Try this:
body{background: #000 center/100% no-repeat fixed url(../layout/background.jpg);}
Try this:
body{background: #000 center/100% no-repeat fixed url(../layout/background.jpg);}
it's working just fine here, the script output is correct: "20-Oct-2014"
have you tried :
3. var sbtotal = sbheight1 + sbheight2;
4. alert (sbtotal);
'tabCarousel' variable points to the timer not to its argument.
You need a handle for the function in order to be able to call it ., a named function.
illustrating in JS (DOM 0):
function carousel() { 'function body'; }
var tabCarousel = setInterval( carousel, 5000 );
[tabsContainer].onmouseover = function() { clearInterval( tabCarousel );}
[tabsContainer].onmouseout = function() { tabCarousel = setInterval( carousel, 5000 );}
This fiddle is not working on my system but in case it works on an independent page, you can add a function containing clearInterval(tabCarousel);
command to a mouseover event on a main tabs wrapper element.
Your fiddle at (http://jsfiddle.net/qjmDU/14/) isn't doing anything.
Can you please provide a working example so that we can try fixing the delay you are having issues with?
I've just found this out from triall and error.
And no, you didn't! - I told you so.
Because there's absolutely nothing else to explain here You my friend should have marked this thread Solved.
So why am I downvoted, if you please care to explain?
Thanking me this way for giving you the most
accurate explanation posssible, - expecially when taking in account the fact that your question was far from clear.
What is this?
I know you cannot nest a <form> within a <form>.
Than, can you please provide us with the original source code fragment instead?
Because, (since you already know that) you cannot nest a form within a form:
The form with className: second-form will not be parsed;
Therefore - will not beavailable to the DOM API,
that is: will not exist!
Since there is no nested form parsed in the document, there's nothing you can do to or with it.
So if there is no other code but this in your source, we can call this a final answer. Nothing left to add to it.
Regards.
Can you please expand on your example code, (...not enough data to process...)
There has to be an alternative approach to the problem, probably not as convenient - but at least, one that will walk you across.
p.s.:
Yes it is true that to be able to use it, (refer to the currrent event),- supplying the event argument-name in the function in Firefox is mandatory, (since like forever). And it always has to be the first argument on the arguments namespace.
It is all unclear, can you please provide a testcase ?
correct, with the addition that the return statement will also exit the function at the exact point of insertion canceling all other statements that may follow!
That's to say the least an incorrect asumption.
This function:
function doesNothing(){
return;
var one = "Hello";
var two = "Orange";
var total = one + two;
return total;
}
is equivalent to:
function doesNothing(){
return;
}
or even:
function doesNothing(){
//empty
}
because a function
without return
also evaluates to undefined
.
To better ilustrate this, suppose you have something like( 2 + 2 )
in the program stream. After the expression evaluation parens will contain a pure integer ( 4 )
. (In fact there will be no parens either but we are using them for illustration purposes).
Analogous to that, we can have a function
( doesnNothing() )
, which after parsing time leaves parens containing ( undefined )
.
That's in case the function
either doesn't have a return
statement, or the return
statement has nothing to return. In all other cases it contains the returned value
.
Be it a Boolean true
or false
, regardless... it doesn't change the return
behavior.
So, are we getting there yet? :)
Of course you could have left the return statement out of your script syntax and most probably be writing a smaller footprint function to produce the (same) meant result.
You were shooting at (if we understood it well enough) discussing the use and the meaning of it.
The meaning of a certain expression is a subject to its context of its syntactical position. There is no main purpose on a dynamic and a live language like JavaScript.
The return statement is able to return any JavaScript value with no restriction;
Every possible JavaScript object or literal can be returned with return statement, including complex functions or their result which will also come from a return value.
The return statement is most often used on writing functional methods. In other cases it used to conditionally exit the execution process before the remaining statements of the function body are executed.
• The return statement has no meaning outside of a function , in that case an exception message will be thrown: "'return' statement outside of function"
It can also be used to conditionally break, that is, to exit a loop.
No language tells you how to use it. So it is up to the user's natural talent and obtained skill -to use it the way he/she means to formulate express and communicate a certain meaning.
Have fun
Adding a function to a variable before reading the function. In your second example.
the function return; capturing the function return onto a variable the value of which you will be feeding the document.write command.
I assume that this prettymuch rounds up the answer on return statement
Yes, it's a an obvious replacement of your old long working but recently failing part of the script.
And thank you for downvoting. My fault...
In reality I'm not calling a variable as a function, I'm calling the function by the name of the variable.
They are both references::pointers to the assigned function object.
A note should be made that: There is a slight behavioral difference between them. With a function assigned to a variable, you cannot do something like:
var total = apple();
document.write(total);
var apple = function(){
var one = "Hello";
var two = "Orange";
return one + two;
}
as in:
var total = apple();
document.write(total);
function apple () {
var one = "Hello";
var two = "Orange";
return one + two;
}
Regards.
Imagine what chaos might ensue if all members were in the global namespace. Think how careful you would have to be when using a 3rd party lib not to overwrite some critical aspect of that lib!
This is why you should write your own code and if necesary your own (specific to the project algo ) libs.
Shouldn't the write command be writting the combined scrings of both variables one & two based from the return value ?
No, because "total" is a local variable not available in global context of the "document.write".
Executing the "apple" function will of course return the assignment value of the variable 'total' but since there is nothing there to capture it, it will evaporate.
More elaborate approach would be to
var apple = function() {
var one = "Hello";
var two = "Orange";
return one + two;
}
var total = apple();
document.write(total);
writes: "HelloOrange"
var popupWindow = window; its a hack
/unknown/i.test(document.createElement('bgsound')) ?
document.write("<embed src='"+x+"' hidden autostart loop>") :
document.write("<bgsound src='"+x+"' loop>");
<html>
<head>
<title>Wix.com - 404</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="5; URL=http://www.wix.com/">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" class="not-found">
<center>
<font face="Arial">Something went wrong...</font><br><br>
<font face="Arial" size=-1>
The page you tried to access does not exist on our server.</br>
For now, you may want to visit our <a href="http://www.wix.com/">site's homepage.</a>
</font>
<br>
<a href="http://www.wix.com/"><img src="http://static.wix.com/client/wix_logo_wixpress.jpg"
width="400" height="400" alt="Wix.com" border="0"></a>
<br>
<font face="Arial" size=-1><a href="http://www.wix.com/">Click here, if you are not automatically
re-directed</a></font>
</center>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker('UA-2117194-1');
pageTracker._initData();
pageTracker._trackPageview('http://wix.com/404/not_found');
</script></body>
</html>
I don't understand what is Modal about that div, if anything?!
You'll need a true Modal Dialog for that; which is either a builtin browser Confirm Dialog, or the customizable showModalDialog() command.
jQuery uses fake Dialogs;
Which are in fact no dialogs at all, or if we cut some slack, they are at best, no more than Modeless imitations of app Dialogs.
Unable to halt the script execution and wait for confirmatin value.
the associated element of the event that must trigger the function, may or may not be the element with the id, ID.
that will only replace the:
index.php?editid=1;
with:
"javascript:void(0)"
when the link is hovered.
I also am of an opinion that this kind of things should not be allowed.
The client has the right to know the link value before clicking on it at all times and without having to take any further actions other than hovering.
nope, the function is the action that must take place when the associated element is clicked.
[datepickerFld].disabled = true;
or for browsers which don't support boolean properties in exact maner please use the following syntax:
[datepickerFld].setAttribute("disabled", "disabled");
Cheers
He probably didn't, but his question was on a separate subject: how does or can the argument variable named pcheck carry or receive the value of a variable named paycheck when a given function is alerting the value by using pcheck keyword, whereas in the function argument we are inserting a variable with a different name, namely paycheck.
The answer is that JavaScript variables are not carriers or presentations of an object being passed by but simple tokens pointing or referring to a given object; and that paycheck token is simply passing its reference of an existing object (same object: number literal 12000 ) to another token which will be, now also pointing to that same object.
of course if you tell me what does sagis-girl mean.
for a start there's a trasncript redoundant word or brain glitch error during transcription on line
9. var v1=value.value;
it should be correspondently equal to:
9. var v1=price.value; //instead
mark solved threads general2012
Have you tried SHIFT+Enter for a new line instead of a new paragraph?
I think you have but you are embarrased to come back and mark the thread solved.
he was off the topic for being busy rediscovering the tap water, as if we never heard of the existing difference between global and local variables, since like forever.
but by "pc = pc - 10;" he meant: "pc -= 10;"! completely off topic of course.
/* make the API call */
FB.api(
"/{event-id}",
function (response) {
if (response && !response.error) {
for( x in response )console.log( x + ": " + response[ x ] );
}
);
than examine the log for properties returned by the event API and chose what you need.
what is its practical use ?
...for IE versions you simply do <form disabled ... > .... </form>
and the form including all its elements will gray out and be disbled until you decide to enable them again <input type="button" value="edit" onclick="document.forms[0].disabled=false">
Than, problem solved.
You should have also maked the thread as such.
Regards
output += '<img src="' + processorStock[i].image + '"/img>';
this one is wrong.
will produce: <img src="imagelocation"/img> a malformed img tag.
document.observe('dom:loaded', function() {
is an overhead since no form gets submited by itself.if((new Validation('formDance', {useTitles:true})().validate());
should suffice to allow following statements to execute, in case a form validation returns true = has validated.
else return false
to cancel the submision of invalid data; Done.
@Violet,
generally spoken -it means that offset is more reliable than position in a mixed web environment.
I'm not sure I can recall well, but as I remember, the possition specs have changed in later standards.
This is not a javascript question neither, but...
Yo will need to uninstall the recent installation of firefox and reinstall your original version (Firefox 3.6.23), which as it seems can still be found on the web and with a little luck, easily be downloaded from here,so...
Good luck!
alert box is a modal dialog, (meaning) 1. it should be able to freeze script executon; also 2. disallow focus to go back to the content window e.g. to further interact with the page while it (the alert box) is still open.
It looks like jQuery is using the showModalDialog command in its .dialog() method -which is not supported by Opera.
It means that this same jQuery method will only be able to produce a modeless alert box in Opera and other browsers who do not have support for * custom* modals.
"The .position() method allows us to retrieve the current position of an element relative to the offset parent."
Means: The current position of the nested element edge relative to its parent element edge.
If element wrapper has padding = 10px, and the nested element has style.left = 13px, plus margin-left = 30px, -its (the nested element) position().left will be = 23. (Its margin will not be taken into account, because the nested element edge is 30px outwards).
Whereas, the offset left will always report the distance from the left edge of the document. Meaning that if you are aiming to move/reposition the element relative to its immediate wrapper, you'd be using position left.
Regards.
function getChecked(o){ var i=0, grp={};
while(o[i])o[i].checked?
grp[o[i].name]?
grp[o[i].name].push(o[i]):grp[o[i].name]=[o[i]]:0, i++;
return grp;
}
invoking this function getChecked(myForm)
will return you an object who's property-names are the names of groups containing currently checked elements, which can be further processed (if and as required).
You'll need to serve the daniweb.com in "https" protocol so they can match , no other fix available.
You can emulate them using the showModalDialog('customPrompt.htm',"", "")
on browsers that support it, but than you'll have to write them (code them, style them, script them) yourself completely.
There are no jQuery dialogs [except DIV's emulating dialogs] and no you can't modify the builtin browser prompt default title.
Siberian, this thread was solved in a blink of pritaes eye, - you should have marked it: "solved" by now.
Regards