[Solved] Custom order list of links [closed]

TinySort is a small script that sorts HTMLElements. It sorts by text- or attribute value, or by that of one of it’s children. The examples below should help getting you on your way. This doesn’t use jQuery and it is fast in performance. TinySort used to be a jQuery plugin but was rewritten to remove … Read more

[Solved] This code does’t run and gives no error [closed]

You forgot to remove the remove class so it stays hidden. No need for all the if statements, one option is to add a data-tabid to your anchors and use that as the id to display the divs. <!DOCTYPE html> <html> <head> <script src=”https://stackoverflow.com/questions/17261287/jquery-1.9.0.js”></script> <title>test</title> <style type=”text/css”> body, html, div, ul,li,a {margin:0; padding:0;} body {font-family:arial;font-size:12px;} … Read more

[Solved] Load HTML into a DIV using jquery

I think the show hide jq are what you need to use here. Here is a link that I put together. $(“#homeButton”).click(function () { $(“#cuerpo”).show() ; $(“#tablet”).hide() ; }); $(“#procuctsButton”).click(function () { $(“#tablet”).show() ; $(“#cuerpo”).hide() ; }); http://jsfiddle.net/jebr224/GEZth/ You could also try using iframe, you could make the buttons change the src of the frame. … Read more

[Solved] Ajax post returns multiple arrays with objects that have multiple values

Your ajax.php should be like this <?php foreach ($messages as $message) { $from = $message[‘contact_value’]; $text = $message[‘message’]; $date = $message[‘date’]; $num = $user[‘phone_number’]; echo json_encode(array(“from”=>$from, “text”=>$text,”date”=>$date,”num”=>$num)); ?> if you really want the quotes then use ‘ ‘ (singlequotes) instead. And the javascript file. success: function (response) { var success = $.parseJSON(response); $(“.messages-table”).append(“<tr><th>”+success.from+”</th><th>”+success.text+”</th><th>”+success.date+”</th><th>”+success.num+”</th></tr>”); } i … Read more

[Solved] Fetch Json from MySQL in Jquery calender

Depends on the programming language you are using, if you’re using Java/php, create a service method which would get the JSON from the database and return the JSONobject through ajax, and introduce it into the calendar through jquery javascript. i would also recommend you to use full calendar as its very easy to grasp. $(‘#calendar’).fullCalendar({ … Read more

[Solved] Set TextBox as required based upon “selected” value of DropDownList

Add following code in SelectedIndexChanged event in .cs file protected void PositionShift_SelectedIndexChanged(object sender, EventArgs e) { if (PositionShift.SelectedIndex == 1 || PositionShift.SelectedIndex == 3 || PositionShift.SelectedIndex == 5) { RequisitionNumberLabel.Text = “*”; } else { RequisitionNumberLabel.Text = “Requisition Number”; } } Also, set Autopostback property of DropDownList to True. solved Set TextBox as required based … Read more

[Solved] Why is the Touch-Punch plugin not functioning in my website?

So my path to the touch-punch plugin, was incorrect. After finding the correct path to the jquery.ui.touch-punch.min.js file in my CPanel, I changed the path in my code and was able to utilize the touch feature. Also make sure that the type of script is defined. For example: adding the type=text/javascript, was also necessary for … Read more

[Solved] How to unset session on close page

Looks like this is too much server intensive. Something like a Long Polling! Also, PHP Sessions get automatically destroyed when the window is closed. But still if you insist, you can use something like attaching an AJAX Call with the event onbeforeunload this way: $(window).on(‘beforeunload’, function(){ $.getScript(“killsession.php”); }); This gets a JavaScript before the window … Read more

[Solved] How to find my link in an external domain name [closed]

You have to do that on server side e.g. with PHP PHP(checkDomain.php): <?php $string = file_get_contents(‘http://www.shaarzh.com’); //Get external content $reg = ‘/example.com/s’; //Search pattern if(preg_match($reg, $string)){ $array = array(‘response’ => ‘true’); }else{ $array = array(‘response’ => ‘false’); } echo json_encode( array(‘response’=>’false’) ); //Response ?> Now you can call the PHP-script with JavaScript. JavaScript(jQuery): $.ajax({ url: … Read more