Jump to content

jakester

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jakester

  • Rank
    Newbie
  1. I have this slide show for various stuff we sell. We have these 8 jpegs, so in order to save bandwith, I created an array of Image objects so the jpegs get cached and the browser won't keep downloading the pictures. The code works faultlessly but it still shows in the IE status bar each time the jpeg changes that the same jpegs are being downloaded from the server instead of using the cache. <script language="JavaScript">var x = 0;var pics = new Array(8);var imageObj = new Array(8);var ItemUrl = new Array(8);var ItemName = new Array(8);var blurb = new Array(8);function switchpics(){document.specialPics.src = imageObj[x].src;document.specialPics.alt = ItemName[x];document.getElementById('specialLink1').href = ItemUrl[x];document.getElementById('specialLink2').href = ItemUrl[x];document.getElementById('specialName').innerHTML = ItemName[x] + '<br />' + blurb[x];if(x < (8-1))x++;else x = 0; return;}imageObj[0] = new Image();imageObj[0].src = './Products/mrqa/mrqa180.jpg';document.emptyImage.src = './Products/mrqa/mrqa180.jpg';ItemUrl[0] = '/common_index/chock/chock.php?sn=22113';ItemName[0] = 'RPA Large Rubber Pyramid<br />Three Cavity with Eye Bolt';blurb[0] = 'Grade A - 3 Cavity Rubber Extruded Chock';imageObj[1] = new Image();imageObj[1].src = './Products/hgs/hgs_180.jpg';document.emptyImage.src = './Products/hgs/hgs_180.jpg';ItemUrl[1] = '/common_index/chock/chock.php?sn=12103';ItemName[1] = 'HGS Large Aluminum Chock<br />Molded Heavy Gripper Standard';blurb[1] = 'High performance "Gripper Standard"';imageObj[2] = new Image();imageObj[2].src = './Products/hwc7/hwc7_180.jpg';document.emptyImage.src = './Products/hwc7/hwc7_180.jpg';ItemUrl[2] = '/common_index/chock/chock.php?sn=11101';ItemName[2] = 'HWC7 Large Aluminum Wheel Chock<br />Extruded with Solid Bottom';blurb[2] = 'A heavy duty chock suited to Wildlands application';imageObj[3] = new Image();imageObj[3].src = './Products/hrg/hrg180.jpg';document.emptyImage.src = './Products/hrg/hrg180.jpg';ItemUrl[3] = '/common_index/chock/chock.php?sn=21101';ItemName[3] = 'HRG -Large Rubber Contour<br />High Density';blurb[3] = 'Heavy Rubber Chock';imageObj[4] = new Image();imageObj[4].src = './Products/rwl/rwl_180.jpg';document.emptyImage.src = './Products/rwl/rwl_180.jpg';ItemUrl[4] = '/common_index/chock/chock.php?sn=23214';ItemName[4] = 'RWL Medium Rubber Chock<br />Extruded EPDM Wedge';blurb[4] = 'Good for paper rolls in mills';imageObj[5] = new Image();imageObj[5].src = './Products/arg12/arg12_180.jpg';document.emptyImage.src = './Products/arg12/arg12_180.jpg';ItemUrl[5] = '/common_index/chock/chock.php?sn=3121200002';ItemName[5] = 'ARG12 Large Aircraft Chock<br />Extruded SBR Rubber';blurb[5] = 'The ARG12 large aircraft chock is a durable extruded SBR rubber chock.';imageObj[6] = new Image();imageObj[6].src = './Products/arc_4h/arc4h_180.jpg';document.emptyImage.src = './Products/arc_4h/arc4h_180.jpg';ItemUrl[6] = '/common_index/chock/chock.php?sn=31904';ItemName[6] = 'A-4H Small Aircraft Chock';blurb[6] = 'A small Extruded Rubber Chock for Nose wheels, etc';imageObj[7] = new Image();imageObj[7].src = './Products/oum/oum_180.jpg';document.emptyImage.src = './Products/oum/oum_180.jpg';ItemUrl[7] = '/common_index/chock/chock.php?sn=41002';ItemName[7] = 'OUM Mega Urethane Chock<br />Hi-Vis Orange with Pass Through';blurb[7] = 'Huge chock for mine trucks, up to 240 tons, bright orange';setInterval("switchpics()", 15000);</script>
  2. I got all these XML templates from UPS to post relevant shipping data from our site to UPS's so they can calculate shpping costs then POST it back to us so we can show customers available services and add it to the sale price. I understand the templates well enough, but how do you use the HTTP POST to get the XML to UPS's site? I can't find one example of this anywhere. Then I found some javascript stuff on W3Schools, using the XMLHttpRequest & Microsoft.XMLHTTP objects, but those JS objects won't work in any of my browsers. Please give me a hint. I am pretty good with FORMS and PHP and HTML but new to XML this is the authorization xml you include in the post, the UPS server will separate the two xml <?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>XXXXXXXXX</AccessLicenseNumber> <UserId>dougword</UserId> <Password>*******</Password></AccessRequest> Here is the template that UPS gives you so they can figure services available: <?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Bare Bones Rate Request</CustomerContext> <XpciVersion>1.0</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>Rate</RequestOption> </Request> <PickupType> <Code>01</Code> </PickupType> <Shipment> <Shipper> <Address> <PostalCode>44129</PostalCode> <CountryCode>US</CountryCode> </Address> </Shipper> <ShipTo> <Address> <PostalCode>44129</PostalCode> <CountryCode>US</CountryCode> </Address> </ShipTo> <ShipFrom> <Address> <PostalCode>32779</PostalCode> <CountryCode>US</CountryCode> </Address> </ShipFrom> <Service> <Code>01</Code> </Service> <Package> <PackagingType> <Code>02</Code> </PackagingType> <Dimensions> <UnitOfMeasurement> <Code>IN</Code> </UnitOfMeasurement> <Length>20</Length> <Width>20</Width> <Height>20</Height> </Dimensions> <PackageWeight> <UnitOfMeasurement> <Code>LBS</Code> </UnitOfMeasurement> <Weight>23</Weight> </PackageWeight> </Package> </Shipment></RatingServiceSelectionRequest>
  3. I got all these XML templates from UPS to post relevant shipping data from our site to UPS's so they can calculate shpping costs thenPOST it back to us so we can add it to the sale price. I understand the templates well enough, but how do you use the HTTP POST to get the XML to UPS's site? I can't find one example of this anywhere. Then I found some javascript stuff on W3Schools, using the XMLHttpRequest & Microsoft.XMLHTTP objects, but those JS objects won't work in any of my browsers. Please give me a hint. I am pretty good with FORMS and PHP and HTML but new to XML this is the authorization xml you include in the post, you inlcude both in the <?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>XXXXXXXXX</AccessLicenseNumber> <UserId>dougword</UserId> <Password>*******</Password></AccessRequest> Here is the template that UPS gives you: <?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Bare Bones Rate Request</CustomerContext> <XpciVersion>1.0</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>Rate</RequestOption> </Request> <PickupType> <Code>01</Code> </PickupType> <Shipment> <Shipper> <Address> <PostalCode>44129</PostalCode> <CountryCode>US</CountryCode> </Address> </Shipper> <ShipTo> <Address> <PostalCode>44129</PostalCode> <CountryCode>US</CountryCode> </Address> </ShipTo> <ShipFrom> <Address> <PostalCode>32779</PostalCode> <CountryCode>US</CountryCode> </Address> </ShipFrom> <Service> <Code>01</Code> </Service> <Package> <PackagingType> <Code>02</Code> </PackagingType> <Dimensions> <UnitOfMeasurement> <Code>IN</Code> </UnitOfMeasurement> <Length>20</Length> <Width>20</Width> <Height>20</Height> </Dimensions> <PackageWeight> <UnitOfMeasurement> <Code>LBS</Code> </UnitOfMeasurement> <Weight>23</Weight> </PackageWeight> </Package> </Shipment></RatingServiceSelectionRequest>
×
×
  • Create New...