Forum Discussion

AdisKljajic's avatar
AdisKljajic
Qrew Trainee
4 years ago

URL Encode Javascript

Hello,

I am trying to Encode a Text Field within a javascript function. 
The way I have it, it breaks the URL after any special character so its messing up my query.
If anyone has any experience with this please feel free to comment and assist. 


Thank You. 

var span_val = $("span#FIELD_TO_ENCODE").html();
var url = "";         
       url += "https://rxnb.quickbase.com/db/bqk9ep9fj";             
       url += "?act=API_AddRecord";             
       url += "&apptoken="+qbAppToken;             
       url += "&_fid_7=URLEncode("+span_val;                       
       url += "&_fid_6="+ order_ID;  



------------------------------
Adis Kljajic
------------------------------

1 Reply

  • Hi Adis,

    Taking a look at the formula you pasted here I see your URLEncode doesn't have a closing parenthesis, does the formula you are using have the closing parenthesis where it is in your script? If it doesn't if you close the URL encode do you still run into issues?

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------