appending a user’s input information

Skip to first unread message

Feb 6, 2017, 7:36:32 PM2/6/17
to Google Web Designer beta
Pretty simple what I am trying to do. I am trying to take the value of a users input information and add it to a URL string. Now to my understanding I should use the `Enabler.exitQueryString()` method. This is what I am doing. However, I am receiving an error in regards to the instantiated Enabler class.

The error: Uncaught TypeError: Cannot read property 'indexOf' of undefined

Here is the code that I have:

var exitBtn = document.getElementById("button");

function zipExitHandler() {
var zipCode = document.getElementById("zipcode").value;
Enabler.exitQueryString("", "zipcode=" + zipCode);

exitBtn.addEventListener('click', zipExitHandler, false);

This is most likely an issue with trying to access the `exitQueryString` method on Enabler class.. Any ideas as to why I would be getting an indexOf undefined error?

Reply all
Reply to author
0 new messages