Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Replace problem

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61001
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replace problem
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Replace problem - 6/3/2008 7:03:58 PM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
/* iframe.html */


      

/* DEL5.vbs */


      

________________________

Hi, I've rigged my main document to create .vbs files that open up the iframe and replace content within with nothing...

But it isn't working. Ideas?

-TKS
 
 
Post #: 1
 
 RE: Replace problem - 6/4/2008 12:14:57 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
Your problem is most likely related to the double quoting in your replace function. Take the string that you are trying to do the replacement with and MsgBox it so that you can see if it looks right.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)
 
 
Post #: 2
 
 RE: Replace problem - 6/4/2008 7:53:52 PM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: ebgreen

Your problem is most likely related to the double quoting in your replace function. Take the string that you are trying to do the replacement with and MsgBox it so that you can see if it looks right.


I know, but the function can't work without the double quotes, so if I take them out, I'm at a loss... what do you do in a case like this?

-TKS

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Replace problem - 6/5/2008 12:15:31 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
You don't take them out you use double and triple double quotes (or personally I use Chr(34)) so that the string that you build has the double quotes in it where it needs to be.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)
 
 
Post #: 4
 
 RE: Replace problem - 6/8/2008 10:47:31 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: ebgreen

You don't take them out you use double and triple double quotes (or personally I use Chr(34)) so that the string that you build has the double quotes in it where it needs to be.


Hey ebgreen,

Thanks for the help.

-TKS

(in reply to ebgreen)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replace problem Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts