Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1003939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:03:19+00:00 2026-05-16T08:03:19+00:00

I have tried some tips I was given on regards URL encoding but I

  • 0

I have tried some tips I was given on regards URL encoding but I have no success so far. First, I was given this format,

var url = "http://www.polyvore.com/cgi/add?title=" 
      + encodeURIComponent(%%GLOBAL_ProductName%%) 
      + "&url=" + encodeURIComponent("http://lilaboutique.co.uk/products/" 
          + encodeURIComponent(%%GLOBAL_ProductName%%) 
          + "&imgurl=" + encodeURIComponent(%%GLOBAL_ThumbImageURL%%) 
          + "&desc=" + encodeURIComponent(%%GLOBAL_ProductDesc%%) 
          + "&price=" + encodeURIComponent(%%GLOBAL_ProductPrice%%));

which never got to be passed to the href dunno for what reason. Then I played with it some more,

var url = "http://www.polyvore.com/cgi/add?title=encodeURIComponent(%%GLOBAL_ProductName%%)&url=http://lilaboutique.co.uk/products/encodeURIComponent(%%GLOBAL_ProductName%%)&imgurl=encodeURIComponent(%%GLOBAL_ThumbImageURL%%)&desc=encodeURIComponent(%%GLOBAL_ProductDesc%%)&price=encodeURIComponent(%%GLOBAL_ProductPrice%%)";

this time the URL was passed but the values were mixed between the appropriate and other fields displaying the encoding function itself.

Any help clarifying my mistakes is greatly appreciated. I would like to encode just price and description, seems to be the fields giving problems.

A regular link does render without problems

var url = "www.google.com";

var myAnchor = document.getElementById('myAnchor');

myAnchor.href = url;

Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:03:20+00:00Added an answer on May 16, 2026 at 8:03 am

    Nicer, cleaner way of doing this:

    var toEncode = {
      title:    '%%GLOBAL_ProductName%%',
      url:      'http://lilaboutique.co.uk/products/%%GLOBAL_ProductName%%',
      imgurl:   '%%GLOBAL_ThumbImageURL%%',
      desc:     '%%GLOBAL_ProductDesc%%',
      price:    '%%GLOBAL_ProductPrice%%'
    };
    
    var index, queryString = '';
    
    for (index in toEncode)
    {
      queryString += index + '=' + encodeURIComponent(toEncode[index]) + '&';
    }
    
    var url = "http://www.polyvore.com/cgi/add?" + queryString;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm coding some c# against Active Directory and have tried endlessly to get this
I have tried this... Dim myMatches As String() = System.Text.RegularExpressions.Regex.Split(postRow.Item(Post), \b\#\b) But it is
I am very interested in streaming data for web-applications. I have tried out some
I have tried to use some of the widgets in JQuery UI on an
I have tried to integrate the Picasa API on iPhone, compiles fine, but I
I have an application which tries to load some expected registry settings within its
I have some update or something that tries to run every night, and ends
I have tried <ul id=contact_list> <li id=phone>Local 604-555-5555</li> <li id=i18l_phone>Toll-Free 1-800-555-5555</li> </ul> with #contact_list
I have tried what seems like everything - I've done similiar things many times
I have tried the following two statements: SELECT col FROM db.tbl WHERE col (LIKE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.