15,127 Topics
| |
Currenlty on my editor I can wrap text in any tag. But I am un able to unwarp the selected text also. My question is lets say if I select / highlight text which is wrapped in '<b>' something '</b>' and then I go and click on the bold button … | |
I am having small issue with my code mirror preview. For some reason will not dectect when new line is created in editor. Question: How to make sure that the code mirror preview dectects a new line and displays it correctly? [Codepen Example Here](http://codepen.io/riwakawebsitedesigns/pen/mVmxpp) Script <script type="text/javascript"> $(document).ready(function() { var … | |
Hello everyone, I want to build an advertising system like AdSense on my website. I want to count only clicks that are not from the same user. Because I don't want the user to click many times on the same ad and ruining the ad program. I was thinking of … | |
So I have the following code: <script> function validateForm() { var homePhone = document.forms["volForm"]["hphone"].value; var mobPhone = document.forms["volForm"]["mphone"].value; var workPhone = document.forms["volForm"]["wphone"].value; var ehomePhone = document.forms["volForm"]["ehphone"].value; var emobPhone = document.forms["volForm"]["ehphone"].value; var fname = document.forms["volForm"]["fname"].value; var lname = document.forms["volForm"]["lname"].value; var digiSig = document.forms["volForm"]["digiSig"].value; var digiSplit = digiSig.split(" "); if((homePhone.length == 0 … | |
I would like to know if possible to be able to replace any html character that are inside my pre tag's <pre> replace < with < and this > with > </pre> so it does not affect my pre tag's $('button[id="instant_preview"]').on('click', function() { var code = $('#editable').text(); $('#preview').html(code); replace('<',"<"); replace('>',">"); … | |
Below is a php code for inserting comment to a post, It works fine now I want to add ajax code to add comments live (without page being refreshed). I prefer ajax code and php code on same page because code will be carrying id's of users so don't want … | |
need help in inserting a php inside this script, heres the code <script type="application/javascript"> var eventData = [ { date:"2015-03-01", badge:false, title:"Example 1" }, ]; $(document).ready(function () { $("#my-calendar").zabuto_calendar({ data: eventData }); }); </script> example i just want to declare a varible like $date=$row['date']; date:"<?php echo $date ?>", but its … | |
I would like to send Post Data to a Symfony Controller, but it doesn't work. When I send my data with AJAX, it is sending the POST data, but it is showing red link in the console with no error message or status. Here is my Javascript code: function addprivate(){ … | |
I have a small problem when I clone my editable div into my iframe. Each time I click on my code view button it copys the content from my editable div and then displays it in my iframe But each time I do that it copys the same content multiple … | |
If my slected text is wrapped in bold or iltalic or pre tag and then if i click on the revert button it should remove the tags around the selected text. But for some reason will not with my code. Question when I select/highlight some text and then click my … | |
I have a to-do list made in HTML, CSS and JavaScript, and I want to redirect to a website only if they are 0 elements unchecked remaining. I think that the code should contain "numRemaining". I have tried something in JQuery, but it was a total failure. This is my … | |
Hy there! I have a strange error to my prestashop. If I deactivate the module block contact without container the whole theme for mobile is ruined....Please see photo https://www.dropbox.com/s/1pst1w9ivuw4v3a/2016_01_03_12.25.10.png?dl=0 The error appears only to mobile and tablets. For desktop everything is okay. The same problem I get if I activate … | |
iam using laravel 4 ,am trying to pass a variable to a redirect back return `Redirect::back()->with('message','Message has been sent',compact('account','pageTitle'));` like you would have done with a View ` return Redirect::back()->with('message','Message has been sent',compact('account','pageTitle'));` is that posssible ??. | |
Hi, I am new to framwork, Now I started to learn Codeigniter. I have installed version of CodeIgniter 2.2.6, from the following link https://codeigniter.com/download I want to do a simple registration form with image upload , storing that image in a seperate folder, image name in to database, and with … | |
I want to show all data of the page in pdf but i have no idea how to do this . I am using php .Please help me to solve that problem. | |
what is the difference between client-side programming language and server-side programming language? Why javascript is only a client-side programming language, but PHP is a server-side programming language? I am a newbie starting web development and need some advice. | |
Hi Guys, I'm after a user interface element for ionic that operates like a cross between a range slider http://ionicframework.com/docs/components/#range and spinner. Essentially the 'button' or tag that you would drag from side to side in a range needs to stay in the middle, but as you swipe, the scale … | |
function EnableDisableTextBox(chkPassport) { var txtPassportNumber = document.getElementById("txtPassportNumber"); txtPassportNumber.disabled = chkPassport.checked ? false : true; if (!txtPassportNumber.disabled) { txtPassportNumber.focus(); } } <html> <body> <label for="chkPassport"> <input type="checkbox" id="chkPassport" onclick="EnableDisableTextBox(this)" /> Tab? </label>Tab Quantity: <input type="text" id="txtPassportNumber" disabled="disabled" /> <br> <script type="text/javascript"></script> <label for="shoes"> <input type="checkbox" id="shoes" onclick="EnableDisableTextBox(this)" /> Shoes? Shoes Quantity: … | |
I use this code to find time difference, alert(( new Date("1970-1-1 12:42 ") - new Date("1970-1-1 9:42") ) / 1000 / 60 / 60 ); it works in chrome, but in firefox it shows NaN error. How to solve this? | |
hey,i jave this code. how to check the textbox (mname) to accept only letters? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <link rel="stylesheet" type="text/css" href="mystyle.css" /> <!--- call my style --> <head> <title>Home page - MidermFaill2015 - Andreas Petrou</title> <!--- title of page --> <!--Andreas Petrou 8600--> </head> … | |
$mysql_hostname = "localhost"; $mysql_user = "root"; $mysql_password = ""; $mysql_database = "loan"; $connect = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Something went wrong..."); mysql_select_db($mysql_database, $connect) or die("Something went wrong..."); if(isset($_POST['btn_submit'])) { $datess = $_POST['datess']; $control = $_POST['control']; $payee = $_POST['payee']; if(!empty($datess) && !empty($control) && !empty($payee)) { mysql_query("INSERT INTO `sales`(`datess`, `control`, `payee`) VALUES … | |
Hi, I was hoping I can get some help. I've been searching and searching for a lightbox that works with SrcSet so I can display different images based on viewport width. Most to which I have found; don't support SrcSet but presentation wise, are exactly what I want, somewhat a … | |
Hi guys, I try to calculate number of month between 2 selected dates and i just got this code. The problem is this code calculate number of days and i try change the code from **var days = (end - start) / (1000 * 60 * 60 *24) ;** to … | |
function otherfunction (arg){ console.log(arg); } function executeFunction(otherfunction){ } executeFunction(otherfunction( "hello") ); This seems redudant , suggestions?? | |
hello , I running google map api with multiple select of category (checkbox), everything fine working , but I dont know how to link(when u click on marker) form market window to page , if my page loop , any examples or suggestion. | |
1) initially i have a row if the user click save & next button it will say you have 3 fields missing 2) if the user click the addmore button and he did not type any value in the text field then he click the save and next button it … | |
HI, In a page I load table in while loop with time duration calculation for multiple times. I want to display time difference in their respective rows. Here I included my code. <?php $a = mysql_query("SELECT * FROM user")or die(mysql_error()); $a_count = mysql_num_rows($a); if($a_count > 0) { ?> <table border="1" … | |
Trying what I thought was a simple way to extract html tags. In this example I'm expecting an array with 4 elements but I get only one... am I missing something? var htm="<a></a><b></b>"; var patt = /<.*?>/gim; var a = patt.exec(htm); alert(JSON.stringify(a)); Expected: ["<a>","</a>","<b>","</b>"] But I get: ["<a>"] | |
Hi, I need your help for forgot password decryption. When a user registers , his password will be encrypted using md5(); and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table, My problem is, If he … | |
Hi, How we can know , a user requested for forgot password? |
The End.