[Solved] not working js script

put all in document ready handler and see if helps: <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></script> <script type=”text/javascript”> jQuery(function($){ var prev = ”; $(‘#zzz img’).click(function(){ if (prev != ”) $(‘#img_’ + prev).css(‘border’, ‘1px solid #eee’); prev = $(this).attr(‘id’).replace(‘img_’, ”); $(this).css(‘border’, ‘1px solid #535666’); $(‘#imgid’).val(prev); }); }); </script> Hoping that you are having jQuery plugin loaded before this script. solved … Read more

[Solved] Change database value [closed]

you can use xmlhttprequest, and the javascript : var xhr = new XMLHttpRequest(); // Create new XHR var url=”http://sample.com/change.php”; // The url var data=”data=sample&back=come”; xhr.open(‘POST’, url, true); // POST is method you can with `POST|GET` xhr.send(data); or it can be simplifer with jquery var url=”http://sample.com/change.php”; // The url var data=”data=sample&back=come”; $.post(url,data,function(callback){ alert(callback); }); and sure … Read more

[Solved] Need to display forms as per the checkboxes selected [closed]

If you want the solution in JQuery, here you go: $(“.formGroup”).hide(); $(‘#chooseForm input:checkbox’).on(‘change’, function() { if($(this).is(‘:checked’)) { $(“#” + $(this).val()).show(); } else { $(“#” + $(this).val()).hide(); } }); ​ A complete example: http://jsfiddle.net/exttq/ Hope it helps! 2 solved Need to display forms as per the checkboxes selected [closed]

[Solved] Declaring objects and printing strings in PHP [closed]

This answer is from your first revision: https://stackoverflow.com/revisions/28522294/1 You have a few errors in your code: 1. Missing semicolon $this->hello_string = “Hello World!” //<- Missing semicolon at the end 2. Wrong access of class property’s echo “<font color=\”$this.font_colour\” size=\”$this.font_size\”>$this.hello_string</font>”; //… echo “<u><font color=\”$this.font_colour\” size=\”$this.font_size\”>$this.hello_string</font></u>”; I recommend you to concatenate the property’s with the string. How … Read more

[Solved] Is it possible to add Several bgcolor to one HTML page,Not background-color [closed]

It is not clear what you are trying to do, but you can setup multiple div as background like this: .element { position: relative; width: 300px; height: 300px; background: rgba(255, 0, 0, .5); } .background { position: absolute; top:0; right:0; bottom:0; left:0; } .background.bg1 { background: rgba(0, 0, 255, .5); } .background.bg2 { background: rgba(0, … Read more

[Solved] JQuery .focus() not work in .blur() event in Firefox

$(“#txtfname”).focus(function () { //Check if value is blank or not if ($(“#txtfname”).val() === “” && $(“#txtfname”).val().length >= 2) { $(“#fnamemsg”).hide(); // Hide message } }); var element = document.getElementById(‘txtfname’); element.focus(); element.onblur = function () { if (element.value !== “” && element.value.length < 2) { $(“#fnamemsg”).show(); $(“#fnamemsg”).html(“* Firstname required 2 character”); setTimeout(function () { element.focus(); }, … Read more

[Solved] php form doesn’t post on the page

First, your English is good. Second, there are a lot of things I would recommend working on before being concerned if it posts or not. mysql vs mysqli mysql extension depreciation warning mysql extensions have been depreciated, so you will want to use mysqli. The benefit of working with PHP is that the documentation is … Read more

[Solved] Relative File Path For a Picture

Try, <img src=”https://stackoverflow.com/questions/47939821/Rezepte/GrilledFruitKebab.jpg”> Remember, Is the image in the same directory as the file referencing it? Is the image in a directory below? Is the image in a directory above? By “below” and “above”, I mean subdirectories and parent directories. Relative file paths give us a way to travel in both directions. Take a look … Read more

[Solved] How I can push that button in browser console?

document.getElementById(‘foo’).click(); This does the trick. Give it id instead of class and you will be able to do it. If you can’t give it an ID and need to use the class this will do: var foo = document.getElementsByClassName(‘foo’); foo[0].click(); 12 solved How I can push that button in browser console?

[Solved] PLEASE assist me.. RE: *FORM FIELDS* I want to Hide() my “type=text box” until the Other option is chosen in the dropdown option

Two main issues with your original code: 1- Using a wrong selector for the onchange event, replace “Other” by “#title” 2- You were checking if the value is equal to “Other” instead of the “other” you have in your HTML. Be careful, string comparison is case-sensitive! Below is a working snippet after applying these two … Read more