PDA

View Full Version : Will send $10.00 via paypal if someone helps me with this


ktplaskett
01-05-2003, 09:52 PM
I'm hoping this should be an easy fix, so the first person who sends me some code that accomplishes what I need, I will send 10.00 via paypal immediately.. just for helping me.

I am integrating Travelnow.com's booking engine to my website and I'm not sure how to make this one thing happen

On my main page, I've got the following image:

http://affiliate.travelnow.com/affiliatecenter/include/images/newbanner.gif


What I would like to do:
When a user enters in the information in the boxes, I want the travelnow site(I am private labelling through their affiliate program) to open in a javascript window rather than a standard HTML window. Currently the way the code is written is to simply open in the current browser session. Here is the code below:


//<A href="http://www.travelnow.com/index.jsp?cid=59402"><IMG src="images/tnow_01-a.gif" width="158" height="9" alt="TravelNow.com" border="0"></A><BR><A href="http://www.travelnow.com/hotels/index.jsp?cid=59402"><IMG src="images/tnow_04.gif" width="158" height="31" alt="Hotels" border="0"></A></TD>
//</TR>


//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="148" bgcolor="#99b0de" valign="top"><FONT face="<br><IMG src="images/spacer.gif" width="148" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<FORM action="http://www.travelnow.com/hotels/searchframe.jsp" method="POST" name="frm_Search">
//<INPUT type="hidden" name="cid" value="59402">
//<INPUT type="hidden" name="submitted" value="true">
//<INPUT type="hidden" name="validateCity" value="true">
//<TR>
//<TD colspan="5"><IMG src="images/tnow_20.gif" width="158" height="10" alt="Enter a search city"></TD>
//</TR>
//<TR bgcolor="#99b0de">
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="148"><INPUT type="text" name="city" size="17"></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_24.gif" width="158" height="11" alt="Example: Las Vegas, NV, US"><BR><INPUT type="image" name="submit" src="images/tnow_14.gif" width="158" height="21" alt="Search for available hotels" border="0"><BR><A href="http://www.travelnow.com/cars/index.jsp?cid=59402"><IMG src="images/tnow_16.gif" width="158" height="31" alt="Cars:" border="0"></A></TD>
//</TR>
//</FORM>
//<TR>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD width="4"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD width="148"><FONT face="'Trebuchet MS', Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="1">Check rates from more than 60 different rental companies at nearly every major airport.</FONT></TD>
//<TD width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_20.gif" width="158" height="10" alt="Enter a search city"></TD>
//</TR>
//<FORM action="http://www.travelnow.com/cars/search.jsp" method="POST" name="aform">
//<INPUT type="hidden" name="cid" value="59402">
//<INPUT type="hidden" name="submitted" value="true">
//<INPUT type="hidden" name="validateCity" value="true">
//<TR>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="148"><INPUT type="text" name="pickUpCity" size="17"></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_24.gif" width="158" height="11" alt="Example: Las Vegas, NV, US"><BR><INPUT type="image" name="submit" src="images/tnow_25.gif" width="158" height="21" alt="Search for available cars" border="0"><BR><A href="http://www.travelnow.com/airlines/index.jsp?cid=59402">/<IMG src="images/tnow_27.gif" width="158" height="31" alt="Air:" border="0"></A></TD>
//</TR>
//</FORM>
//<TR>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="148"><FONT face="'Trebuchet MS', Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="1">Search for international and domestic flights with discounts direct from our consolidators!</FONT></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_31.gif" width="158" height="11" alt="Depart From (city or airport)"></TD>
//</TR>
//<FORM action="http://www.travelnow.com/airlines/search.jsp" method="POST" name="AvailRequester">
//<INPUT type="hidden" name="cid" value="59402">
//<INPUT type="hidden" name="submitted" value="true">
//<INPUT type="hidden" name="validateCity" value="true">
//<TR>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="148"><INPUT type="text" name="departureCity" size="17"></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_35.gif" width="158" height="13"></TD>
//</TR>
//<TR>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width = "148">

//<SELECT NAME="departureMonth" class="smallform">
//<option value="0">January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11" selected >December

//</select>

//<select name="departureDay" class="smallform">
//<option value="1">1<option value="2">2<option

