Click here to Skip to main content
15,881,588 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Need help understanding this piece of code Pin
Jaime Premy16-Jul-16 18:22
professionalJaime Premy16-Jul-16 18:22 
GeneralRe: Need help understanding this piece of code Pin
ZurdoDev17-Jul-16 8:19
professionalZurdoDev17-Jul-16 8:19 
QuestionWhat is the work of callback argument in NodeJs "module.exports"? Pin
MaxySpark4-Jul-16 10:03
MaxySpark4-Jul-16 10:03 
AnswerRe: What is the work of callback argument in NodeJs "module.exports"? Pin
rah_sin12-Jul-16 0:42
professionalrah_sin12-Jul-16 0:42 
QuestionForming your own panel Pin
Member 126139631-Jul-16 3:06
Member 126139631-Jul-16 3:06 
AnswerRe: Forming your own panel Pin
Richard MacCutchan1-Jul-16 3:48
mveRichard MacCutchan1-Jul-16 3:48 
QuestionError in parentNode.replaceChild while hiding content which is available in web page Pin
srikrishnathanthri1-Jul-16 2:41
srikrishnathanthri1-Jul-16 2:41 
QuestionChange webpage background on the fly (If it worked) Pin
Born5929-Jun-16 2:00
Born5929-Jun-16 2:00 
I am trying to change the webpage background based on the user preferences, they have at the moment 5 background images to choose from.

When they click the background image that they want, the code-behind saves the image to a user preferences table in SQL and also updates the users cookie, when the master page is loaded a call to the cookie is made to get the image.

VB
Public MyBg as string

MyBg = "css/image/" & Request.Cookies("tmr")("bgi")


In Code-Behind Master Page, and On the page I have

<pre lang="Javascript"><script type="text/javascript">
           window.onload = function () {
                function load() {
                    $('#content').css('background', '#000 url(' + <%=MyBg %> + ') center');
                }
            }
</script>


If I view the page source code on a rendered page I can see

JavaScript
<script type="text/javascript">
   window.onload = function () {
      function load() {
         $('#content').css('background', '#000 url(' + css/image/ecb.jpg + ') center');
          }
     }
</script>



All looks good apart from the fact NO image is in the background, can anyone help with this?
AnswerRe: Change webpage background on the fly (If it worked) Pin
Richard Deeming29-Jun-16 2:06
mveRichard Deeming29-Jun-16 2:06 
PraiseRe: Change webpage background on the fly (If it worked) Pin
Born5929-Jun-16 2:12
Born5929-Jun-16 2:12 
QuestionJSHint & Sublime use and config Pin
DavidMillar246828-Jun-16 21:00
DavidMillar246828-Jun-16 21:00 
AnswerRe: JSHint & Sublime use and config Pin
Richard MacCutchan28-Jun-16 21:20
mveRichard MacCutchan28-Jun-16 21:20 
AnswerRe: JSHint & Sublime use and config Pin
Kornfeld Eliyahu Peter28-Jun-16 22:55
professionalKornfeld Eliyahu Peter28-Jun-16 22:55 
QuestionConfirm always returning false on Firefox for IOS Ver 4.0 Pin
jkirkerx23-Jun-16 12:35
professionaljkirkerx23-Jun-16 12:35 
AnswerRe: Confirm always returning false on Firefox for IOS Ver 4.0 Pin
Graham Breach23-Jun-16 23:17
Graham Breach23-Jun-16 23:17 
GeneralRe: Confirm always returning false on Firefox for IOS Ver 4.0 Pin
jkirkerx24-Jun-16 6:10
professionaljkirkerx24-Jun-16 6:10 
GeneralRe: Confirm always returning false on Firefox for IOS Ver 4.0 Pin
Graham Breach24-Jun-16 23:54
Graham Breach24-Jun-16 23:54 
GeneralRe: Confirm always returning false on Firefox for IOS Ver 4.0 Pin
jkirkerx26-Jun-16 9:01
professionaljkirkerx26-Jun-16 9:01 
QuestionJQuery Validator, rules highlight creates label under textbox that is wrong class. Pin
jkirkerx22-Jun-16 9:34
professionaljkirkerx22-Jun-16 9:34 
AnswerRe: JQuery Validator, rules highlight creates label under textbox that is wrong class. [solved] Pin
jkirkerx22-Jun-16 12:34
professionaljkirkerx22-Jun-16 12:34 
GeneralMultidimensional Array in JavaScript Pin
HubSnippets22-Jun-16 2:05
HubSnippets22-Jun-16 2:05 
AnswerRe: Ajax succees event not firing with jsonp Pin
Peter_in_278021-Jun-16 17:23
professionalPeter_in_278021-Jun-16 17:23 
QuestionJquery Row details open Pin
Member 1130579120-Jun-16 3:31
Member 1130579120-Jun-16 3:31 
QuestionHow to compute XOR logic? Pin
AmalRaj@Sync19-Jun-16 19:05
AmalRaj@Sync19-Jun-16 19:05 
AnswerRe: How to compute XOR logic? Pin
Richard MacCutchan19-Jun-16 21:41
mveRichard MacCutchan19-Jun-16 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.