View Single Post
  #1 (permalink)  
Old February 10th, 2005, 08:26 AM
crmpicco crmpicco is offline
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default XML to be displayed in a pop-up

i have an asp page with XML on it.

But i want info coming from XML to be displayed in a pop-up.

Is this possible?

My XML:

handle=session("sessionid")
''Response.Write("TraceMYTRIP2handle "& handle)
    set xmlsession=server.CreateObject ("Microsoft.XMLDOM")
    Set element = xmlsession.createElement("Login_Request")
    Set node = xmlsession.appendChild(element)
        Set subelement = xmlsession.createElement("Companyid")
        Set node = element.appendChild(subelement)
        subelement.Text = companyid
        Set subelement = xmlsession.createElement("Sessionid")
        Set node = element.appendChild(subelement)
        subelement.Text = handle

    set objapi=server.CreateObject("FA_Agency.Agency")
    set dumxml=server.CreateObject ("Microsoft.FreeThreadedXMLDOM")
    set dumxml=objapi.Agencyretrive (xmlsession,""& companyid &"",""& pnrno &"")
    set objxml=server.CreateObject ("Microsoft.FreeThreadedXMLDOM")
    objxml.loadxml(dumxml.xml)
    set dumxml=nothing
    'Response.Write("TraceMYTRIP2errnum4 "& err.number)
    'objxml.save(writeTraceFile("XFILEmytrip2_reply3.x ml"))
    if asp_trace<>"no" then%><%objxml.save(writeTracefile("XFILEmytrip2_r eply3.xml"))%><%end if
    set objapi=nothing

''''''''''''''''''''''''''''
' PoweredPNR_Retrieve '
''''''''''''''''''''''''''''
handle=session("sessionid")
''Response.Write("TraceMYTRIP2handle "& handle)
    set xmlsession=server.CreateObject ("Microsoft.XMLDOM")
    Set element = xmlsession.createElement("Login_Request")
    Set node = xmlsession.appendChild(element)
        Set subelement = xmlsession.createElement("Companyid")
        Set node = element.appendChild(subelement)
        subelement.Text = companyid
        Set subelement = xmlsession.createElement("Sessionid")
        Set node = element.appendChild(subelement)
        subelement.Text = handle

    set objapi=server.CreateObject("FA_Agency.Agency")
    set dumxml=server.CreateObject ("Microsoft.FreeThreadedXMLDOM")
    set dumxml=objapi.PoweredPNR_Retrieve(xmlsession,""& pnrno &"")
    set xmldoc=server.CreateObject ("Microsoft.FreeThreadedXMLDOM")
    xmldoc.loadxml(dumxml.xml)
    set dumxml=nothing

__________________________________________________ _______

My ASP code:

<%
dim arrStr
dim theStr

theStr = xmldoc.documentelement.selectnodes("dataElementsMa ster").item(0).selectnodes("dataElementsIndiv").it em(2).selectnodes("miscellaneousRemarks").item(0). selectnodes("remarks").item(0).selectnodes("freete xt").item(0).text

Dim expr: Set expr = New RegExp
expr.Pattern = "[^:]*:([^,]*),?"
expr.Global = True
Dim match, matches
Set matches = expr.Execute(theStr)
For Each match In matches
    response.write "item = " & match.SubMatches(0) & "<br />"
formatted = match.SubMatches(0)
response.write "Formatted = " & formatted & "<br>"
Next
Set matches = Nothing
Set expr = Nothing

%>

__________________________________________________
My output:

item = 134
item = 169
item = 69.70
item = 35
item = 0
item = 0
item = 0
item = 0
item = 0
item = 273.70
item = 39/IT5AFKLE

My pop-up window link:

<a href="fare_details.asp" onClick="javascript: window.open(this.href,'name','650','500','yes');re turn false;">Fare Details</a>



www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
Reply With Quote