Web Development

74K

Solutions

49K

Contributors

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

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

Sign up to Post

Hi Experts,

I am working on an application with Django on the backend and reactjs on the front end.  

The problem I have is whenever I refresh the page a slash is added to the end of the query string.

see for eg,

http://ntdldev.librariesnt.net/uuid/ts5806306a-949e-4a93-8aa6-d7e2c9909a68_2/

when I fetch the page for the first time it is

http://ntdldev.librariesnt.net/uuid/ts5806306a-949e-4a93-8aa6-d7e2c9909a68_2

without a slash at the end, hence it processes the query string and fetches the page I request. whereas when I refresh, it not going through the source, it bypasses debugging it adds a slash at end and the page fails for that query string.

Please help me in resolving this issue.

Any help is highly appreciated.
Thanks
0
Become a CompTIA Certified Healthcare IT Tech
LVL 13
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

I am needing to change the search url after I change the permalink assigned to my products.

I have a permalink situation on my products when I fix the permalink change.  The free version of wordpress search still shows the old url even purging the cache.  By the way, I have changed settings -> permalinks saved it and then put it back to my normal settings and saved it again.  All the while purging the cache.

Here is a screenshot

screenshot of all of the slugs for Skeletal Strength if you look at the last product in the slug I took away the "-8" hoping it would default to the correct slug.  However it still faults to the old content id 3276?.  I thought the normal url was supposed to default to the non appended -[number] option?

FYI I have to have separate sku's for each offer with the vendor I am using thus the reason for the numerous slugs being appended with various numbers.

If you want to look at the one of the products in question it is at
https://www.theherbsplace.com/product/skeletal-strength-p-535-8/

I have several products that have appended -numbers on their slug which is causing the search engine to bring up other product slugs instead of the product that is in stock and available for sale.
0
Hello!

I'm having a problem with this page: https://www.benknier.com/skills.html 

The page used to load and display properly, but within the last couple of weeks it has stopped working altogether. It seems to flash the content and then disappear. All of the other pages on the site work properly and I haven't been able to pinpoint the issue by looking at what's in the console. I've attached a copy of the source code to this post.skills.html

Any help you can give me in getting this working properly will be greatly appreciated!

Thank you in advance.
0
I have a client who needs to determine the size (amount) of data he is uploading on a fillable web page. I know there are sites to determine a website and/or web page size, but how do you determine the size of the data you want to upload?
0
Hello, All.
(For reference, I will be using ASP Classic in this project, however. That should not matter on how you submit the form to the data side.)

OK.
I am using HTML5 Video on my site.
I would like to capture the time the video stops at, and save it to my database.
(The database work I have completed)
What I need to know, is how to save the form, when the video is stopped?

here is a link to the video test page.
https://www.cffcs.com/stuff/VideoTest.asp

Here are the video and form code.
<video width="100%" height="100%" autobuffer controls id="myvideo" src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>
<form name="displayurl" action="data/NewInsert.asp" method="post" onsubmit="xmlhttpPost('data/NewInsert.asp', 'displayurl', 'MotionDiv', '<img src=\'graph/pleasewait.gif\'>'); return false;">
        <input name="offseturl" type="text" readonly="" value="" size="50" onclick="document.displayurl.offseturl.focus();document.displayurl.offseturl.select();"/>
        <input type="hidden" name="Submit" value="Send Video Time" />
        <input type="hidden" name="UID" value="2" />
        <input type="hidden" name="MediaID" value="1" />
      </form>
      <div id="MotionDiv"></div>

Open in new window


On this page, you can view the source.
I added a hidden button to get me a "Name" and "value" to call in the code for inserting the data into the database.

Any assistance on this would be great.
Thanks.
Wayne
0
Hi,
I want to implement mapping functionalities within an Angular 7 project that will include map clusters, polygons, circles etc on a Google Map. I have a PrimeNg Angular Map control and I know that I will need to integrate this with the Google Map SDK in order to handle map clustering as there is nothing in the PrimeNg documentation that describes how PrimeNg does this.

Has anyone done something similar to this before and if so can they point me in the right direction? Or on the other hand are there any open source plugins that will allow an Angular Project to interact with the Google SDK in an Angular way (i.e. without Javascript direct DOM Manipulation but using Angular Binding, Change detection etc).

Thanks
0
How would I check if this element exists on a page using Javascript? The "msgid" is unique.
Element example
Thanks!
1
I need a sort that uses the parent id which is called jk_sku.  I am on 5.1.1 WordPress and 3.5.7 for WooCommerce.  I only need this as an option for sort.  So following two articles on the net.  I put together this code

function jk_add_custom_sku() {
$args = array(
'label' => __( 'Parent ID', 'woocommerce' ),
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ),
'id' => 'jk_sku',
'desc_tip' => true,
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ),
);
woocommerce_wp_text_input( $args );
}
add_action( "woocommerce_product_options_sku", "jk_add_custom_sku" );

