Passing form data to PHP via GET, from XSL style sheet

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
marty pain
Forum Contributor
Posts: 105
Joined: Thu Jun 11, 2009 5:32 am
Location: Essex

Passing form data to PHP via GET, from XSL style sheet

Post by marty pain »

OK, I have the following..

Code: Select all

<a href="#">
            <xsl:attribute name="onclick">window.open("render.php?page=booking_p-bkPaxEntry&mode=a&bookingID=<xsl:value-of select="bookingID" />&tourID=<xsl:value-of select="item/bkTourList" />", "", "width=400, height=400, titlebar=0,menubar=0,resizable=1");</xsl:attribute>
            <button type="button">Add Passenger</button>
        </a>
I need to pass some form data ( a date ) that isn't part of the XML to the PHP script. The link should look like this ( the date i want to pass is highlighted red ).

Code: Select all

<a href="#" onclick="window.open("render.php?page=booking_p-bkPaxEntry&mode=a&bookingID=704&tourID=MAROCC&[color=#FF0000]departureDate=18/09/2009[/color]", "", "width=400, height=400, titlebar=0,menubar=0,resizable=1");"><button type="button">Add Passenger</button></a>
I can't pick this date up from the XML, so is there some way of adding it from the form using Javascript?? I have tried adding in document.getElementById as part of the link, but if I put this in the quotes it prints it literally, and if I place it outside the quotes the link just fails.

Bit stuck here and could do with a point in the right direction.

Thanks!
Post Reply