JavaScript

120K

Solutions

41K

Contributors

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and  in almost every mainstream web browser.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi experts, I wish to put some colspan in a table created from server side as a response of a certain request. My code below is trying to implement such thing but it does not work. Any help please!

         response.write("<tr>")
            response.write("<th style="" width: 170px; color: black; padding: 1px; text-align: center; colspan: 2; "">" & "Date executed" & "</th>")
            
            
            response.write("<th style=""width: 130px; padding: 3px; color: black; "">" & "Notes" & "</th>")

         response.write("</tr>")

Open in new window

0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I am in development of Delivery Challan Module., @ which i got struck is

when i enter my invoice_no(in textbox) it should fetch datas from db and displays. This is what i was looking for.,
whereas in this i use two tables invoiceinfo & invoice_details

i have already got infos from invoiceinfo(table) which means when i enter the invoice_no it will fetch some details such like customer details etc.,

but @invoice_details alone i cant get details.,

actually i had interconnected both  invoiceinfo & invoice_details for delete & update purposes!

I used this code but doesnt works


$select_productdetail_query = "SELECT * FROM invoice_details WHERE invoiceinfo_id='".$_REQUEST['invoice_no']."'";

$productdetail_query_result = mysqli_query($connection, $select_productdetail_query);      

while($productdetailview = mysqli_fetch_array($productdetail_query_result)){
<?php //echo $productdetailview['product_code']; ?>
                                                 <td><strong><small><?php echo $productdetailview['product_code']; ?></strong></small> </td>
                                 <td style="text-align:left;"><strong><small><?php echo $productdetailview['product_name']; ?></strong></small></td>
                                                 <td><strong><small><?php echo $productdetailview['product_quantity']; ?></strong></small></td>
                                                 <td><strong><small><?php echo $productdetailview['product_price']; ?></strong></small></td>
                                 <td><strong><small><?php echo $productdetailview['total_price']; …
0
Hi there,
I need to create a website for a charity and am looking for suggestions on existing frameworks to use.  The system should
support  users to register and login through a web portal.  

The basic operations is that the admin will add a list of activities in a main List.  A user can check-out these activities from the main list or the admin can assign an activity to a member.

1. User registration mechanism
2. Admin dashboard/user dashboard

I am looking for a PHP/Javascript - MySQL based system.  Can you suggest any frameworks that I can customize easily.
Thank you
0
I just tried to zoom in and the right hand side "hero board" overlapped 1/2 of the screen, making the main area completely inaccessible.

Not only main area of the site is illegible, even scroll bar is available,

Any chance at the least to get a horizontal scroll bar "in"?
0
I had this question after viewing asp.net repeater modal & data command.
0
What is the best method to get SharePoint list items from Office Web Addin using the credentials of the logon user?

We have migrated to Office 365, I am not sure whether i must authenticate on AD or Office 365, the Office Addin App will be deployed on SharePoint on Premise

I have tried rest services but I am not sure of how to pass the user token, for authentication.

   function GetSharePointListItems() {
        $.ajax({
            url: "weburl/_api/web/lists/getbytitle('listname')/Items?$select=Title,ParagraphText&$filter=ParagraphText isnotnull ",
            type: "GET",
            Authorization: {"Bearer " + accessToken},
             headers: { "accept": "application/json;odata=verbose" },
            success: function (data) {
                if (data.d.results) {
                       OnSuccessSharePointData();
                }
            },
            error: function (xhr) {
                alert(xhr.status + ': ' + xhr.statusText);
                OnErrorSharePointData();

            }
        });
any ides
0
This is my main.html codeThis is my main.html codeThis is my insert.php codeAnd this is the error which always arises whenver i use localhostHi There I have been getting this issue lately. I don't know where this error come from. Whenever I use my localhost(Obviously i need it for my php files to run) this error arises in console

Error in response to storage.get: SyntaxError: Unexpected token <
    at Object.callback (chrome-extension://nkeimhogjdpnpccoofpliimaahmaaome/js/content.js:1:50)
    at chrome-extension://nkeimhogjdpnpccoofpliimaahmaaome/js/content.js:1:22

This error occurs for all files which i open using localhost.But when I used without localhost ie simply open the html file it works just fine.
Currently I'm learning Angular.js
Here I want to insert data in database using ANGULAR & PHP
0
Need to prevent google developer tools explore my page, is any way to achive that,
dont want to see my html page code and nothing
regards dear experts
0
Hi all,

I'm trying to create a Google Sheet that will automatically create Home/Away game matchups given some user-provided parameters:

Total teams: 8 (Lions, Tigers, Bears, ...). This number can vary.
Total games played per team: 10 (5 Home / 5 Away if possible. This number can vary.

I need the best possible diversity in terms of matchups.

I'm hoping the Google Sheet can kick out a simple columnar schedule like the following.

 Screen Grab
Can this be done without Javascript?

Thanks in advance.
0
Hi all,

I'm trying to convert an Excel macro to work in Google Sheets. I have neither Excel VBA nor Javascript skills, so I'm hoping someone can help.

Here is the original Excel macro code:

===========================
Sub RoundRobin()
    Dim x, y, Counted, Number
    Set wsSheet3 = ThisWorkbook.Worksheets("Sheet1")
   
    Number = wsSheet3.Range("B2").Value
    x = wsSheet3.Range("A" & Rows.Count).End(xlUp).Row
    For Each c In wsSheet3.Range(wsSheet3.Range("A2"), wsSheet3.Range("A" & Rows.Count).End(xlUp))
        Counted = 1
        y = wsSheet3.Range("D" & Rows.Count).End(xlUp).Row
        For i = 2 To x Step 1
            If c.Value <> wsSheet3.Range("A" & i).Value And Counted <= Number / 2 Then
                wsSheet3.Range("D" & y + Counted).Value = c.Value
                wsSheet3.Range("E" & y + Counted).Value = wsSheet3.Range("A" & i).Value
                Counted = Counted + 1
            ElseIf c.Value <> wsSheet3.Range("A" & i).Value And Counted <= Number Then
                wsSheet3.Range("E" & y + Counted).Value = c.Value
                wsSheet3.Range("D" & y + Counted).Value = wsSheet3.Range("A" & i).Value
                Counted = Counted + 1
            End If
        Next i
    Next
End Sub
===========================

I need to convert that to Javacript that can be fired off in Google Sheets. Can someone help?

Thanks in advance.
0
Get 15 Days FREE Full-Featured Trial
LVL 1
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Perhaps I am over-thinking this but what I need to do is see what the time difference it is from the start session time (1 minute) subtracting the current time.
<script type="text/javascript">
var mySessionTimer;

@functions {        
    public int PopupShowDelay
    {
        get {
            DateTime currentSetTimeout = DateTime.Now.AddMinutes(HttpContext.Current.Session.Timeout);
            DateTime currentServerTime = DateTime.Now;
            TimeSpan duration = (currentServerTime.Subtract(currentSetTimeout));

            return 60000 * (int)duration.TotalMinutes;
        }
    }
}

function callJSSessionTimer() {
    var sessionTimeoutWarning = @PopupShowDelay;
    var sTimeout = parseInt(sessionTimeoutWarning);

    mySessionTimer = setTimeout('SessionEnd()', sTimeout);
}

function SessionEnd() {
    clearTimeout(mySessionTimer);
    window.location = "/Account/sessionover";
}

@if (userInfo != null)
{
    if (userInfo.chosenAMT == "True")
    {
        @:callJSSessionTimer();
    } else
    {
        @:clearTimeout(mySessionTimer);
    }
} else {
    @:clearTimeout(mySessionTimer);
}
</script>

Open in new window

So for the value for duration is -00:01:00 which technically is correct since currentSetTimeout is 1 minute and it gets todays date/time which is a minute away since its subtracting it fromcurrentSetTimeout.

So the point of all of this is to keep track of the remaining session time when the user jumps from page to page. Currently when the user goes to another page, it resets the time and its not accurate.

How can I go about doing this the way I need it?
0
Hi all, I need to start an aspx page with a modal window if a codebehind query condition is true,
how to achive that dear experts!!!
0
I am trying to convert an @Html.Textbox image button to a submit button with  the onclick calling a Javascript function.

Here's what I have:
@Html.TextBox("Next", null, new {type = "image", src = @Url.Content("../App_Themes/icons/button_next.png"), @class = "imgbottom", onclick = "javascript: ValidateSelection ($(\"[name$='selectedItems']:checked\"))"})

Here's what I've tried:
<input type="button" value="Next" onclick="ValidateSelection (selectedItems.checked)">

and my Javascript function:
function ValidateSelection(item) {
    if (item == null || item.length == 0) {

        var validationSummary = $('.validation-summary-errors ul');
        if (validationSummary.length > 0 && $('.validation-summary-errors ul li').length == 0) {
            validationSummary.append('<li>' + "Please select at least one item" + '</li>');
        }
        var errors = $("[name='ErrorMessage']");
        if (errors.length > 0) {
            errors.hide();
        }
        var buttonGenerateReport = $("#GenerateReport");
        if (buttonGenerateReport.length > 0) {
            buttonGenerateReport.hide();
        }
        event.preventDefault();
    }
}
0
Hi,

Am newbie to wordpress,I need to Attached image in the portofolio page Show Slider in Single page Content using Nice Portofolio plugin.Is Working good category Wise Once Clicked that category Attached images show slider.Please give me solution for my Problem.
I need to use Slider using Jquery.Is it possible to Show Slider using Js inside Nice Portofolio Plugin.
0
Hi,
To map within the following, we double-click the map area to increase its size. What is the way to "decrease" it (for showing more area)?

http://my-friend.co/RegRec2/?id=18&user_abbr=mc2&readonly=y
0
I have a table with Babies as rows.

In each row, user needs to select
  Gender (DropDownList, Male/Femal)
  then select baby Name (DropDownList)

But user cannot repeat the same selection/combo select in a different row.

How can I prevent the duplicate select options. If I use disable option, then the values do not POST to server.

__________
<tbody id="TS">
 <tr class="rowCss">        //ROW 1

<td>
  <span class="project">
    <select class="form-control projectcodeid" id="Records_0__SelectedProjectFromList" name="Records[0].SelectedProjectFromList">
      <option value="">Male</option>
      <option value="1">Female</option>
      <option value="2">Male</option>
    </select>
  </span>
</td>
<td>
  <input type="hidden" name="Records.Index" value="0">
    <span class="billingcodeCss">
      <select class="form-control timecodeDdlId" id="Records_0__SelectedBillingCodesFromList" name="Records[0].SelectedBillingCodesFromList">
        <option value="">John</option>
        <option selected="selected" value="5">Sam </option>
        <option value="6">Mel       </option>
      </select>
    </span>
  </td>
</tr>
<tr class="rowCss"> //ROW 2

  <td>
    <span class="project">
      <select class="form-control projectcodeid" id="Records_0__SelectedProjectFromList" name="Records[0].SelectedProjectFromList">
        <option value="">Female</option>
        <option value="1">Male</option>
        <option value="2">Female</option>
      </select>
    </span>

Open in new window

0
I am very new to programming js, and am trying to just replicate an example found here:

https://github.com/nicolaskruchten/pivottable

The particular example is:
https://pivottable.js.org/examples/simple.html

Even though they provide the exact js code for the function, I don't understand what the full html code would look like (including where to place the js code, and how to call the function so that the table appears).

Thanks for any help.  I'm stuck at step 1 :-(
0
I am trying to add required field validator to a textbox which is in modal popup the checkbox below the textbox disppear, I tried to put validation though javascript also but it is not working please help

Let me show u the screenshot what i am trying to say

RequiredModal.png
Below is my modal popup in which the textbox is present

but when i am trying to add the validator,  the modal popup loads on a page along with the validator. it show below screenshot

AfterRequiredAdd.png

I have tried the validation using javascript code also but not working

Here is my code:-

<div class="modal-body">
                        <p>Some text in the modal.</p>
                      <asp:TextBox ID="txtStandType" runat="server" name="StandType"></asp:TextBox>
                        <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtStandType"></asp:RequiredFieldValidator>--%>
                        <br />
                        <asp:CheckBoxList ID="chkFormNamesAdd" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                     
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="btnAddStandTypeModal" runat="server" Text="Save" Style="float: left" OnClick="btnAddStandTypeModal_Click" />
                        <button type="button" class="btn 

Open in new window

0
I have 3 tabs inside my Project and i have query which i have described in my attachment
ActiveTab.docx
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

hi all
is any way to redirect to the main page after timeout is expired

 <sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="60" >

Open in new window


regards!
0
I am building a SharePoint site and need some reporting/charting capabilities.  I have activated MS Chart which seems ok, and may be usable.  But it as many options and I have not found anything but the simplest of examples and no complete User Guide.

Any suggested (shareware preferably) alternatives would be greatly appreciated.
0
I have some cluster warnings after running the cluster validation wizard in my test environment on Virtual box Environment.
I have 2 Server (SQL-E and SQL-F) and 1 Domain Controller Server I should able to ping each other:
node1 -
10.10.10.50

node 2
10.10.10.60

both nodes connected to DC server(10.10.10.10 = iscsi target which is Domain controller Server)
When I validate to create the cluster. Now i receive 2 warning:
validate ip configuration
validate network communication
Going to "validate ip configuration" i see on both nodes a Local Area Connection 11 with an APIPA 169 address but looking on both servers i don't see this Local Area Connection 11 in network sharing center.
QUESTION1: How do i solve the below Error?
Going to "validate network communication" i see the warning below:
--node1 and node2 are connected by one or more communication paths that use disabled network. These paths will not be used for cluster communication and will be ignored. This is because interfaces on these networks are connected to an iscsi target. Consider adding additional network to the cluster, or change the role of on or more cluster networks after the cluster has been created to ensure redundancy of cluster communication.
--the communication path between network interface node1-nic1 and network interface node2-nic1 is on a disabled network.

This is driving me mad and I tried to ping back and forth with all servers. i should be able to reach. I do not have any clue to …
0
I'm helping a friend with their WP site and I'm using Presstiger's Simple Job Board plugin. I'm getting the following output errors thrown when after pressing the SUBMIT button:

errors
Any help from the community would be great.

thank you.
errors.png
0
Hi,

I have attached my Sharepoint List structure and I would like to know if someone can help me build charts using SP javascript object model and a javascript library such as D3 or any other graphical library.

I would like to build a Graph that will help me derive insights for each product line. I would like to filter data by product line. the values entered by each user is a rating between (1-5) for each of the questions:

-Likelihood of success in business
-Right Primary Strategy
-differentiated product in the market
-Invest (here the rating is (same/ more / less)

Note: We can call SharePoint data using REST url and data is returned in JSON format.

Please help,
Book2.xlsx
0
Hi

In my call to API using AJAX, I get the response in HTTP Status code as shown below.

response.png
In my code, when I get any status code that starts with 4 it goes into error function. Is there a way in error function to identify the value sent back in response? So that, i can display different error message for different status code.

I did try adding this below code,

          statusCode: {
            202: function() {
              $formRoot.find('.form-validation .message').html(successMsg);
              $formRoot.find('.email-link-form').hide();
              $formRoot.find('.form-validation').show();
            },
            429: function() {
              showResult(validationError.tooMany);
           },
            422: function() {
              showResult(validationError.contact);
           },
            404: function() {
              alert ('404 error');
           }
         }

but this doesnt even get called.

any help appreciated.

Thanks.
0

JavaScript

120K

Solutions

41K

Contributors

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and  in almost every mainstream web browser.