Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #7399

Re: String Replace. Please, need help.

Message-ID <9922755.oyzYreSCDY@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2011-10-14 21:01 +0200
Subject Re: String Replace. Please, need help.
Newsgroups comp.lang.javascript
References <11174912.1946.1318534920723.JavaMail.geo-discussion-forums@vbmh5> <4e97e81e$0$2518$e4fe514c@news2.news.xs4all.nl>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


Tom de Neef wrote:

> "Shapper." <mdmoura@gmail.com> schreef […],
>> I am using "replace" as follows:
>> content = source.replace("{id}", options.id).replace("{title}", title);
>> However "source" might have or not have the strings "{id}" and "{title}".
>> When it does not have I get an error.
> 
> Long shot: is title defined? or should it be options.title ?

The `title' identifier would be resolved, or fail to be resolved, in any 
case.  The problem must be elsewhere, like a non-standard replace() method.  
And who knows what `source' refers to …


PointedEars
-- 
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

String Replace. Please, need help. "Shapper." <mdmoura@gmail.com> - 2011-10-13 12:42 -0700
  Re: String Replace. Please, need help. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-10-13 21:17 +0000
  Re: String Replace. Please, need help. "Tom de Neef" <tdeneef@qolor.nl> - 2011-10-14 09:43 +0200
    Re: String Replace. Please, need help. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-14 21:01 +0200
  Re: String Replace. Please, need help. Dr J R Stockton <reply1141@merlyn.demon.co.uk> - 2011-10-14 21:02 +0100
    Re: String Replace. Please, need help. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-10-15 09:32 +0000
      Re: String Replace. Please, need help. Luuk <Luuk@invalid.lan> - 2011-10-15 11:47 +0200
        Re: String Replace. Please, need help. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-10-15 10:04 +0000
          Re: String Replace. Please, need help. Luuk <Luuk@invalid.lan> - 2011-10-15 12:14 +0200
            Re: String Replace. Please, need help. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-10-15 12:21 +0000
              Re: String Replace. Please, need help. Andreas Bergmaier <andber93@web.de> - 2011-10-15 22:49 +0200
                Re: String Replace. Please, need help. Antony Scriven <adscriven@gmail.com> - 2011-10-15 15:37 -0700
                Re: String Replace. Please, need help. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-16 01:08 +0200
      Re: String Replace. Please, need help. Dr J R Stockton <reply1141@merlyn.demon.co.uk> - 2011-10-16 19:30 +0100
  Re: String Replace. Please, need help. Bart Lateur <bart.lateur@telenet.be> - 2011-10-18 19:49 +0200

csiph-web