javascript code

can anyone please interpret those lines:

thanks in advance;
location.href = 'pag~;

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

can we know what you are trying to do with this? please through some more light on your query
Dushyant SharmaCommented:
That is incorrect syntax.
First line
location.href = 'pag~;

has an error "unterminated string literal". now even if you complete it as 'pag~'; it will change the url of the page to pag~ so that page will reload and rest of the lines will not be executed.

line 2

Open in new window

replaces all occurrence of header in the given string, but it will not store results anywhere so the replace will have no effect. it should be something like
var tmp=ctrl[i].id.replace(/header/g,'')

Open in new window

line 3

will change the location (url) to the given string (which is not looking like a proper url or parameters)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.