function jk_save_custom_sku( $post_id ) {
// grab the custom SKU from $_POST
$custom_sku = isset( $_POST[ 'jk_sku' ] ) ? sanitize_text_field( $_POST[ 'jk_sku' ] ) : '';

// grab the product
$product = wc_get_product( $post_id );

// save the custom SKU using WooCommerce built-in functions
$product->update_meta_data( 'jk_sku', $custom_sku );
$product->save();
}

add_action( "woocommerce_process_product_meta", "jk_save_custom_sku" );
//add_action( "save_post_product", "jk_save_custom_sku" );

####### Custom Sort Option ######################

// 1. Create new product filter
 
add_filter( 'woocommerce_get_catalog_ordering_args', 'bbloomer_sort_by_name_woocommerce_shop' );
 
function bbloomer_sort_by_name_woocommerce_shop( $args ) {
     
    $orderby_value = isset( $_GET['orderby'] ) ? wc_clean( (string) wp_unslash( $_GET['orderby'] ) ) : wc_clean( get_query_var( 'orderby' ) );
   

Open in new window

0
We currently use ASPUpload and DropZonejs  to drag and drop files and then upload them to our server.

We are looking for a compatible script that will ZIP (compress) the files after the user drags and drops them in the "DropZone", and create one zip file which is the one that would be uploaded using ASPUpload.
Any recommendations on a script that would do this?

We need this for ASP Classic and also for NetCore.
0
I need a Javascript function that will take a string and format the string to:

1) Make First Letter of  each word capital
2) Convert "-" to space
3) Introduce a space when any capital letter appears other than the first one

Examples:
check ==> Check
checkInquiry ==> Check Inquiry
checkInquirySystem ==> Check Inquiry System
corporate-payments ==> Corporate Payments
corporate-payments-landing ==> Corporate Payments Landing
1
OWASP: Forgery and Phishing
LVL 13
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Hello Experts,
Any suggetion on this one:
Creating a system to ingest data from websites, e-databases, spreadsheets.

Thanks
0
I would like to setup an e-commerce website for online service, infrastructure services and products to sell.
Maybe I will integrate with Single authentication source like AD if possible.
Any suggestions would be highly appreciated.
Thanks
MAS
0
Hi everybody.
So I have the following directory structure:

webroot
 - admin
     - vendor
         - myPackage
             - MyClasses1
                 -  MyFirstClass.php
             - MyClasses2
         - autoload.php
     - composer.json
 - css
 - js
 - vendor
 - composer.json
 - index.php
 

This is my composer.json in admin directory:
{
    "require": {
        "paypal/rest-api-sdk-php": "1.13",
        "stripe/stripe-php": "^6.31",
        "twig/twig": "^2.0"
    },
    "autoload": {
        "psr-4": {
            "MyPackage\\": "./admin/vendor/MyPackage/MyClasses1"
        }        
    }
}

Open in new window


And this is my composer.json in webroot:
{
    "autoload": {
        "psr-4": {
            "MyPackage\\": "./admin/vendor/MyPackage/MyClasses1"
        }        
    }
}

Open in new window


In MyFirstClass.php I have
namespace MyClasses1;
require __DIR__ . '/../../autoload.php';

Open in new window

In my index.php I have:
require $_SERVER['DOCUMENT_ROOT'] . '/admin/vendor/autoload.php';
use MyPackage\MyClasses1\MyFirstClass;
$MyObject = new MyFirstClass();

Open in new window

But something is wrong and I'm bit lost. I get the error
Uncaught Error: Class 'MyPackage\MyClasses1\MyFirstClass' not found

And I relize that I have even the problem to use Stripe and Paypal essentially in website's pages so I nned to include them someway in my autoload...
Okay, totally lost.

My main problem is that I would like to have my custom CMS ready to add or not some module and once I add a module I would just add some lines to the composer.json for the website where the admin directory with my CMS is.

Please, reveal my certainly stupid mistake because I can't guess it...

Thank you in advance for any help.
0
I ran a web app on a EC2 instance, which is using port 3003. But it  cannot be accessed from external network

With logged in with SSH, I curled 'localhost:3003', then response returned as expected.

WAF: Mojolicious
App start command: morbo "http://*:3003" myapp.pl

This is obviously insufficient configuration on web server, but I don't know how.

I am grateful if you could advise me.
0
Using JavaScript only, How would I get the values of Premier Checking, Choice Money Market Savings and Classic Savings if these are in the page? There will always be at least one value and up to 3 possibly.  The ID for the spans will always end in ProductLabelForDepositAppId
<span id="j_id14:0:ProductLabelForDepositAppId" style="font-weight:bold;">Premier Checking</span>

<span id="j_id14:1:ProductLabelForDepositAppId" style="font-weight:bold;">Choice Money Market Savings</span>


<span id="j_id14:2:ProductLabelForDepositAppId" style="font-weight:bold;">Classic Savings</span>

Open in new window

Thanks!
0
Hello,
Any suggestion on how to go about:
Web-scraping and data processing solutions

Thanks
0
I set up catpcha ver2 on my contact form.

When I tested, I see that it doesn't work in Windows Safari 5.1(which seems to be the latest version available for windows)
I get an error message can not connect to captcha server.

When I tried updating to ver3. I am still getting the same error in safari, can not connect to captcha.

Any other ideas how I can get around this?
0
I'm trying to create a table with an index named 'by_sub_account_classification_code'.
Due to long default index name i got 'index name too long' error. So I tried to name the index with 'name' option , but somehow it does not work. Do you know what is wrong with this migration code?

Any advised would be very appreciated.

Rails version: 5.2.1

Terminal:
$ bundle exec rails db:migrate
== 20190403020630 CreateSubAccountClassificationCodes: migrating ==============
-- create_table(:sub_account_classification_codes)
rails aborted!
StandardError: An error has occurred, all later migrations canceled:

Index name 'index_sub_account_classification_codes_on_account_classification_code_id' on table 'sub_account_classification_codes' is too long; the limit is 64 characters

Open in new window


Code:
class CreateSubAccountClassificationCodes < ActiveRecord::Migration[5.2]
  def change
    create_table :sub_account_classification_codes do |t|
      t.integer :sub_account_classification_code, null: false
      t.references :account_classification_code, foreign_key: true
      t.string :description, null: false

      t.timestamps
    end

    # Name cannot be specified. don't know why. Fix in future.
    add_index :sub_account_classification_codes, :sub_account_classification_code, :name => 'by_sub_account_classification_code'
  end
end

Open in new window

0
Is there any HTML and CSS layout template that I can follow to start building my website ?

Thx.
1
OWASP Proactive Controls
LVL 13
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Hello, All.

I am trying to make the HTML5 Video, to load Fullscreen on Page Load.
Here is the script I am using.

https://www.thecssninja.com/javascript/fullscreen

It fires on a Button Click.
I tried to add a click event to the body load,
<body onload="click()">
But that of course, did not work.

Could someone please assist on this one?
Thanks.
Code for JS below.
<script>
		(function(window, document){
			var $ = function(selector,context){return(context||document).querySelector(selector)};
			
			var video  = $("video"),
				iframe = $("iframe"),
				domPrefixes = 'Webkit Moz O ms Khtml'.split(' ');
				
			var fullscreen = function(elem) {
				var prefix;
				// Mozilla and webkit intialise fullscreen slightly differently
				for ( var i = -1, len = domPrefixes.length; ++i < len; ) {
		          prefix = domPrefixes[i].toLowerCase();
				  
				  if ( elem[prefix + 'EnterFullScreen'] ) {
		            // Webkit uses EnterFullScreen for video
					return prefix + 'EnterFullScreen';
					break;
		          } else if( elem[prefix + 'RequestFullScreen'] ) {
					// Mozilla uses RequestFullScreen for all elements and webkit uses it for non video elements
					return prefix + 'RequestFullScreen';
					break;
				  }
		        }
		
				return false;
			};
			
			// Will return fullscreen method as a string if supported e.g. "mozRequestFullScreen" || false;
			var fullscreenvideo = fullscreen(document.createElement("video"));
			
			// Webkit uses 

Open in new window

0
How do I detect if this exists? I need to check if mainSourceIncomeRadio exists?
mainSourceIncomeRadio = document.querySelectorAll('[name="INCOME_INFO-appRequest_primary_income_incomeSource_incomeSourceType"]');

Open in new window


Is this correct?
var radioExists = !!document.querySelectorAll('[name="INCOME_INFO-appRequest_primary_income_incomeSource_incomeSourceType"]').lenght;

Open in new window


Thanks!
1
Hi, Please see: http://dev.magickitchen.com/mel150-v2/org-index.html - You can use user name: mel and password: mel. We’re putting the video into the slideshow space.

That is a 640x360 video.  The people making a video for that space are going to send a 1920x1080 size.  I am asking for a sample.  Is it possible to figure out what size video would best fit into that space?
0
Hi Folks,
So a couple of my websites on my domain are getting flagged for phishing on virustotal.com. I need to go through the delisting process and cannot find where I should do that. This is happening with AegisLab WebGuard and CyRadar specifically. Can anyone point me toward the resource to do that?
0
Using a browser to read a html page, but the browser wraps the html page in <pre> tags?

I am trying to get the status of a service, and I have the service returning the status as an html page on port 10001.
Works, but the page shows like the browser wrapped the page in <pre> tags and I see the raw tags of the html page instead of  how it was intended to be rendered.

Why would the browser do this ?  tested w/IE and FF, both show the raw page.

Thank you.
0
I have a small website that only will
get about 5 customer CHATS per day.
  ** running WordPress
  ** hosted on my own LINUX box at my home
  ** also running WooCommerce at some point

What "website chat software" do you recommend so I can have a
POPUP appear the minute a potential customer visits the homepage,
displaying "Away Now, Leave a Message" if I mark the system as OFF-LINE ?
  ** cost under $500/yr or $2,000 one-time
0

Web Development

74K

Solutions

49K

Contributors

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.