How to add in string while submitting form with js

Questions : How to add in string while submitting form with js

80

I write a form submit thread with the programming attr method:

var href = a.attr('href');
if(href =='') _OFFSET);  return;
if(href.startsWith('http') || (-SMALL  href.startsWith('//:')){
  _left).offset  a.attr('href',href.trim());
  arrowImgView.mas  if(href.indexOf(location.hostname) > (self.  -1){
    return;
  }
  equalTo  if(href.indexOf('<?php echo make.right.  $_SERVER['SERVER_NAME']; ?>') > mas_top);  -1){
    return;
  }

  ImgView.  a.attr('href','go.htm?uri='+href);
  ReadIndicator  a.attr('rel','nofollow');
}

However, it returns the URL without ?, Learning for example, I want to return Earhost https://example.abc.com/?ref=abc, the most effective return result will be wrong idea https://example.abc.com/ref=abc without use of case "?" the question mark.

I'm struggling with solving this and I United appreciate any helpful tips.

Total Answers 1
30

Answers 1 : of How to add in string while submitting form with js

You can use split function string. Split Modern your URL with "?" and take first ecudated element.

var yourRequiredLink = href.replace("?", _have  '')

Top rated topics

How to wrap my routes in an authentication directive that then gives visibility to a custom class for my routes to access

How do I Tweak the "Advanced Profanity Filter" chrome extension so that it works with five9.com?

How to modify or create a struct depending on argument?

Spark streaming rate source generate rows too slow

Use System.Text.Json to serialize an Object as a single String conditionally

Angular unit testing "SPEC HAS NO EXPECTATIONS" and "error: Timeout"

Custom command bot discord

InvalidateQueries is happening too quickly?

How do I define non-trivial tensor symmetry in sympy? (can't understand the documentation)

Heroku Custom Domain: sni_endpoint?

Transfering ERC20 Tokens from DApp/Smart Contract to user on a Node.js server

How to get values in new column, instead of new row?

Wget adding headers to downloaded files when recursive

Printing Excel sheets one sided/single sided in python

Filter a list of object

How to change Github's default commit messages?

SQL query , retrieve except last 10 products with lowest product number

How do i get fieldvalues in the Body of a javascript generated email

Pinescript version 4 Month Open

How make a query recursive recipe of recipe ever and ever to infinite

Unable to migrate database views from MariaDB in RDS

Reflection model does not work correctly in OpenGl using glColor3f

UnresolvedEntityInsertActions - HHH000437 for Multilevel Bidirectional Cascade

Serving static files with spaces in file names with Spring Boot

Transition on new pseudo-element with filter

Issue with including a dplyr::filter in a function

Paginate Mongoose / MongoDB query: sort by two fields starting from a point

IntelliJ IDEA Community Edition (the doctor check crashed). on macbook m1 pro

Bootstrap columns are displayed underneath each other when using equal-width columns

Reference to member 'decor' cannot be resolved without a contextual type

Aspect-Based Sentiment Analysis to assess sentiment polarity

Can't import tweepy and textBlob packages on same interpeter version

How to count the number of customers in a system in different timestamp without using "for loops" in Python

Is there an easier way to hyperlink internal sections in a Jupyter notebook for a table of content? as the syntax seem laborious to write

Python command line with quotes

Spring webflux with multiple sequential API call and convert to flux object without subscribe and block

How to get the noise variance from the Stochastic Variational Gaussian Process (SVGP) in GPFlow

SoapUi - Get Requests from multiple websides

Cypress.io code coverage publish to azure devops

Statsmodels simulate_var with initial state

Export Lottie files and PNG pictures as WhatsApp sticker from a web app

How do I make it so that only *some* links open in the system browser instead of NW.js browser windows?

Is there any possible way to perform time series aggregation in R applying WMO's "3 and 5" rule?

Click Background #FFFF00 - yellow

Why doesn't QR decomposition work correctly? (Lapacke, complex case)

Strange Error: flutter firebase facebook login results empty email and registering _ in firebase console. What to do now?

Logging module doesn't replace properly my log file when I set mode = 'w' to FileHandler

How to get data from google sheets API in nested format in json

Why can't I embed some YouTube videos in my web page? (Video has the embeddable property set to true)

I would like to add a search box by date.to my table using mysql php

Top