| danthewebguy on Aug 11, 2005 at 7:45:16 AM (# 4) hmmm - here's my code: ################################################### Dim objXMLDoc, NodeList, Node, s
Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml") objXMLDoc.setProperty "SelectionLanguage", "XPath"
Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")
s = "" For Each Node In NodeList s = s & Node.text Next
If s = sSourcePage Then response.write "You are a user!" Else response.write "You are NOT a user!" End If ###################################################
Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)
I really appreciate your input and quick responses - who sent you? :) danthewebguy on Aug 11, 2005 at 7:45:57 AM (# 5)hmmm - here's my code: ################################################### Dim objXMLDoc, NodeList, Node, s
Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml") objXMLDoc.setProperty "SelectionLanguage", "XPath"
Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")
s = "" For Each Node In NodeList s = s & Node.text Next
If s = sSourcePage Then response.write "You are a user!" Else response.write "You are NOT a user!" End If ###################################################
Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)
I really appreciate your input and quick responses - who sent you? :) danthewebguy on Aug 11, 2005 at 7:46:45 AM (# 6)hmmm - here's my code: ################################################### Dim objXMLDoc, NodeList, Node, s
Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml") objXMLDoc.setProperty "SelectionLanguage", "XPath"
Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")
s = "" For Each Node In NodeList s = s & Node.text Next
If s = sSourcePage Then response.write "You are a user!" Else response.write "You are NOT a user!" End If ###################################################
Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)
I really appreciate your input and quick responses - who sent you? :) danthewebguy on Aug 11, 2005 at 7:47:41 AM (# 7)hmmm - here's my code: ################################################### Dim objXMLDoc, NodeList, Node, s
Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml") objXMLDoc.setProperty "SelectionLanguage", "XPath"
Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")
s = "" For Each Node In NodeList s = s & Node.text Next
If s = sSourcePage Then response.write "You are a user!" Else response.write "You are NOT a user!" End If ###################################################
Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)
I really appreciate your input and quick responses - who sent you? :) bod1467 on Aug 11, 2005 at 7:48:07 AM (# 8) This message has been edited.Cut -- I hadn't finished reading the thread. danthewebguy on Aug 11, 2005 at 7:48:26 AM (# 9)geez! I kept getting DB errors when posting this response - sorry about that! danthewebguy on Aug 11, 2005 at 7:58:40 AM (# 10)wait a minute - I did a response.write on the "s" variable before the "for each Node" statement and it was equal to nothing - blank - dead air. But after I do the "For each node . . . " "S" is equal to ALL of the fnames and lnames in my xml file, like one long string of names . . . I'm totally baffled now, of course "s" isn't equal to just one name . . . . :(
|