(I removed all the dropdown information to save space)

//</select>
//<SELECT name="departureYear">
//<OPTION value="2001" selected>2001
//<OPTION value="2002">2002
//</SELECT></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD width="1" bgcolor="#000000"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_39.gif" width="158" height="12" alt=""></TD>
//</TR>
//<TR>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1"></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1"></TD>
//<TD width="148"><INPUT type="text" name="destinationCity" size="17"></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1"></TD>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1"></TD>
//</TR>
//<TR>
//<TD colspan="5"><IMG src="images/tnow_35.gif" width="158" height="13" alt=""></TD>
//</TR>
//<TR>
//<TD bgcolor="#000000" width="1">//<IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="4">//<IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD bgcolor="#99b0de" width="148">

//<SELECT NAME="returnMonth" class="smallform">
//<option value="0">January<option value="1">February<option

(I removed all the dropdown information to save space)

//</select>
//<select name="returnDay" class="smallform">
//<option value="1">1<option value="2">2<option value="3">3<option value="4">4<option value="5" selected>5<option value="6">6<option value="7">7<option value="8">8<option value="9">9<option value="10">10<option value="11">11<option value="12">12<option value="13">13<option value="14">14<option value="15">15<option value="16">16<option value="17">17<option value="18">18<option value="19">19<option value="20">20<option value="21">21<option value="22">22<option value="23">23<option value="24">24<option value="25">25<option value="26">26<option value="27">27<option value="28">28<option value="29">29<option value="30">30<option value="31">31

//</select>


//<SELECT name="returnYear">
//<OPTION value="2001" selected>2001
//<OPTION value="2002">2002
//</SELECT></TD>
//<TD bgcolor="#99b0de" width="4"><IMG src="images/spacer.gif" width="4" height="1" alt=""></TD>
//<TD bgcolor="#000000" width="1"><IMG src="images/spacer.gif" width="1" height="1" alt=""></TD>
//</TR><TR>

//<TD colspan="5" bgcolor = "#FFFFFF" ><INPUT type="image" name="submit" src="images/tnow_47.gif" width="158"
//height="21" alt="Search for best airfare" border="0"><BR>


//<IMG src="images/tnow_48-a.gif" width="158" height="18" >

//</TD>
//</TR>
//</FORM>

//</table>

Evlich
01-05-2003, 10:14 PM
I don't quite understand what you mean when you say you want it to open in a 'javascript window'? If you mean that you want it to open in a new window, try this javascript code:
[code]
<script type="text/javascript" language="javascript1.2">
function openURLinNewWin(url)
{
window.open(url);
}
</script>
There are a lot of things that you can do with this function like disable menu bars and such, check out the DynamicDrive Website (dynamicdrive.com) they have a wizard for it. As far as passing information to the page through POST, I don't really know, to pass throught GET you could probably just append the whole ?...=... stuff to the ennd of the link.
Hope this helps a little bit at least.
~evlich

ktplaskett
01-05-2003, 11:01 PM
Yeah, the idea is to have all the information from the boxes the user fills out forward to the window generated by javascript where the specifics of the new window can be adjested (ie. 'scrollbar=no' etc...)

I have no idea how to do it...

Thanks for the tip so far... I'm a newbie..

ktplaskett
01-06-2003, 01:06 AM
I have sucessfully implemented a script that creates a new window with configurable settings like you mentioned earlier.. but am unable to POST the information from the form into the new window session.

Any thoughts anyone?

Evlich
01-06-2003, 02:31 AM
Ok, this may be a bit round about, but here is something that you can try. If you have access to something like php of CGI then you can make a page like forward.php that will accept parameters via GET (in the URL with the ? and all that good stuff) and then you can use that information to genterate a form that has it and have the form submit via POST. Put an onload event in the body and have it submit the form automatically. It shouldn't be too difficult. This is just a suggestion though, I am not really sure if there is a way to pass the parameters directly via POST when you create the new window. If you don't have php, it is still possible through javascript. Tell me if you understand what I am saying. If you give me the fields, then I could probably find a way to parse the stuff out.
Hope that this helps.
~evlich

ktplaskett
01-06-2003, 03:04 AM
Evlich -

Thank you for all your assitance... Check your email to view the URL of the stuff I'm working on.