Window.open - Javascript help
-
Hello, I have code like window.open(strurl, strwinName) where strWinName's value is coming from database. User can enter value like [ABC]0001, ABC^001, if these value is assigning to strWinName then in Internet explorer getting error like 'Invalid arguments', but this works fine in firefox. Here problem in windows name, if we have any special characters like [,] or ^ then it is throwing error, How can I escape these characters any work around is appreciated.
Thanks & Regards, Kumar
-
Hello, I have code like window.open(strurl, strwinName) where strWinName's value is coming from database. User can enter value like [ABC]0001, ABC^001, if these value is assigning to strWinName then in Internet explorer getting error like 'Invalid arguments', but this works fine in firefox. Here problem in windows name, if we have any special characters like [,] or ^ then it is throwing error, How can I escape these characters any work around is appreciated.
Thanks & Regards, Kumar
How is this a work or training issue? Apart from the obvious - that you need more training to accomplish this. Anyways - as we're here, if you're coding in .NET you could use HttpServerUtility.HtmlEncode. In Javascript, you can use escape on the string, i.e.
escape(url)
.Deja View - the feeling that you've seen this post before.
-
How is this a work or training issue? Apart from the obvious - that you need more training to accomplish this. Anyways - as we're here, if you're coding in .NET you could use HttpServerUtility.HtmlEncode. In Javascript, you can use escape on the string, i.e.
escape(url)
.Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
How is this a work or training issue? Apart from the obvious - that you need more training to accomplish this.
Training is overrated, isn't it? I thought it was optional. :)
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]
-
Pete O`Hanlon wrote:
How is this a work or training issue? Apart from the obvious - that you need more training to accomplish this.
Training is overrated, isn't it? I thought it was optional. :)
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]
Scott Dorman wrote:
Training is overrated,
I far prefer to just wing it and cover my tracks with generous helpings of bad attitude and strong opinions.
Deja View - the feeling that you've seen this post before.
-
How is this a work or training issue? Apart from the obvious - that you need more training to accomplish this. Anyways - as we're here, if you're coding in .NET you could use HttpServerUtility.HtmlEncode. In Javascript, you can use escape on the string, i.e.
escape(url)
.Deja View - the feeling that you've seen this post before.
Hello, Thank you for your reply. This is a work issue. javascript escape function was also throwing error. HtmlEncode I will check.
Thanks & Regards, Kumar
-
Hello, Thank you for your reply. This is a work issue. javascript escape function was also throwing error. HtmlEncode I will check.
Thanks & Regards, Kumar
This forum is generally for non-programming related work and training issues. From the forum description: Talk about work issues, get tips on resume writing or discussion certification programs.
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]
-
Hello, I have code like window.open(strurl, strwinName) where strWinName's value is coming from database. User can enter value like [ABC]0001, ABC^001, if these value is assigning to strWinName then in Internet explorer getting error like 'Invalid arguments', but this works fine in firefox. Here problem in windows name, if we have any special characters like [,] or ^ then it is throwing error, How can I escape these characters any work around is appreciated.
Thanks & Regards, Kumar
What does this have to do with work and training issues? You are in the wrong forum.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer