p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   XML to be displayed in a pop-up (http://p2p.wrox.com/showthread.php?t=25374)

crmpicco February 10th, 2005 08:26 AM

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

Santhi February 10th, 2005 09:19 AM

Keep the XML output in the Session and access in the popup page...



All times are GMT -4. The time now is 12:06 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.